[Pkg-xfce-devel] Bug#735265: Bug#735251: lightdm: user locale tweaks are clobbered by non-default locale

Yves-Alexis Perez corsac at debian.org
Tue Jan 14 16:56:32 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Note: I'm replying to both bugs at once because they look quite the
same. I'm not merging them right now because that's not completely sure
either.

On Tue, Jan 14, 2014 at 12:40:01PM +0900, Olaf Meeuwissen wrote:
> Package: lightdm
> Version: 1.8.5-3
> Severity: normal
> 
> Dear Maintainer,
> 
> I have seen #690899, #691446 and #733261 but feel that my issue is not
> quite the same.  Hence a separate bug report.
> 
> I have a few locale tweaks in my ~/.xsessionrc (following comments found
> in /etc/X11/Xsession.d/40x11-common_xsessionrc).  The relevant bit of my
> customizations:
> 
>   export LANG=ja_JP.UTF-8
>   export LC_MESSAGES=en_GB.UTF-8
>   export LANGUAGE=${LC_MESSAGES}
> 
> This has been working great for me for several years.  After the recent
> upgrade of lightdm (from 1.6.3-1) the LANG setting got clobbered to the
> first enabled locale, i.c. aa_DJ.UTF-8, whereas the system default is C.
> 
> The system default locale and enabled locales have not been changed in
> a long time, nor has my .xsessionrc.  What might have played a role
> was me removing my ~/.dmrc at about the same point as the upgrade as
> part of a dot-file cleanup.  Changing its Language setting to the same
> value as the LANG setting in my ~/.xsessionrc fixed things for me.
> 
> I would expect the preselected locale for lightdm's locale selector to
> be the system default (or whatever is configured explicitly for that bit
> of lightdm functionality), not whichever of the enabled locales is
> listed first in /etc/locale.gen. 

Yeah, that's not really optimal indeed. Actually that's the case only
for the first startup after boot, and before an user is selected.

> The system default would then become
> the user's locale if a user does not have a ~/.dmrc file.  Also, I would
> expect any tweaks in a user's ~/.xsessionrc to take effect/precedence
> and not be clobbered by any locale functionality courtesy of lightdm.
> 
> That is to say, I would expect my LANG setting in ~/.xsessionrc to take
> precedence over whatever is (or ends up) in ~/.dmrc.  If I have nothing
> in my ~/.xsessionrc, I expect to end up with what is configured in
> /etc/default/locale.

Well that should be the case, actually.

The lightdm greeter will select a locale based on .dmrc if it exists,
but if the user chose another one in the menu, then it'll use that for
LANG. Then, at login, /etc/X11/Xsession is run, which in turns run-parts
the scripts in /etc/X11/Xsession.d and especially
40x11-common_xsessionrc, so whatever you put in .xsessionrc will take
precedence over previously set variables (and independantly of lightdm)

I repeat, by the time .xsessionrc is parsed, lightdm or the greeter
doesn't have a chance to do anything to modify the locale anymore.

On Tue, Jan 14, 2014 at 10:32:13AM +0100, Simon Pepping wrote:
> Package: lightdm-gtk-greeter
> Version: 1.6.1-5
> Severity: normal
> Tags: l10n
> 
> Dear Maintainer,
> 
> When I select my language once in the language selector, I want to be
> logged in with that language on all subsequent log-ins, until I select
> another language in the language selector. That does not happen. I am
> always logged with the language of the system-wide locale, unless I
> select a language in the language selector.
> 
> My language setting in ~/.xsessionrc is overwritten. Ideally, the
> language selector would have a option which leaves the setting in such
> a script unmodified.

As said above, that's the case. Also, I repeat, .xsessionrc and the
locale chooser in the lightdm greeters are *completely* unrelated, so
it's best to separate the test cases. .xsessionrc variables will
override whatever you set in the locale chooser, and you're then
responsible for the behavior.
> 
>    * What led up to the situation?
> 
> I select english in the language selector and log in. Language is
> english. I log out.
> 
> I make no selection in the language selector and log in. Language is
> dutch.
> 
>    * What outcome did you expect instead?
> 
> I expect that subsequent log-ins use the earlier selected language,
> i.e. english in my case.
> 
> Note that the locale setting below is the result of logging in with
> english as the selected language.
> 

In the end, I'm pretty confused by those two bug reports. It seems that
people are indeed confused by the lightdm/lightdm-gtk-greeter behavior
wrt. locales, but the reports I get are merely adding confusion, not
helping to reduce it.

In order to detect issues in LightDM/lightdm-gtk greeter, it'd help to:

- - not set anything locale related in .xsessionrc (since it'll just
  override whatever lightdm set)
- - provide the full output of `locales' (and maybe the content of
  $LANGUAGE too)

Regards,
- -- 
Yves-Alexis Perez
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBCgAGBQJS1Ww8AAoJEG3bU/KmdcCljv0H/344AH1xgEDGsn0Q88l1Y+4o
Jh02LahMnh2Pz8QNuxEuWL0/lZCD2M9obMkGq5voZ3dR3fONngg69HTmgD3s1Lc+
E4IpZlbHPHra5dCL5TdUT7wKJD5ynLuMcEUqbJVCNrUnCWtygrwqhPn2G9bd1PhY
IWqWksj0Sgb8OOenaTofGuXyW9m36Lb1nRAC+KZzDvz84T3Sbuy3LpSrF3s+WhUo
TnzNzBA3ElKzZlI4VNhzCDOksGHQr3uRlUDM4YyyM6dC5jg+2Dk20rRqJbo9Jd4l
iyndPbCHAxv14TqXSz1yedFmtr+EcJZ/ohsc5FsqAgbIEprjkjez0+1Fahofu6E=
=EBKG
-----END PGP SIGNATURE-----



More information about the Pkg-xfce-devel mailing list