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

Simon Pepping spepping at leverkruid.eu
Wed Jan 15 18:29:02 UTC 2014


On Tue, Jan 14, 2014 at 09:18:17PM +0100, Yves-Alexis Perez wrote:
> 
> So I think you should use export LANG= in the above .xsessionrc and it
> would correctly set the LANG in the child session.

Done

> 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.

I logged after having removed .dmrc and
/var/cache/lightdm/dmrc/simon.dmrc. It made no difference. I logged
with hide-users true and false. It made no difference. The language
selector is always at Dutch, which is the second entry in the list,
but the system-wide locale. It does not change when I select a
different user.

Herewith a few more data, reporting the locale before and after
.xsessionrc, and the lightdm logs.

Action: Select english in the language selector, log in.

1) Report of locale settings in .xsessionrc:

before .xsessionrc
LANG=nl_NL.UTF-8
LANGUAGE=
LC_CTYPE="nl_NL.UTF-8"
LC_NUMERIC="nl_NL.UTF-8"
LC_TIME="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"
LC_MONETARY="nl_NL.UTF-8"
LC_MESSAGES="nl_NL.UTF-8"
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=

after
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=nl_NL.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=nl_NL.UTF-8
LC_MESSAGES="en_US.UTF-8"
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=

export GDM_LANG='en_US.utf8'
export LANG='en_US.UTF-8'
export LANGUAGE='en'

2) locale settings in XFCE, after login:

LANG=en_US.utf8
LANGUAGE=en
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME=nl_NL.UTF-8
LC_COLLATE="en_US.utf8"
LC_MONETARY=nl_NL.UTF-8
LC_MESSAGES="en_US.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=

declare -x LANG="en_US.utf8"
declare -x LANGUAGE="en"

Note that GDM_LANG has disappeard, and that the output format of the
export command has changed, possibly due to different shells: dash for
.xsessionrc and bash in the X session.

3) lightdm log file

Note that this is not the first login

[+244.74s] DEBUG: Seat: Active display server stopped, starting greeter
[+244.74s] DEBUG: Seat: Creating greeter session
[+244.74s] DEBUG: Seat: Setting XDG_SEAT=seat0
[+244.74s] DEBUG: Seat: Creating display server of type x
[+244.74s] DEBUG: Seat: Starting local X display
[+244.74s] DEBUG: Using VT 7
[+244.74s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+244.74s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+244.74s] DEBUG: DisplayServer x-0: Launching X Server
[+244.74s] DEBUG: Launching process 4302: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+244.74s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+244.74s] DEBUG: Releasing VT 7
[+244.86s] DEBUG: Got signal 10 from process 4302
[+244.86s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+244.86s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+244.86s] DEBUG: Seat: Display server ready, starting session authentication
[+244.86s] DEBUG: Session: Setting XDG_VTNR=7
[+244.86s] DEBUG: Session pid=4307: Started with service 'lightdm-greeter', username 'lightdm'
[+244.88s] DEBUG: Session pid=4307: Authentication complete with return value 0: Success
[+244.88s] DEBUG: Seat: Session authenticated, running command
[+244.88s] DEBUG: Session pid=4307: Setting XDG_VTNR=7
[+244.88s] DEBUG: Session pid=4307: Running command /usr/sbin/lightdm-gtk-greeter
[+244.88s] DEBUG: Session pid=4307: Logging to /var/log/lightdm/x-0-greeter.log
[+244.90s] DEBUG: Activating VT 7
[+244.94s] DEBUG: Session pid=4307: Greeter connected version=1.8.5
[+245.31s] DEBUG: Session pid=4307: Greeter start authentication for simon
[+245.31s] DEBUG: Seat: Setting XDG_SEAT=seat0
[+245.31s] DEBUG: Session: Setting XDG_VTNR=7
[+245.31s] DEBUG: Session pid=4334: Started with service 'lightdm', username 'simon'
[+245.32s] DEBUG: Session pid=4334: Got 1 message(s) from PAM
[+245.32s] DEBUG: Session pid=4307: Prompt greeter with 1 message(s)
[+267.43s] DEBUG: Session pid=4307: Continue authentication
[+267.46s] DEBUG: Session pid=4334: Authentication complete with return value 0: Success
[+267.46s] DEBUG: Session pid=4307: Authenticate result for user simon: Success
[+267.47s] DEBUG: Session pid=4307: User simon authorized
[+267.47s] DEBUG: Session pid=4307: Greeter sets language en_US.utf8
[+267.48s] DEBUG: Writing /home/simon/.dmrc
[+267.56s] DEBUG: Session pid=4307: Greeter requests session xfce
[+267.57s] DEBUG: Writing /home/simon/.dmrc
[+267.63s] DEBUG: Seat: Stopping greeter; display server will be re-used for user session
[+267.63s] DEBUG: Session pid=4307: Sending SIGTERM
[+267.65s] DEBUG: Session pid=4307: Greeter closed communication channel
[+267.65s] DEBUG: Session pid=4307: Exited with return value 0
[+267.65s] DEBUG: Seat: Session stopped
[+267.65s] DEBUG: Seat: Greeter stopped, running session
[+267.65s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+267.65s] DEBUG: Session pid=4334: Setting XDG_VTNR=7
[+267.65s] DEBUG: Session pid=4334: Running command /etc/X11/Xsession startxfce4
[+267.65s] DEBUG: Session pid=4334: Logging to .xsession-errors
[+267.67s] DEBUG: Activating VT 7

lightdm-gtk-greeter log:

(lightdm-gtk-greeter:4316): GLib-CRITICAL **: g_shell_parse_argv: assertion `command_line != NULL' failed

** (lightdm-gtk-greeter:4316): WARNING **: Failed to open sessions directory: Fout bij openen van map ‘/usr/share/lightdm/sessions’: Bestand of map bestaat niet

** (lightdm-gtk-greeter:4316): WARNING **: Failed to open sessions directory: Fout bij openen van map ‘/usr/share/lightdm/remote-sessions’: Bestand of map bestaat niet

** (lightdm-gtk-greeter:4316): WARNING **: Failed to load user image: Openen van bestand ‘/home/simon/.face’ mislukt: Bestand of map bestaat niet

End of reports

Note that the greeter writes to .dmrc but does not report reading from
it.

I have the strong impression that the greeter does not set LANG but
writes it to .dmrc, from which it is read and set in the session at a
later stage, after .xsessionrc was run.

Note also that my session in .dmrc is reported as 'xfce', while I see
in reports by other users 'lightdm-xsession'. 



More information about the Pkg-xfce-devel mailing list