After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709105 - gnome-shell does not preserve settings from /etc/locale.conf
gnome-shell does not preserve settings from /etc/locale.conf
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-30 15:04 UTC by PatRiehecky
Modified: 2013-12-16 20:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session: pass all language vars through to worker (3.78 KB, patch)
2013-12-16 17:57 UTC, Ray Strode [halfline]
committed Details | Review

Description PatRiehecky 2013-09-30 15:04:58 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
Comment 1 Florian Müllner 2013-09-30 15:10:05 UTC
gnome-settings-daemon sets LC_* variables according to the settings in the Region & Language panel, reassigning.
Comment 2 Bastien Nocera 2013-09-30 15:19:14 UTC
We don't set LC_COLLATE at all.
Comment 3 Rui Matos 2013-10-01 14:57:38 UTC
From a quick look it seems that gdm is not passing this gnome-session.
Comment 4 Ray Strode [halfline] 2013-12-12 16:36:02 UTC
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.
Comment 5 Ray Strode [halfline] 2013-12-16 16:29:04 UTC
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.
Comment 6 Ray Strode [halfline] 2013-12-16 17:57:38 UTC
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
Comment 7 Ray Strode [halfline] 2013-12-16 20:10:30 UTC
Attachment 264311 [details] pushed as c672e4e - session: pass all language vars through to worker