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

Yves-Alexis Perez corsac at debian.org
Thu Jan 16 09:01:21 UTC 2014


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

On Wed, Jan 15, 2014 at 07:29:02PM +0100, Simon Pepping wrote:
> 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.

Ok, so actually it /does/ use the system locale by default, which is a
rather good idea.
> 
> 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=

So the language selection from the greeter doesn't actually work here?
> 
> 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'

Honestly, I don't want to debug anything past .xsessionrc, this is
outside of lightdm scope and it's already complicated enough.

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

.dmrc is handled by lightdm, not the greeter. The greeter is only
involved in the language selector and username entry.
> 
> 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.

Again, it's lightdm itself that sets the LANG environment variable.
Either using the one from the user .dmrc (username obtained from the greeter when an
login  is entered) or the one from the locale selected in the greeter.

And .dmrc is also read/written by lightdm. Only the information itself
is passed from the daemon to the greeter and vice versa.
> 
> Note also that my session in .dmrc is reported as 'xfce', while I see
> in reports by other users 'lightdm-xsession'. 

The lightdm-xsession is just a default session file which hooks lightdm
to the Debian configured defaults (it just passes “default” to
/etc/X11/Xsession, which in turns use x-session-manager /
x-window-manager alternatives).

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

iQEcBAEBCgAGBQJS15/dAAoJEG3bU/KmdcCluvIH/0mlZzX4iPdjlqC1ctIczzot
Vgr8JkLz/W73Oqm5fh639qzvToYVzurkwNZnyDCwYlJfP99hOmDyR4Dl5F+M2v9w
nwbegWzM6say756humohu18QafTGc1szzfkrBwavI7XF5i5EUcGd+QiW1AIHblJ5
nnUSDw5hCRJs+cc6RUyt4+ZMXqTKX1Jfn+ENYFekPJIFO70mM1Uas8QAFGaw9euR
v1GybFgHug3TcssZKQN32EP7J/iOk0pANO7EcXdocEIO2PS8vpahGTVv6FkK5QN1
4826oVll1+vW0f5BVFYjtCO5wKUSTZRy85zEgTMc0GCgZvzBiPpQBxwWYIEiDno=
=I9A7
-----END PGP SIGNATURE-----



More information about the Pkg-xfce-devel mailing list