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 649413 - System default locale is ignored
System default locale is ignored
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-04 21:50 UTC by Josselin Mouette
Modified: 2011-06-14 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Only set GDM_LANG, not LANG (846 bytes, patch)
2011-05-04 21:50 UTC, Josselin Mouette
none Details | Review
daemon: don't set LANG to empty value (2.28 KB, patch)
2011-06-14 00:34 UTC, Ray Strode [halfline]
committed Details | Review

Description Josselin Mouette 2011-05-04 21:50:32 UTC
Created attachment 187242 [details] [review]
Only set GDM_LANG, not LANG

When logging in without a default locale configured, the system default (in Debian, set by a pam_env entry) is ignored.

This is because LANG is set in setup_session_environment, overriding anything that could have been set by PAM even when the result is empty. The patch removes the LANG setting; GDM_LANG is enough, since the Xsession script will set LANG based on it.
Comment 1 Ray Strode [halfline] 2011-05-16 15:27:25 UTC
Is this problem gone now that

http://git.gnome.org/browse/gdm/commit/?id=35f9ce03c26a42856e9246c5995334c09e88ff86

has landed?
Comment 2 Josselin Mouette 2011-05-18 19:06:20 UTC
I haven’t checked all changes between 2.30 and 3.0, but I would suspect the problem is *here* now that this commit has landed :)

(I wanted to specify 3.0 as version but it doesn’t appear in the list.)
Comment 3 Ray Strode [halfline] 2011-05-18 19:10:01 UTC
ah maybe we should revert the commit then?  We landed it because it fixed a FIXME but not because it fixed a real problem.
Comment 4 Josselin Mouette 2011-05-18 20:06:53 UTC
I’m not sure the patch is wrong, but from what I understand variables now always override values set by PAM modules.

Other possible fixes would be to either:
 - always set LANG (at least to the value the greeter has) instead of leaving it empty when accountsservice returns no language set;
 - simply not set LANG if it’s empty (but not setting it works too since we already have this logic in Xsession).
Comment 5 Ray Strode [halfline] 2011-05-18 20:25:42 UTC
(In reply to comment #4)
> I’m not sure the patch is wrong, but from what I understand variables now
> always override values set by PAM modules.
 
well it sounds like it's more like variables "underride" values set by PAM.  We set LANG in the pam environment before pam_env runs, so that pam module chooses not to override it.

You could fix this by using OVERRIDE in the pam_env config, but we probably should get the behavior right in GDM.


> Other possible fixes would be to either:
>  - simply not set LANG if it’s empty (but not setting it works too since we
> already have this logic in Xsession).
Yea, so if you look at get_welcome_environment that's exactly what we.  We should copy that logic into setup_session_environment, I guess.
Comment 6 Ray Strode [halfline] 2011-06-14 00:34:51 UTC
Created attachment 189861 [details] [review]
daemon: don't set LANG to empty value

This makes PAM not set it to a proper value later.