Sharing one home directory between the Linux machines with the different display resolutions and different pointing devices, keeping $HOME/.config data for each machine
Back in 1990's, it was common practice to share one home directory between many UNIX servers using NFS. But it is not in these days.
But I have become to want to share my home directory between two different Linux machines: One is a Debian GNU/Linux installed as a primary OS of a dual boot machine, and the other is a virtualized Linux box within the Virtualbox running under the Windows 10, a secondary OS of the dual-boot.
They have different display resolutions and pointing devices. These differences led me to an annoying problem: if you open GNOME desktop environment, display and pointing device setting became broken.
Today's GNOME desktop environment stores most of the settings to the files under $HOME/.config directory. But if you share $HOME/.config between two machines, the stored configuration for a particular machine may become incompatible with other machines with different display resolutions and pointing devices.
Indeed, my GNOME desktop has become unusable.
To overcome this problem I renamed $HOME/.config directory to the name which have host name as a suffix.
According to XDG Base Directory Specification, alternative directory of $HOME/.config can be specified with the environment variable XDG_CONFIG_HOME.
So, you can set XDG_CONFIG_HOME like:
$ cat /etc/profile.d/xdg_config.sh
XDG_CONFIG_HOME=$HOME/.config-`hostname`
export XDG_CONFIG_HOME
Of cource, the different machines must have different names.
This solution is working perfect for me.
Comments
Post a Comment