#791396 slim: /etc/X11/Xsession.d/20slim_locale overrides pam locale configuration

Package:
slim
Source:
slim
Description:
desktop-independent graphical login manager for X11
Submitter:
Date:
2020-12-26 00:00:03 UTC
Severity:
normal
#791396#5
Date:
2015-07-04 10:15:52 UTC
From:
To:
Package: slimVersion: 1.3.6-4
I tried to set up my system so that I would have a different locale in X11 than at the console, following the instructions in the Debian reference manual:
https://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_specific_locale_only_under_x_window
Specifically, created a separate /etc/default/locale-x file and modified /etc/pam.d/slim to point to it:
 auth required pam_env.so readenv=1-auth required pam_env.so readenv=1 envfile=/etc/default/locale+# use separate locale config file for X11+auth required pam_env.so readenv=1 envfile=/etc/default/locale-x #auth sufficient pam_thinkfinger.so
Unfortunately, when I tried to log in, it didn't work, I still got the system locale specified in /etc/default/locale instead.
I think the cause is the /etc/X11/Xsession.d/20slim_locale file. It seems this was introduced to fix https://bugs.debian.org/440862 at the same time that pam support was integrated (1.3.0-1).
I think that the /etc/X11/Xsession.d/20slim_locale file is actually unnecessary; the pam_env.so line in /etc/pam.d/slim should already take care of importing the locale settings.
If I remove/comment out /etc/X11/Xsession.d/20slim_locale, everything works as expected, i.e. the X session has the locale specified in /etc/default/locale-x.

#791396#10
Date:
2015-07-04 10:43:32 UTC
From:
To:
Control: reassign -1 slim 1.3.6-4
 
Sorry, plain text version of bug report is garbled.
Please see html version:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=791396;msg=5
 

#791396#19
Date:
2020-12-25 23:56:34 UTC
From:
To:
Hi,

I can add that the current mechanism realised in 20slim_locale script also overrides
the user-level locale settings in ~/.profile, because the X session scripts initiated
by the login command defined in slim.conf are run after the login bash shell executes
~/.profile.

This situation is backward because the user locale settings in ~/.profile should take
priority over the system-wide settings.

BR,

Stanislav