GNOME Bugzilla – Bug 709105
gnome-shell does not preserve settings from /etc/locale.conf
Last modified: 2013-12-16 20:10:32 UTC
When I login to gnome, my settings from /etc/locale.conf are not imported into my environment. Tested on gnome-shell-3.8.4-2.fc19 Steps to Reproduce: 1.add LC_COLLATE="C" to /etc/locale.conf 2.login via ssh or vtty 3.note LC_COLLATE is set 4.login to gnome-shell 5.open terminal 6.note LC_COLLATE is not set
gnome-settings-daemon sets LC_* variables according to the settings in the Region & Language panel, reassigning.
We don't set LC_COLLATE at all.
From a quick look it seems that gdm is not passing this gnome-session.
This really should be handled by pam_systemd. see: http://lists.freedesktop.org/archives/systemd-devel/2013-January/007908.html But that hasn't merged yet. In the meantime, fedora's /etc/profile.d/lang.sh has this: if [ -n "$LANG" ]; then ... else for langfile in /etc/locale.conf "$HOME/.i18n" ; do [ -f $langfile ] && . $langfile && sourced=1 done fi if [ "$sourced" = 1 ]; then ... [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE ... fi (other distros like arch have similar things) but GDM sets LANG so locale.conf isn't getting source. the fix, I guess, is to not set LANG so lang.sh works.
thinking about this more, we really shouldn't have a "hole" between the main daemon and the pam modules where the language is unset. I'll just change things to forward all language vars from the daemon down.
Created attachment 264311 [details] [review] session: pass all language vars through to worker Right now we set LANG based on the value of setlocale(), and disregard all other language environment variables. This commit just passes the environment variables through wholesale. http://bugzilla.gnome.org/show_bug.cgi?id=709105
Attachment 264311 [details] pushed as c672e4e - session: pass all language vars through to worker