What configuration the “Region & Language” options in GNOME Settings change?
I know that the “Your Account → Format” section of the “Region & Language” options changes the /system/locale/region key in dconf, but what about “Your Account → Language” which sets the LANG variable for the individual user? I can’t find a configuration for this anywhere in user’s home directory dconf or rc files. The configuration is apparently located outside the user’s home directory, because clearing the entire home directory resets the aforementioned “Your Account → Format” selection (because the user’s dconf database is gone), but not the “Your Account → Language” selection. Outside the home directory, it might be GDM because the /usr/bin/gnome-session script handles in terms of localization only/system/locale/region key and some software has already defined the user-specific LANG variable before the /usr/bin/gnome-session script (this become clear when I set “echo $LANG > /tmp/test.$USER” at the beginning of the script, and user-specific “Your Account → Language” selection was of course other than system-wide).
Suggestion for improvement: I don’t know where the configuration is locate, but whatever it is, it’s not in the home directory, nor in $XDG_CONFIG/locale.conf, $HOME/enviroment, or similar. First of all, having such user-specific configuration outside of the home directory is just silly. Only that the locale configuration is not $XDG CONFIG/locale.conf or $HOME/environment is incredible to me and causes inconsistency. For example, when using TTY without Gnome, which would set the enviroment variables correctly from its own locations, Bash, Zsh, etc. uses different locale than with Gnome, because those shells read locale configuration from XDG_CONFIG/locale.conf or $HOME/enviroment. That’s why the shell in TTY session uses the system-wide settings from /etc/locale.conf. As for the /system/locale/region key in dconf, it makes it difficult for the userbase to define custom localization configurations, when under this key /usr/bin/gnome-session defines bundle of variables and overwrites $XDG_CONFIG/locale.conf / $HOME/environment configuration (see lines 20-30), I think (I didn’t test this). I love dconf for many reasons, but it’s not for everything. In my opinion, for example /etc/hostname, /etc/machine-info or this /etc/locale.conf style configuration should not be put in dconf.
This topic is issue from: