View previous topic :: View next topic |
Author |
Message |
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 205
|
Posted: Sun Sep 06, 2015 3:59 pm Post subject: How to set localization of SDDM login screen? |
|
|
I upgrade to Plasma 5 (KDE 5) and now have SDDM as the login manager. I can apply a theme to it (through the KCM 5 control panel) but how do I set the localization?
Interestingly, as soon as a user has logged in and locks its session, the lock screen is localized to German (because this is the locale of the user) but on start-up the login screen is in English. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Sun Sep 06, 2015 5:27 pm Post subject: |
|
|
you mean this ? Code: | # cat /etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
Option "XkbLayout" "de"
Option "XkbOptions" "nodeadkeys"
EndSection
|
|
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 205
|
Posted: Sun Sep 06, 2015 5:52 pm Post subject: |
|
|
No, keyboard layout is fine. It is already German. I mean the language and localization settings. The login screen should say "Herunterfahren" instead of "Shut down", "Benutzer wechseln" instead of "New user session", and so on. The clock should display the time in 24-hour-format instead of 12-hour-am/pm-format and so on.
SDDM shows the correct German localization if it is used as a lock screen for a user session that has German localization. So the language files must be there. It cannot be a missing package. But SDDM switches to English localization if no user is logged in. This is the case right after boot before anybody has logged in or after the last user has logged out. |
|
Back to top |
|
|
papu l33t
Joined: 25 Jan 2008 Posts: 709 Location: Sota algun pi o alzina...
|
Posted: Mon Sep 07, 2015 8:47 am Post subject: |
|
|
nagmat84 wrote: | No, keyboard layout is fine. It is already German. I mean the language and localization settings. The login screen should say "Herunterfahren" instead of "Shut down", "Benutzer wechseln" instead of "New user session", and so on. The clock should display the time in 24-hour-format instead of 12-hour-am/pm-format and so on.
SDDM shows the correct German localization if it is used as a lock screen for a user session that has German localization. So the language files must be there. It cannot be a missing package. But SDDM switches to English localization if no user is logged in. This is the case right after boot before anybody has logged in or after the last user has logged out. |
i have the same problem sddm don't catch my ca_ES.utf8 but in lock screen is fine the locale
https://tinyurl.com/o4aulae
_________________ "~amd64" --cpu 7700 non-x --DDR5 2x16GB 6000MHz --gpu RX 470 |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Mon Sep 07, 2015 10:16 am Post subject: Re: How to set localization of SDDM login screen? |
|
|
nagmat84 wrote: | I upgrade to Plasma 5 (KDE 5) and now have SDDM as the login manager. I can apply a theme to it (through the KCM 5 control panel) but how do I set the localization?
Interestingly, as soon as a user has logged in and locks its session, the lock screen is localized to German (because this is the locale of the user) but on start-up the login screen is in English. |
Are you having the locale settings in ~/.bashrc or in /etc/env.d/02localeSetting? |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 205
|
Posted: Mon Sep 07, 2015 5:16 pm Post subject: |
|
|
Yes, I have user-defined locale settings in the home directory, i.e. ~/.bashrc for shells and in ~/.xinitrc for X. I have not set a global locale through /etc/env.d/20locale or more precisely /etc/env.d/20locale set the character encoding to UTF-8 such that file names and other stuff is displayed correctly but it does not set anything else.
In the past I was used to set a global locale through /etc/env.d/20locale but I abstain from that nowadays, because I experienced to many failing applications/scripts. For example, if a script parses the output of something and this something inserts a "," (comma) or a "." (point) into a number to separate the thousands, then many scripts fail, because they expect "plain" numbers. I know there are many web pages that recommend to set a global locale, but I am out of it. It caused too much trouble and strange behaviour in the past. So I only set LC_ALL="C.UTF-8" on a global level to get the character encoding right, but do not do any formatting beyond that. LC_ALL="C.UTF-8" is also the system default by Debian for the very same reason. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Mon Sep 07, 2015 6:52 pm Post subject: |
|
|
nagmat84 wrote: | Yes, I have user-defined locale settings in the home directory, i.e. ~/.bashrc for shells and in ~/.xinitrc for X. I have not set a global locale through /etc/env.d/20locale or more precisely /etc/env.d/20locale set the character encoding to UTF-8 such that file names and other stuff is displayed correctly but it does not set anything else. |
So if the system does not have a global language set, but only per user. How then should your application receive a user independant language information? Does it use LINGUAS? |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 205
|
Posted: Fri Sep 11, 2015 7:36 pm Post subject: |
|
|
No, it does not seem to use LINGUAS. My hope was that there is a (perhaps undocumented) setting in /etc/sddm.conf that selects a GUI language independent of the system locale. (The same way as one can set the language of most desktop environments independent of any LC_* environment variable.)
At the moment I am considering to patch the /usr/lib/systemd/system/sddm.service file. Each of systemd's startup scripts has an entry that can point to a file that contains environment variables to set/unset. This way I can select a locale that only applies to SDDM but leaves the rest of the system unaffected. But patching /usr/lib/systemd/system/sddm.service in not a very clever idea, because it will be overwritten during the next update. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sat Sep 12, 2015 5:20 am Post subject: |
|
|
nagmat84 wrote: | But patching /usr/lib/systemd/system/sddm.service in not a very clever idea, because it will be overwritten during the next update. |
If the ebuild supported epatch_user you could apply user patches, see https://wiki.gentoo.org/wiki//etc/portage/patches. |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 205
|
Posted: Sun Sep 13, 2015 12:04 pm Post subject: |
|
|
There are several ways to set the locale being used by SDDM without patching anything and without modifying the global system locale. You can use any of the files
- /etc/X11/xinit/xinitrc.d/02-locale
- /usr/share/sddm/scripts/Xsetup
and put the following code into it
Code: |
export LANG="de_DE.UTF-8"
export LC_ALL="de_DE.UTF-8"
export GDM_LANG="de_DE.UTF-8"
export LANGUAGE="de:en"
|
However, the SDDM is still in English. The real reason is there is just no other localization than English, i.e. nobody made the effort to write the localization files. (Or they exist, but are not included by Gentoo. I do not know.)
The true reason, why the lock screen is localized while a user is logged in, is that it is a totally different application that just happens to look like SDDM. Actually, the lock screen is ksmserver and both SDDM and ksmserver use the same QML for styling. Surprisingly, ksmserver is localized but SDDM is not. So, for a while there is nothing what can be done about an English log in screen at least from a user's perspective. It would be nice to know, if other distributions have a localized version of SDDM. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
|
Back to top |
|
|
|