- labels: --> lxappearance
- assigned_to: Lonely Stranger
- Group: -->
This issue was originally reported on nixpkgs issue tracker https://github.com/NixOS/nixpkgs/issues/26909 which contains more details. I'm however raising it here as well as the current behaviour could be considered questionable. Relavant references include:
lxde issue 822 motivated using gtk_rc_get_default_files function to determine where to save gtk2 settings so that existence of $GTK2_RC_FILES variable would be respected. In case this variable is not set gtk_rc_get_default_files will return the following paths:
GTK_DATA_PREFIX/share/gtk-2.0/gtkrc, where GTK_DATA_PREFIX refers to the installation prefix of the gtk2 library$XDG_CONFIG_DIRS $path/gtk-2.0/gtkrc. XDG specification says:$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'.
$HOME/.gtkrc-2.0As noted on the nixpkgs issue $XDG_CONFIG_DIRS contains a path referring to user's home directory that is however not user writeable, and due to this lxappearance is unable to save gtk2 settings.
On one hand it could be argued that is a peculiarity of how nix manages software.
On the other it could be argued that out of three choices returned by gtk_rc_get_default_files in case $GTK_RC_FILES variable is not set only $HOME/.gtkrc-2.0 should be considered a valid location as far as managing user level settings is concerned:
$XDG_CONFIG_DIRS should be used when searching for configuration files, for managing them at the user level $XDG_CONFIG_HOME should be used. As $XDG_CONFIG_HOME is not supported by gtk2 I would consider any path in this set not valid in context of saving user settings.$HOME/.gtkrc-2.0 as the valid choice of where to save user settings.As per above it is my current conclusion that when $GTK2_RC_FILES variable is not set the only valid choice when considering where to save the settings would be $HOME/.gtkrc-2.0