[clug] Local configuration on a non-homogeneous LAN
clug at csmart.io
Fri Jun 21 22:27:26 UTC 2019
On Fri, 21 Jun 2019, at 23:41, Brenton Ross via linux wrote:
> It occurs to me that a lot of software stores its user specific
> configurations in the ~/.config and ~/.local directories. If these are
> stored centrally then there could be conflicts when a user changes from
> one machine to another and the configuration data is then out of sync
> with the programs installed on the second machine.
> Does anyone have any ideas on how to handle this ?
There hasn't traditionally been an agreed location for storing config in Linux, however the basedir spec from freedesktop is trying to address this.
"$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used."
In theory you could try to set environment variables for each distro which changes these values to the distro's name (you could even add version). There are a few different locations where you could set this, for example:
e.g. on Fedora:
# cat > /etc/profile.d/basedir-overrides.sh << EOF
This would set those locations to a distro-specific, e.g.
$ echo $XDG_DATA_HOME
$ echo $XDG_CONFIG_HOME
However, while I expect in general the desktops and a reasonable amount of software will respect that setting others won't.
Another idea might be to configure additional automounts for those XDG directory locations for each distro, which will store them in different locations in NFS.
You could also have different mount points for home for each distro but common mount points for top level dirs like ~/Documents, etc or just a ~/home/data-goes-here.
More information about the linux