KDM can't use language choosen in systemsettings

Bug #298592 reported by Mario Italo
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KDE Base
Unknown
Medium
kdebase-workspace (Ubuntu)
Fix Released
High
Unassigned

Bug Description

If I change the language for KDM on systemsettings, it doesn't works.
KDM always appears in english, unless I manually restart KDM from command line, then it shows up with the language I had set in systemsettings.
I'm using Kubuntu Intrepid. Same happens with KDM 4.1.2 and with 4.1.3 (from backport).
From the log, I saw that message:

kdm_greet[8486] Cannot set locale. Translations will not work.

Revision history for this message
In , Dmitriy Altuhov (altuhovsu) wrote :

Version: (using KDE 4.0.5)
Installed from: Ubuntu Packages

In the systemsettings - Advanced - Login
Manager I've set the langauage Russian (ru). In the
kdmrc I've got:

...
Language=ru
...

The login manager kdm shows me the user list (because
of the setting: UseTheme=false), but every label on
the screen, buttons and combo-list is in English and
not in Russian, as I set (Language=ru).

In the syslog I see:

kdm_greet[5063]: Cannot set locale. Translations will not work.

But!
If I login in console and execute

sudo service kdm-kde4 restart

After that all in login windows translated to Russian!

Why after Ubuntu bootup I see English and after manual restart kdm-kde4 i see Russian?

Revision history for this message
In , Z-michalm (z-michalm) wrote :

I confirm that on KDE 4.1 (Archlinux). KDM displays English strings instead of Polish translation.

My configuration:
Language=pl
UseTheme=true

kdm.log says:
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
> Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
kdmgreet(3808) KLocalePrivate::initEncoding: Cannot resolve system encoding, defaulting to ISO 8859-1.

Mario Italo (marioitalo)
description: updated
Revision history for this message
nh2 (nh2) wrote :

Confirmed. Using Kubuntu 8.10.

Changed in kdebase-workspace:
status: New → Confirmed
Revision history for this message
Cyril Buquet (cyril11) wrote :

Confirmed. Using Kubuntu 8.10 with 4.1.3

Revision history for this message
Javier Jardón (jjardon) wrote :

Confirmed. Using Kubuntu 8.10 with 4.2beta (from PPA)

Revision history for this message
Cyril Buquet (cyril11) wrote :

There are a bug open here :
http://bugs.kde.org/show_bug.cgi?id=164311

If i restart kdm, translation work.

Revision history for this message
In , Cyril Buquet (cyril11) wrote :

Hello

Confirmed on kubuntu 8.10 kde with 4.1.3

You can see https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/298592

Revision history for this message
fsw (fredscali) wrote :

Hi,

I've had the same "kdm_greet..." error concerning locales & translations with the last PC-BSD & KDE 4.1.3, even if here the language of the system (chosen at install time) is working well in French (fr_FR.UTF-8).

But it's now gone after modifying the file kdmrc as follow:

# Greeter config for all displays
[X-*-Greeter]
...
Language=fr_FR.UTF-8

and the login screen is now also in French!

Don't know if this help in Kubuntu, because it really just concern KDM, the login screen and not the whole KDE...

For the other bug, it's perhaps a UTF8 problem, as they just use pl & ru, not the UTF-8 ones?

Good luck.
FSW

Revision history for this message
Cyril Buquet (cyril11) wrote :

Hello

Thank you. This solution is correct for kubuntu.

Revision history for this message
In , fsw (fredscali) wrote :

Hi,

I've had the same "kdm_greet..." error concerning locales & translations with the last PC-BSD & KDE 4.1.3, even if here the language of the system (chosen at install time) is working well in French (fr_FR.UTF-8).

But it's now gone after modifying the file kdmrc as follow:

# Greeter config for all displays
[X-*-Greeter]
...
Language=fr_FR.UTF-8

and the login screen is now also in French!

Have you tried to put in kdmrc pl_PL.UTF-8 and ru_RU.UTF-8 because I think it could be that Kubuntu uses UTF-8 charset by default?

Good luck.
FSW

Revision history for this message
In , Cyril Buquet (cyril11) wrote :

Hello,

I confirm that this solution work for me
(kubuntu 8.10 - kde 4.1.3 )

Thanks

Revision history for this message
In , Z-michalm (z-michalm) wrote :

I can confirm that both solutions:
Language=pl_PL.UTF-8
or
Language=pl_PL.utf8
work for me. My system locale is set to "pl_PL.utf8". But still, this should be detected automatically if "Language" option is not specified in the "kdmrc" file.

Changed in kdebase:
status: Unknown → New
Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

Can anyone else check if this is still a problem using a devel version of KDE( 4.2beta2 / 4.2svn) ? Thanks :)

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 179880 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Javier Jardón (jjardon) wrote :

Yes, same problem here with Kubuntu and KDEbeta2 packages

Revision history for this message
In , Cyril Buquet (cyril11) wrote :

Confirmed on kubuntu 9.04 alpha / kde 4.2 beta

Revision history for this message
Cyril Buquet (cyril11) wrote :

Hello,

On an suggestion of FSW, i downloaded openSuse 11.1
After an installation (virtualbox), with KDE, i obtain the KDM screen ... in french.

After some test, i can see that the /etc/init.d/xdm script make an export of some language parameter.

For my first test, I have added into /etc/init.d/kdm on kubunt 9.04 alpha (virtualbox) one line :
export LANG="fr_FR.UTF-8"
(kdmrc have Language=fr)

After reboot, kdm is in french.

Next, i have tested on kubuntu 8.10, with kde 4.1.3 from ppa.
I have added the following line into the begin of /etc/init.d/kdm :
> # Need to export LANG for language into kdm
> var=$(grep "^LANG=" /etc/environment)
> eval $var
> unset var
> export LANG

Reboot, and it's work. kdmrc contain Language=fr.

Now, we know the origin of this bug.

May be people working on kubuntu 9.10 can see the openSuse xdm script for this part. The solution is more complete, and check the other LANG parameter.

Have a nice Day
Cyril Buquet

Revision history for this message
In , Cyril Buquet (cyril11) wrote :

Hi,

After a very good suggestion of Fred Scali-West, i have make some test with openSuse 11.1. kdm is directly in french after the end of installation.

After some test :
if the script that launch kdm don't export LANG, kdm can't use it.

on kubuntu, it's /etc/init.d/kdm
on openSuse, it's /etc/init.d/xdm

May be add a Warning into kdm.log if useful Language environnement are not set ?

I have added some kubuntu information here :
https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/298592

Have a nice day
C. Buquet

Revision history for this message
Steve Stalcup (vorian) wrote :

thanks Cyril!

Changed in kdebase-workspace:
assignee: nobody → vorian
status: Confirmed → In Progress
Revision history for this message
Cyril Buquet (cyril11) wrote :

Other solution with /etc/default/locale :

while read var; do eval "export $var"; done < /etc/default/locale; unset var

Steve Stalcup (vorian)
Changed in kdebase-workspace:
importance: Undecided → High
Revision history for this message
In , fsw (fredscali) wrote :

Created attachment 30182
code to let kdm using "lang=" var non US pcbsd

code to get kdm using "lang=" var correctly on PCBSD when non US, by looking in system locales defined by user in /etc/login.conf with a default kdmrc val of # Default is ""
Language=

Without it, you need to write per hand
Language=fr_FR.UTF-8 in kdmrc for French users, which is a real party-killer for newcomers from other OS's IMHO....

Revision history for this message
In , fsw (fredscali) wrote :

Oups, I've made a wrong manipulation sorry...

with the help of Cyril who find this solution for Kubuntu, inspired by OpenSuse (from Germany) [https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/298592]
I've get it to work on PCBSD, using the system settings in /etc/login.conf and the default val of:

# Default is ""

Language=
in kdmrc.
You need just to modify the /usr/local/kde4/bin/kdm the way we've made it and reboot, that's all it works =:)

Can somebody test / comment it and tell what's next with this solution?

Greetings
FSW

Revision history for this message
In , fsw (fredscali) wrote :

Created attachment 30183
french kdm in a Xnest Windows inside KDE 4.1.3, get from login.conf

Images speaks louder than Words =;)
kdm in french, without the need of including manually fr_FR.UTF-8 in kdmrc, but by getting it from /etc/login.conf in PCBSD, the way OpenSuse already (and Kubuntu soon may) do it for non US / UK users.

Greetings.
FSW

Revision history for this message
In , fsw (fredscali) wrote :

Created attachment 30184
plain text modified kdm script

Sorry these are my first attachments on kde.bugs, so I don't know if I have to choose Content Type patch or plain txt, anyway here is the modifed kdm script as plain text.

Greetings,
FSW

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdebase-workspace - 4:4.1.96-0ubuntu1

---------------
kdebase-workspace (4:4.1.96-0ubuntu1) jaunty; urgency=low

  [ Steve Stalcup ]
  * New upstream release
  * Patches Removed completely:
    - kubuntu_18_kubuntu_homepage.diff
  * Updated the following .install files:
    + kdebase-workspace-bin.install
    + kdebase-workspace-data.install
    + kdebase-workspace-dev.install
    + kdebase-workspace-libs4+5.install
    + kdebase-workspace-wallpapers.install
    + python-plasma.install
  * Updated 'not-installed' file to reflect items intentionally not installed
  * Bumped build-deps versions
  * Updated debian/rules versions
  * Modified kdm.init for locales support (LP: #298592)

  [ Harald Sitter ]
  * Add kubuntu_12_kubuntu_homepage.diff as replacement for
    kubuntu_18_kubuntu_homepage.diff. Even though the branding now supports
    configuration via the metadata.desktop file we can't use it because then
    it would only apply if the default theme is used. We want to have it apply
    to every theme without manually set URL (by theme creator for example).

 -- Harald Sitter <email address hidden> Sun, 11 Jan 2009 15:50:28 +0100

Changed in kdebase-workspace:
status: In Progress → Fix Released
Revision history for this message
Javier Jardón (jjardon) wrote :

This bug is not resolved in jaunty. Using Kubuntu 9.04 alpha5

Changed in kdebase-workspace:
status: Fix Released → New
Steve Stalcup (vorian)
Changed in kdebase-workspace:
assignee: vorian → nobody
Revision history for this message
Harald Sitter (apachelogger) wrote :

It is.
When you reopen a bug, please exactly state what makes you think that it is not fixed.

I just did a fresh install of today's 9.04 and KDM greets in german for me.

Changed in kdebase-workspace (Ubuntu):
status: New → Fix Released
Revision history for this message
In , Onyx-v (onyx-v) wrote :

I confirm that bug for kdm in FreeBSD 7-Stable. I have real user name in /etc/passwd in koi8-r encoding and it displays in kdm userlist with multiple '?' signs. With default Language and with Language=ru_RU.UTF-8 in kdmrc. I think kdm-bin should check `locale` output first, and than print real user name with appropriate encoding.
Why this bug stays unconfirmed for so long?

Revision history for this message
In , Onyx-v (onyx-v) wrote :

Everything is ok now. Just set Language=ru_RU.KOI8-R or your encoding.

Revision history for this message
In , Zersaa (zersaa) wrote :

Same problem here. Archlinux, KDE 4.3.0

Changed in kdebase:
importance: Unknown → Medium
Revision history for this message
In , Oswald Buddenhagen (ossi-kde) wrote :

apparently the magic in kde-workspace/kdm/kfrontend/kgapp.cpp:324 ff. is insufficient. i have no idea how to deal with that.

Revision history for this message
In , Chusslove Illich (caslav-ilic) wrote :

By removing the said magic altogether?

If LANG or LC_ALL are not set to an existing system locale, or are set to C
or POSIX, then the program should show no translation no matter any language
choice elsewhere. This behavior is even POSIX-mandated.

It is distro's installation and startup business to make sure an existing
system locale is set before the login manager is started. On Debian, for
example, the installer asks what will be the default system locale; /etc/rc*
scripts for KDM (and GDM, etc) source the file /etc/default/locale, which
contains only the line LANG=<some_locale>.

So, this report should be closed with status ANTIRESOLVED (i.e. made worse
than before, to force the fix where the fix is due).

Changed in kde-baseapps:
status: New → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.