I've given myself a new project - I want to change the defaults that happen when I create a new user via System Settings. This is a multi-boot, multi-user system.
In the old days it was pretty simple - everything in skel did what you wanted. It appears, however, that folder creation and the like are different.
I'm a proponent of keeping /home within the install partition, but putting data files (media, etc) and some other specific folders (.wine, .VirtualBox, .thunderbird) on a separate partition. The reasons why aren't at issue, just how to do it.
The scheme it this: create the basic folder structure in /home, create folder structure on the separate storage device (mounted as /data), create some links from home to some data folders, do some bind mounts from some home folders to data folders.
I've figured out that /etc/xdg/user-dirs.defaults will create the /home directories I want, but I'm still searching for the best (most elegant way) to do the rest of this list of things at each New User add:
1. Create proper home directory structure - DONE
2. Create data directory structure
3. Create links to some data directories - DONE, but hoping to do it better
4. Mount bind mounts - not tested
I also need to add a group to the default secondary groups for new users.
I also plan on using dynamic bind mounts via a script rather than fixed (fstab) bind mounts so that each users data is mounted at login and unmounted at logout. I'm planning on using Xstartup and Xreset for the bind commands, but I haven't tested it yet.
I can create the links via a script activated at first login but I don't know if there's a better (easier) way to do that. Since the bind mounts should occur at initial log in, the target directories must be created prior to initial login, at user creation.
Some of this is an exercise to see how automated I can get these sort of housekeeping tasks. The data locations I use are rather transitory and it would be great to be able to edit a single file when my scheme changes rather than slogging through every user on every install.
In the old days it was pretty simple - everything in skel did what you wanted. It appears, however, that folder creation and the like are different.
I'm a proponent of keeping /home within the install partition, but putting data files (media, etc) and some other specific folders (.wine, .VirtualBox, .thunderbird) on a separate partition. The reasons why aren't at issue, just how to do it.
The scheme it this: create the basic folder structure in /home, create folder structure on the separate storage device (mounted as /data), create some links from home to some data folders, do some bind mounts from some home folders to data folders.
I've figured out that /etc/xdg/user-dirs.defaults will create the /home directories I want, but I'm still searching for the best (most elegant way) to do the rest of this list of things at each New User add:
1. Create proper home directory structure - DONE
2. Create data directory structure
3. Create links to some data directories - DONE, but hoping to do it better
4. Mount bind mounts - not tested
I also need to add a group to the default secondary groups for new users.
I also plan on using dynamic bind mounts via a script rather than fixed (fstab) bind mounts so that each users data is mounted at login and unmounted at logout. I'm planning on using Xstartup and Xreset for the bind commands, but I haven't tested it yet.
I can create the links via a script activated at first login but I don't know if there's a better (easier) way to do that. Since the bind mounts should occur at initial log in, the target directories must be created prior to initial login, at user creation.
Some of this is an exercise to see how automated I can get these sort of housekeeping tasks. The data locations I use are rather transitory and it would be great to be able to edit a single file when my scheme changes rather than slogging through every user on every install.