Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to set localization of SDDM login screen?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 116

PostPosted: Sun Sep 06, 2015 3:59 pm    Post subject: How to set localization of SDDM login screen? Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3647
Location: Hamburg

PostPosted: Sun Sep 06, 2015 5:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 116

PostPosted: Sun Sep 06, 2015 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
papu
Guru
Guru


Joined: 25 Jan 2008
Posts: 599
Location: Sota algun pi o alzina...

PostPosted: Mon Sep 07, 2015 8:47 am    Post subject: Reply with quote

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
:roll:
_________________
--Intel i5 6600 --GA-Z170-HD3P --Ripjaws V 2x8 2400 --Radeon RX 470 G1 4G --Gentoo & Windows
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Mon Sep 07, 2015 10:16 am    Post subject: Re: How to set localization of SDDM login screen? Reply with quote

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
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 116

PostPosted: Mon Sep 07, 2015 5:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Mon Sep 07, 2015 6:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 116

PostPosted: Fri Sep 11, 2015 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Sep 12, 2015 5:20 am    Post subject: Reply with quote

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
View user's profile Send private message
nagmat84
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2007
Posts: 116

PostPosted: Sun Sep 13, 2015 12:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Mon Sep 14, 2015 5:39 am    Post subject: Reply with quote

nagmat84 wrote:
It would be nice to know, if other distributions have a localized version of SDDM.
Did you check https://github.com/sddm/sddm/wiki/Localization?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum