I'm working on the next version of writerdeckOS and want to have two default directories in the home folders for any users created:
- Documents
- USBs (which will be linked to plugged in USBs)
I'm moving out of user space and into global space. So with that, I'm trying to determine where the "default populated folders" are configured (note: I'm using a headless version of Debian as my base OS).
Turns out SOOOOO much is controlled by the desktop environment!!! Like much of your default folders are specifically configured within Gnome, or XFCE, or KDE, etc.
But I'm not using a desktop environment. I'm using Bash as a Command Line Interface with Tmux as a multiplexor.
So I sorted out where Bash sets out its default folder schema and default user profiles, etc in Debian headless.
It's in /etc/skel !!!! Cool!!!!
So I created a unique directory in /etc/skel in my base build installation. Then used Penguins Eggs to build me an installation ISO...
...and sure enough!!! The default folder is in both my Live instance and in my installed instance!!!!
Yay!!!!
Next I'll see if I can get that "USBs" folder to sync with a global mount point... that's gonna be goofy...
Magitian
in reply to Tinker ☀️ • • •yes. /etc/skel is quite an underrated feature of the filesystem.
I use it to store the configs I want on a custom Arch Linux-based distro.
Tinker ☀️
in reply to Magitian • • •mirth
in reply to Tinker ☀️ • • •Tinker ☀️
in reply to mirth • • •@mirth - It is a single user system, but I'm configuring it as multiuser (helps with installation). In the current version I'm using udiskie to do just as you've suggested.
I'm about to test whether I can do similar but with /etc/skel and still have it point to the automount.
mirth
in reply to mirth • • •bindfs
bindfs.orgTinker ☀️
in reply to mirth • • •@mirth - Ended up going with udiskie loaded in /etc/profile and creating a symlink (if symlink does not exist) in /etc/profile specific to the user logging on:
infosec.exchange/@tinker/11512…
Tinker ☀️
2025-08-31 17:26:56
mirth
in reply to Tinker ☀️ • • •Tinker ☀️
in reply to mirth • • •Tinker ☀️
in reply to Tinker ☀️ • • •Okay! Figured out automounted USBs for global settings now. I've got it creating a Folder in the user's home directory for USBs as well.
Putting a "udiskie" backgrounded run command in the global /etc/profile:
/usr/bin/udiskie -N -F --no-notify-command >/dev/null 2>&1 &
And then right below it, I'll do a (if symlink does not exist, then create it) and have it specific to whichever user is logging on.
if [ ! -L /home/$USER/USBs ]; then ln -s /media/$USER/ /home/$USER/USBs; fi
This works for any given user that logs on. If you try and change users with the "su" command, it doesn't work (not sure how to get the global profile to load when you change users... but its not important).
This is a single user system and the only reason to have the $USER check is because the user sets their own username at installation. This will work for that usecase wonderfully, I believe.
#writerdeckOS #linux
Tinker ☀️
in reply to Tinker ☀️ • • •Tested it with a live USB and it works, both in Live and in the installation.
I'm calling it on this feature.
Onto the next one!
mirth
in reply to Tinker ☀️ • • •Tinker ☀️
in reply to mirth • • •(roll m3tti)
in reply to Tinker ☀️ • • •