Display language not set properly in Lubuntu

Bug #857326 reported by Bernard Decock
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LXDE
Invalid
Undecided
Unassigned
lxdm (Ubuntu)
Undecided
Gunnar Hjalmarsson

Bug Description

Addition derived from the conclusions of the discussion below
-------------------------------------------------------------
In Ubuntu, the environment variables LANGUAGE and LC_MESSAGES are used to denote the display language, while LANG holds a locale name that determines regional formats such as date/time format, currency, etc. The Ubuntu package language-selector is used by Lubuntu for setting language preferences.

language-selector stores the per-user language settings in ~/.profile, and assumes that the login manager sources ~/.profile at login. However, the conclusion from the discussion below is that Lubuntu/lxdm ignores ~/.profile, which is a bug that needs to be fixed.

System-wide language settings are stored in /etc/default/locale. In Lubuntu those settings are used at login for setting the language related environment variables, and since ~/.profile is ignored, it's currently /etc/default/locale that determines the display language for all users on the system.

As regards the display language on the login screen, neither LANGUAGE nor LC_MESSAGES in /etc/default/locale seems to be recognized. It means that LANG controls the display language, which results in the wrong language if LANGUAGE/LC_MESSAGES differ from LANG. This is also a bug that should be fixed.

Original description
--------------------
The menu for selecting another preferred language seems to be confusing or is buggy.

1. When I set English as the preferred language after I installed Lubuntu with preferred language = dutch,
the dutch gets grayed out in the menu?? (Although it is still installed). After logging off, the preferred
laguage wansn't changed. One has to reboot the system before it's getting changed

2. The menu shows uninstalled languages (such as chinese? and deutsch??)

3. When Dutch is selected back as the preferred language, then both Dutch and English are displayed in black (which
is ok)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: lxdm 0.4.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.23-0ubuntu1
Architecture: i386
Date: Fri Sep 23 14:11:39 2011
InstallationMedia: Lubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110830.2)
ProcEnviron:
 LANGUAGE=nl:en
 LANG=nl_BE.UTF-8
 SHELL=/bin/bash
SourcePackage: lxdm
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.lxdm.lxdm.conf: 2011-09-02T16:01:26.397322

Related branches

Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Julien Lavergne (gilir) wrote :

Thank you for your bug report. The screenshots are from language -selector, so I re-affecting the bug report.

affects: lxdm (Ubuntu) → language-selector (Ubuntu)
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your effort to improve Ubuntu by reporting those observations!

On 2011-09-23, Bernard Decock wrote:
> 1. When I set English as the preferred language after I installed
> Lubuntu with preferred language = dutch, the dutch gets grayed out in
> the menu?? (Although it is still installed).

Yes, that's by design.

I recommend that you click the "Help" button in the Language Support window for a description of how it's supposed to work. Since English is always available, a list with fallback languages would be pointless, wouldn't it?

> After logging off, the preferred laguage wansn't changed. One has to
> reboot the system before it's getting changed

No, that's a misconception. If you change the user language from Dutch to English and log out, you end up at the login screen. If you log in again instantly, you should see English as the display language.

The display language of the login screen, OTOH, is controlled by the _system_ language. If you change that, you do need to reboot.

> 2. The menu shows uninstalled languages (such as chinese? and deutsch??)

As regards Chinese, there is a known issue, i.e. if you have Chinese installed, the menu item doesn't disappear if you remove it. As far as I know, there is no similar problem with German.

Could you please execute the command

  ll /usr/share/locale-langpack

from a terminal window. If the output includes a 'de' folder, German is installed.

If you don't see a 'zh_CN' folder, you are right about Chinese. In that case, you should be able to make the Chinese menu item go away by running this command from a terminal window:

  sudo locale-gen --purge

Please let us know whether the above comments are sufficient to clarify the matters you brought up.

Changed in language-selector (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: New → Incomplete
Revision history for this message
Bernard Decock (decockbernard) wrote :

Gunnar, thank you very much for your response.

First of all, I can see that chinese is installed in Lubuntu as well as in Linux Mint Katya (See screendumps). Notice that my
preferred language = ducth (nederlands) and this language is active, but is greyed out?

When I start the language-selector after reboot, I get a crash (bug 859961).

ll /usr/share/locale-langpack reveals that nor "deutsch" nor "chinese" is installed.

After regenerating the locales, both "deutsch" and "chineses" are still in the selector (dutch is still greyed out, although it is
my preferred language. I can't select it neither ... dialog doesn't respond to the selection (due to the 859961 bug?)

>> After logging off, the preferred laguage wansn't changed. One has to
>> reboot the system before it's getting changed

>No, that's a misconception. If you change the user language from Dutch to English and log out, you end up at the login >screen. If you log in again instantly, you should see English as the display language.

Actually I switched the preferred language, logged off and logged back in. Language wasn't changed. Only after reboot did the changes take place (can't test this now, because the language-selector-dialog doesn't react on a selection).
When I changed the language, I pressed "apply systemwide"-button. (Maybe this option requires a reboot?)

Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Bernard Decock (decockbernard) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2011-09-28 08:38, Bernard Decock wrote:
> First of all, I can see that chinese is installed in Lubuntu as well
> as in Linux Mint Katya (See screendumps).

Wait now... I take it that it _looks like_ Chinese is installed (in language-selector's "Language" tab), while it's actually _not_ installed as shown in LanguageSelectorLanguagesInstalled.jpg. Is that what you mean?

> Notice that my preferred language = ducth (nederlands) and this
> language is active, but is greyed out?

So while you would have expected the black items

  Nederlands
  English

at the top of the list, the only item displayed in black is English? It makes me guess that you use v. 0.52 of language-selector and that it's due to a bug that only appeared in that version. Can you please upgrade to language-selector 0.54, so we can sort out this part of the confusion?

> When I start the language-selector after reboot, I get a crash (bug
> 859961).

Hmm.. Are you really sure it's a bug #859961 type of crash? I ask because that bug only appears in v. 0.53.

> ll /usr/share/locale-langpack reveals that nor "deutsch" nor
> "chinese" is installed.

Right.

> After regenerating the locales, both "deutsch" and "chineses" are
> still in the selector

That's a mystery, considering that neither Chinese nor German locales were generated according to LanguageInstaller2.jpg.

Can you please let us know what the following commands outputs:

  locale -a

  cd /var/lib/locales/supported.d; cat $(ls)

>>> After logging off, the preferred laguage wansn't changed. One has
>>> to reboot the system before it's getting changed
>>
>> No, that's a misconception. If you change the user language from
>> Dutch to English and log out, you end up at the login screen. If
>> you log in again instantly, you should see English as the display
>> language.
>
> Actually I switched the preferred language, logged off and logged
> back in. Language wasn't changed. Only after reboot did the changes
> take place (can't test this now, because the language-selector-dialog
> doesn't react on a selection). When I changed the language, I pressed
> "apply systemwide"-button. (Maybe this option requires a reboot?)

I suggest that we postpone our talking about this issue.

For now I'd appreciate if you could upgrade language-selector to v. 0.54 and answer my questions above.

Revision history for this message
Bernard Decock (decockbernard) wrote :

>>Wait now... I take it that it _looks like_ Chinese is installed (in language-selector's "Language" tab), while it's actually _not_ >>installed as shown in LanguageSelectorLanguagesInstalled.jpg. Is that what you mean?

Right!

I upgraded Lubuntu and now language-selector version 0.54 is installed. => chinese and deutch are no longer seen in the language-tabs. It was rather weird to see that dutch was greyed out, although all dialogs were in the duct language. For
this reason it moved the 'dutch'-tab to the top.

After that I wanted to set my preferred language to English. After selecting "Apply system-wide" and logging out and logging back in, all the dialogs were still in dutch, although "english" was on top and "dutch" was greyed out. After reboot, all the
dialogs were in english (as I wanted it to be). The same procedure is required to set the language back to dutch. So one need to reboot in stead of logging_off/in.

>> Hmm.. Are you really sure it's a bug #859961 type of crash? I ask because that bug only appears in v. 0.53.

Yes, I update this Lubuntu-system daily. Initially I was able to move the language-tabs up/down. Then some days ago,
this type of crash happened as soon as the mouse was hovered over the dialog. Today (version 0.54) everthing
seems to work well.

ocale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
nl_AW
nl_AW.utf8
nl_BE.utf8
nl_NL.utf8
POSIX

cd /var/lib/locales/supported.d; cat $(ls)
en_HK.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_IN UTF-8
en_ZM UTF-8
en_ZW.UTF-8 UTF-8
en_NZ.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_NG UTF-8
en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_AU.UTF-8 UTF-8
en_SG.UTF-8 UTF-8
en_BW.UTF-8 UTF-8
en_AG UTF-8
en_ZA.UTF-8 UTF-8
en_CA.UTF-8 UTF-8
en_IE.UTF-8 UTF-8
nl_BE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
nl_BE.UTF-8 UTF-8
nl_AW UTF-8
nl_NL.UTF-8 UTF-8

Conclusion. Everything seems to work, except that a reboot i s required to make the settings effective.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks very much for the additional info! I'm glad that it (almost) works.

On 2011-09-29 10:07, Bernard Decock wrote:
> Conclusion. Everything seems to work, except that a reboot i s required
> to make the settings effective.

It struck me that this might be a Lubuntu specific issue. We should try to find out if it means that the possibility for users to set their own language preferences are in effect disabled in Lubuntu. It doesn't matter much when there is only one user, as long as the system wide settings are recognized, but it's important on multi-user systems. Hope you can help me test my theory.

At the bottom of my ~/.profile file I have these lines:
export LANGUAGE="en"
export LC_MESSAGES="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"

Can you please confirm that your ~/.profile contains similar lines?

Then let's find out whether your display manager (lxsession?) sources ~/.profile at login:

Your system language settings are stored in /etc/default/locale. Can you please let us know the output of 'cat /etc/default/locale'.

As a next step, could you please set another user language from language-selector. So if your prefered system language is English, select Dutch as the user language or vice versa. Then reboot, login and check if menus and dialogs are displayed in the user language you selected.

TIA

Revision history for this message
Bernard Decock (decockbernard) wrote :

Preferred language = ducth (nederlands = nl)

contents of .profile
export LANGUAGE="nl:en"
export LC_MESSAGES="nl_NL.UTF-8"
export LC_CTYPE="nl_NL.UTF-8"
export LC_COLLATE="nl_NL.UTF-8"
cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="nl:en"
LC_MESSAGES="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"

========
Select English (just moved tab to the top) no logout/no reboot

Note! Dutch (in black) is on top, English (in Black) is just below Dutch. Can't move English above Dutch ... I have to move Dutch below English. As soon as I moved Dutch below English, Dutch is greyed out (ok).

cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="nl:en"
LC_MESSAGES="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"

contents of .profile
export LANGUAGE="en"
export LC_MESSAGES="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"

======

Logged out, logged in (no reboot) : (menu's are still in dutch)

contents of .profile
export LANGUAGE="en"
export LC_MESSAGES="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"

cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="nl:en"
LC_MESSAGES="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"

=====

After reboot (menu's are still in dutch)
cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="nl:en"
LC_MESSAGES="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"

Pressed the button 'apply system-wide” (password required)

cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="en"
LC_MESSAGES="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"

=====

Logout/login

cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="en"
LC_MESSAGES="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8

=====

After reboot => menu's are in english !

contents of .profile
export LANGUAGE="en"
export LC_MESSAGES="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"

cat /etc/default/locale
LANG="nl_BE.UTF-8"
LANGUAGE="en"
LC_MESSAGES="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"

=====

Log out : Login-screen is still in dutch (is this normal?)

summary: - Selecting another preferred language in Lubuntu is confusing
+ Display language not set properly in Lubuntu
description: updated
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks a lot for the info!

Your tests confirm my suspicion that Lubuntu ignores the per-user settings in ~/.profile. That's a bug of course, probably an lxdm bug.

On 2011-09-29 14:07, Bernard Decock wrote:
> Can't move English above Dutch ... I have to move Dutch below
> English.

Well, it's possible, but you may need to fiddle with it a bit. ;-)

> Log out : Login-screen is still in dutch (is this normal?)

No. That's a bug as well.

I changed the summary and description of this bug report to reflect these conclusions. Please let us know if there is anything with the new wordings you don't agree on.

Can you confirm that it's lxdm you use as login manager, and do you possibly know if lxdm will be the default dm in the Lubuntu 11.10 release?

affects: language-selector (Ubuntu) → lxdm (Ubuntu)
Changed in lxdm (Ubuntu):
status: Incomplete → Confirmed
Changed in lxdm (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxdm - 0.4.1-0ubuntu3

---------------
lxdm (0.4.1-0ubuntu3) oneiric; urgency=low

  [ Gunnar Hjalmarsson ]
  * debian/patches/22_ubuntu_i18n_oneiric.patch:
    - Source /etc/profile and ~/.profile (LP: #857326).
    - If the session language is set from the greeter, override
      language related variables that are set by sourcing ~/.profile.
    - Possible "Language" value in ~/.dmrc not applicable in Oneiric,
      so do not use it (LP: #843380).
  * debian/lxdm.upstart:
    - Export LC_MESSAGES to ensure correct display language on the
      login screen (LP: #857326).
 -- Julien Lavergne <email address hidden> Fri, 30 Sep 2011 23:09:43 +0200

Changed in lxdm (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Fixes are Ubuntu specific, so the patch won't be forwarded.

Changed in lxde:
status: New → Invalid
Revision history for this message
MarianoAbsatz (el-baby) wrote :

Hi,

if I understand right from the previous 2 comments, current (natty) lxdm ubuntu package DOES NOT process ~/.profile and oneiric's will, and the bug was only present in ubuntu?

I have the same problem with environment variables and other stuff (though not language related) not being processed after I switched from unity to lubuntu session.

Revision history for this message
MarianoAbsatz (el-baby) wrote :

Is it possible that lxdm is not even reading /etc/profile?

I'm using lxdm 0.3.0-0ubuntu5 (in natty) and I just added a line like

export HELLO=BYE

at the end of /etc/profile, however, the $HELLO variable is not set.

Am I doing something wrong?

Where can I set environment variables that are defined no matter what desktop environment I choose?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2011-10-06 22:29, MarianoAbsatz wrote:
> if I understand right from the previous 2 comments, current (natty) lxdm
> ubuntu package DOES NOT process ~/.profile and oneiric's will,

Right.

> and the bug was only present in ubuntu?

I don't think that upstream lxdm sourced ~/.profile in any distribution. So I suppose that the answer to that part of the question depends on which patches other distributions apply.

> I have the same problem with environment variables and other stuff
> (though not language related) not being processed after I switched from
> unity to lubuntu session.
>
> Is it possible that lxdm is not even reading /etc/profile?

So it seems as regards versions before 0.4.1-0ubuntu3.

But if you like you can edit /etc/lxdm/Xsession manually. In the beginning of http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/oneiric/lxdm/oneiric/view/head:/data/Xsession you see how it's done.

> Where can I set environment variables that are defined no matter what
> desktop environment I choose?

You mean login program, don't you? I don't know; probably an lxdm bug isn't an optimal place for asking that question. ;-)

Revision history for this message
VaD (job4vad) wrote :

YOU ARE LUCKY
I suddenly got a Chinese instead of English

what I do:
1) Install Ubuntu (thats important because I'm NEW user i just want change OS to Ubuntu, but ununtu 11.10 is killing me with language bug)

2) instal apps:
-browsers
- Krusader
- xgneur ( 0.12 is bugly in 11.10, but they have 0.14 wich I install)
- skype
- Gnome Classic (it say that I need Log out and chose this "theme?") - do this log in againe and get Chinese toolbars WTF????????!!!!!!!!!!!!

(T_T)

ok - I will try use language selector GUI -> hm how to find it ... oh yahooo I find it -> hm ... all language name packs display by Chinese symbols -> :( -> check all languge packs and install -> 3 hour ago -> half of language packs still display by chinese symbols; I can't check any language and apply it as default; almost all language is "disabled" (WTF?? I just install all those languges) -> I drag "enabled" language to the end of langiage list -> yahooo language list almost all stay "enabled" -> fuck I can't chose language any way ........

OK - GOOGLE I know you should answer to my questions!!
find -> sudo gedit /etc/default/locale
change all:

LANGUAGE="en"
LC_MESSAGES="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"

It's does not help even when I restart......

Finily

- I don't slype all night
- I don't fix problem
- I hate all Indians developers of ubuntu
- Блять ну не пиздец ли ?
- at the evening will read again this post and continue trying fix language using this article

P.S. want sleep and very angry

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Dear VaD,

Besides the fact that this bug report is closed, it also seems to be unrelated to your problem.

I suggest that you click the "Help" button in the Language Support window. The help document explains how you set language in Ubuntu, and it's typically a much more reliable source of info on that topic than Google.

If that's not sufficient to solve your problem, you may want to ask a question at https://answers.launchpad.net/

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers