[systemd-devel] Setting the shell to the system locale
David Adam
zanchey at ucc.gu.uwa.edu.au
Wed Oct 14 23:18:04 PDT 2015
Hi,
I work on fish shell, which is a non-POSIX command-line shell. I'm
trying to work out whether we should ship something in our source that
tries to set the locale for our users. Alternatively, it might be
something that needs to be left to distributions as it seems to be handled
very differently.
Is /etc/locale.conf appropriate for consumption by clients other than
systemd - such as shells? That is, is the format stable? If not, is there
a way of querying the default system locale if there is no `LANG` (etc.)
set in the environment - through `localectl` or otherwise?
A broader question is: which process should be responsible for setting the
locale? Are the comments in the log message for 1640944a84 still
appropriate?
> Eventually we probably want to drop this again since the system locale
> should be read and set at one place, and not at multiple, and that one
> place should be PID 1.
I am not sure there is a good answer to this question, but I would be
interested in hearing about the rationale for the different approaches.
For example, Debian sets up PAM to source /etc/default/locale for all
sessions, while Fedora drops a script in /etc/profile.d for command-line
shells. Most graphical shells seem to use their own defaults.
Thanks
David Adam
zanchey at ucc.gu.uwa.edu.au
More information about the systemd-devel
mailing list