[systemd-devel] [PATCH] [RFC]logind: set locale in user sessions

Lennart Poettering lennart at poettering.net
Thu Jan 3 12:52:46 PST 2013


On Wed, 02.01.13 12:46, Tom Gundersen (teg at jklm.no) wrote:

> Changes the pam module to now set the locale for user-sessions, similarly to
> what is done system-wide in PID1.
> 
> The logic is: the kernel command-line takes precedence, then
> XDG_CONFIG_HOME/locale.conf, then /etc/locale.conf and finally any legacy
> distro-specific files that might still be supported.
> 
> The parsing of the locale settings is split out of core/ and moved to shared/.
> 
> This is an important feature for Arch, as we traditionally set the system locale
> in all user sessions, so this means we can remove a work-around [0] and close some
> related bugs (e.g., [1]).


Hmm, I like this approach. Ther actually has been a TODO list item about
this for a while. However, a few questions:

a) This really sounds like something to discuss on xdg-devel. This
   probably deserves adoption by the desktop environments, much like
   .config/user-dirs.dirs. i.e. GNOME should really write that file when
   the user reconfigures the locale settings.

b) Maybe this is something to add to the PAM package upstream? That
   said, it would be kinda symmetric to /etc/locale.conf which we handle
   in systemd, so maybe not?

c) If we maintain it in systemd, maybe still split this off into its own
   pam module?

I am tempted to just merge the patch. The discussion on xdg-devel can
happen after we commited the code. In fact, moving that to PAM upstream
can happen at a later point too, if it is desirable...

Also, given that this code is a NOP if ~/.config/locale.conf doesn't
exist I think this is relatively straightforward to adopt...

Anybody else has opinions on this? Kay, Michal? Otherwise I'll just
merge it... Tom.  can you bring standardization of ~/.config/locale.conf
up on xdg-devel?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list