Re: SDDM starts in wrong locale, correct one after restart
Reply #2 –
Okay, after some additional investigation, I found a bugfix/workaround:
Gentoo starts SDDM a bit more complicated. There's an init script /etc/init.d/display-manager, which can start different display managers (SDDM, LightDM, xdm etc.). At one point, it calls /usr/bin/startDM, which sources /etc/profile.env. This is a file containing all kinds of environment variables which is not present on Artix; but it contains export LANG='de_DE.utf8' on my Gentoo machine.
My (Artix) /etc/locale.conf contains export LANG="de_DE.utf8". So I tried to source this file from within the SDDM init script. Et voilà: SDDM starts in German :-)
The following patch made it work:
--- sddm.orig 2022-07-27 13:31:20.221902730 +0200
+++ sddm 2022-07-27 13:23:28.341797921 +0200
@@ -3,6 +3,8 @@
supervisor=supervise-daemon
command="/usr/bin/sddm"
+. /etc/locale.conf
+
depend() {
need localmount
One could also add a check to make it fail-proof via e.g.
[ -e /etc/locale.conf ] && . /etc/locale.conf
or such.
Maybe you want to fix this?