[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 20:18:17 UTC 2014


On Tue, Jan 14, 2014 at 08:43:30PM +0100, Simon Pepping wrote:
> Trying to do that; this is my report:

Thanks.

> The locales below were obtained in emacs in XFCE, thus excluding bash
> startup files, even though these do not contain locale settings.

I think I'd have prefered in bash, but I assume you're definitely sure
emacs doesn't gets in the way.

> 
> The following tests were done without ~/.xsessionrc.

Ok.
> 
> Test 1. Log in without changing the language in the language selector:
> 
> locale (this is the system-wide locale):
> 
> LANG=nl_NL.utf8
> LANGUAGE=
> LC_CTYPE="nl_NL.utf8"
> LC_NUMERIC="nl_NL.utf8"
> LC_TIME="nl_NL.utf8"
> LC_COLLATE="nl_NL.utf8"
> LC_MONETARY="nl_NL.utf8"
> LC_MESSAGES="nl_NL.utf8"
> LC_PAPER="nl_NL.utf8"
> LC_NAME="nl_NL.utf8"
> LC_ADDRESS="nl_NL.utf8"
> LC_TELEPHONE="nl_NL.utf8"
> LC_MEASUREMENT="nl_NL.utf8"
> LC_IDENTIFICATION="nl_NL.utf8"
> LC_ALL=

This one puzzles me a little. I don't think it's the first one in the
locale selector list (which gets selected by default if nothing else is
selected), unless the ordering itself is different in nl_NL?
> 
> ~/.dmrc:
> 
> [Desktop]
> Language=nl_NL.utf8
> Session=xfce

Did .dmrc existed *before* the test? If so, that explains why
LANG=nl_NL.utf8
> 
> Test 2. Log in with changing the language in the language selector to
> english - USA:
> 
> locale:
> 
> LANG=en_US.utf8
> LANGUAGE=
> LC_CTYPE="en_US.utf8"
> LC_NUMERIC="en_US.utf8"
> LC_TIME="en_US.utf8"
> LC_COLLATE="en_US.utf8"
> LC_MONETARY="en_US.utf8"
> LC_MESSAGES="en_US.utf8"
> LC_PAPER="en_US.utf8"
> LC_NAME="en_US.utf8"
> LC_ADDRESS="en_US.utf8"
> LC_TELEPHONE="en_US.utf8"
> LC_MEASUREMENT="en_US.utf8"
> LC_IDENTIFICATION="en_US.utf8"
> LC_ALL=
> 
> ~/.dmrc
> 
> [Desktop]
> Language=en_US.utf8
> Session=xfce

That's consistent.
> 
> Test 3. Log in without changing the language in the language selector:
> 
> locale:
> 
> LANG=nl_NL.utf8
> LANGUAGE=
> LC_CTYPE="nl_NL.utf8"
> LC_NUMERIC="nl_NL.utf8"
> LC_TIME="nl_NL.utf8"
> LC_COLLATE="nl_NL.utf8"
> LC_MONETARY="nl_NL.utf8"
> LC_MESSAGES="nl_NL.utf8"
> LC_PAPER="nl_NL.utf8"
> LC_NAME="nl_NL.utf8"
> LC_ADDRESS="nl_NL.utf8"
> LC_TELEPHONE="nl_NL.utf8"
> LC_MEASUREMENT="nl_NL.utf8"
> LC_IDENTIFICATION="nl_NL.utf8"
> LC_ALL=
> 
> ~/.dmrc:
> 
> [Desktop]
> Language=nl_NL.utf8
> Session=xfce

Here's there a problem. If you don't touch the language selector,
lightdm-gtk-greeter should pick the one from the user .dmrc when the
username is entered (or is selected in the user list). It might be worse
checking the .dmrc from outside X before entering the username, just to
be sure.
> 
> Test 4. Log in with changing the language in the language selector to
> english - USA (just to select english for the next test):
> 
> locale:
> 
> LANG=en_US.utf8
> LANGUAGE=
> LC_CTYPE="en_US.utf8"
> LC_NUMERIC="en_US.utf8"
> LC_TIME="en_US.utf8"
> LC_COLLATE="en_US.utf8"
> LC_MONETARY="en_US.utf8"
> LC_MESSAGES="en_US.utf8"
> LC_PAPER="en_US.utf8"
> LC_NAME="en_US.utf8"
> LC_ADDRESS="en_US.utf8"
> LC_TELEPHONE="en_US.utf8"
> LC_MEASUREMENT="en_US.utf8"
> LC_IDENTIFICATION="en_US.utf8"
> LC_ALL=
> 
> ~/.dmrc:
> 
> [Desktop]
> Language=en_US.utf8
> Session=xfce

This one is ok.
> 
> Test 5:
> 
> Restore ~/xsessionrc:

I hope you mean ~/.xsessionrc?
> 
> # . /etc/profile
> # . ~/.bash_profile
> 
> LANG="en_US.UTF-8"
> export LC_MONETARY="nl_NL.UTF-8"
> export LC_PAPER="nl_NL.UTF-8"
> export LC_MEASUREMENT="nl_NL.UTF-8"
> export LC_TIME="nl_NL.UTF-8"
> export LC_NAME="nl_NL.UTF-8"
> export LC_ADDRESS="nl_NL.UTF-8"
> export LC_TELEPHONE="nl_NL.UTF-8"
> export LC_IDENTIFICATION="nl_NL.UTF-8"
> export LANGUAGE=en
> 
> Log in without changing the language in the language selector:

Before sourcing .xsessionrc, I assume the situation is the same as Test
3, so locales should be:

> LANG=nl_NL.utf8
> LANGUAGE=
> LC_CTYPE="nl_NL.utf8"
> LC_NUMERIC="nl_NL.utf8"
> LC_TIME="nl_NL.utf8"
> LC_COLLATE="nl_NL.utf8"
> LC_MONETARY="nl_NL.utf8"
> LC_MESSAGES="nl_NL.utf8"
> LC_PAPER="nl_NL.utf8"
> LC_NAME="nl_NL.utf8"
> LC_ADDRESS="nl_NL.utf8"
> LC_TELEPHONE="nl_NL.utf8"
> LC_MEASUREMENT="nl_NL.utf8"
> LC_IDENTIFICATION="nl_NL.utf8"
> LC_ALL=

Then .xsessionrc is sourced. LANG is set to en_US.UTF-8, but only for
the current shell. LC_ variables are set to nl_NL.UTF-8 (which they
already are) and exported. Then LANGUAGE is set to en and exported to
the environment, so we get:
> 
> LANG=nl_NL.utf8
> LANGUAGE=en
> LC_CTYPE="nl_NL.utf8"
> LC_NUMERIC="nl_NL.utf8"
> LC_TIME=nl_NL.UTF-8
> LC_COLLATE="nl_NL.utf8"
> LC_MONETARY=nl_NL.UTF-8
> LC_MESSAGES="nl_NL.utf8"
> LC_PAPER=nl_NL.UTF-8
> LC_NAME=nl_NL.UTF-8
> LC_ADDRESS=nl_NL.UTF-8
> LC_TELEPHONE=nl_NL.UTF-8
> LC_MEASUREMENT=nl_NL.UTF-8
> LC_IDENTIFICATION=nl_NL.UTF-8
> LC_ALL=
> 
> ~/.dmrc:
> 
> [Desktop]
> Language=nl_NL.utf8
> Session=xfce

Same as Test 4, which is wrong but consistent here.

So I think you should use export LANG= in the above .xsessionrc and it
would correctly set the LANG in the child session.

Now, I have no idea why the saved .dmrc is not correctly loaded for you,
it might help to look at lightdm and lightdm-gtk-greeters logs.

For what it's worth, I think I use more or less the same setup as you:
my main locale is fr_FR.UTF-8 (so I chose that in lightdm locale
selector and it's saved in .dmrc). Then I wan't the text messages in
english, so I only do that in .xsessionrc:

export LC_MESSAGES=en_US.UTF-8

and I get:

LANG=fr_FR.utf8
LANGUAGE=
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=

Regards,
-- 
Yves-Alexis Perez
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20140114/b2e73143/attachment.sig>


More information about the Pkg-xfce-devel mailing list