LightDM sets wrong environment variables

Bug #1502921 reported by Ikuya Awashiro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
accountsservice (Ubuntu)
High
Gunnar Hjalmarsson
lightdm (Ubuntu)
Undecided
Unassigned

Bug Description

LightDM sets wrong GDM_LANG and LANGUAGE environment variables.

ikuya@UbuntuWily6:~$ env |grep LANG
LANG=ja_JP.UTF-8
GDM_LANG=en
LANGUAGE=en

they should be:
ikuya@UbuntuWily6:~$ env |grep LANG
LANG=ja_JP.UTF-8
GDM_LANG=ja
LANGUAGE=ja

According to this bug, every menu shows in English.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: lightdm 1.16.3-0ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-14.16-generic 4.2.2
Uname: Linux 4.2.0-14-generic x86_64
ApportVersion: 2.19-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Oct 5 23:14:27 2015
InstallationDate: Installed on 2015-10-05 (0 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20151005)
SourcePackage: lightdm
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

IMHO, LANGUAGE and GDM_LANG are unnecessary. It should be removed them.
Here is the proposed patch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lightdm_1.16.3-0ubuntu2.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

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

Hi Ikuya,

A couple of questions:

* Which LANG value is set by /etc/default/locale?

* Has the locale for that value been generated?

* Where/how did you set the user specific value for LANG? (I'm assuming that you did not use Language Support or any other GUI.)

There is more to say about the reasons for the current behavior, but I'll await your answers before going into that.

Changed in lightdm (Ubuntu):
status: New → Incomplete
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

Hi Gunnar,

> * Which LANG value is set by /etc/default/locale?
ikuya@UbuntuWily6:~$ cat /etc/default/locale
LANG="ja_JP.UTF-8"

> * Has the locale for that value been generated?
ikuya@UbuntuWily6:~$ sudo locale-gen
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
  ja_JP.UTF-8... up-to-date
Generation complete.

> Where/how did you set the user specific value for LANG? (I'm assuming that you did not use Language Support or any other GUI.)
I don't have any modification about locales after the installation.
I am sure that LightDM persists wrong language value. And I know that LANGUAGE and GDM_LANG not set by GDM and SDDM.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

GDM does still set GDM_LANG [1], though I suspect nothing relies on it anymore.

[1] https://git.gnome.org/browse/gdm/tree/daemon/gdm-session.c#n2479

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

It looks like I made a mistake when changing accountsservice in connection with the fix of bug #1440275. Just uploaded a correction, which is waiting for distro manager approval.

It's an inconsistency in one of the language-tools scripts which causes the reported behavior:

$ /usr/share/language-tools/language-validate ja_JP.UTF-8
en

After the change, that command will result in ja or ja_JP. This is the source code diff:

http://launchpadlibrarian.net/220369983/accountsservice_0.6.40-2ubuntu4_0.6.40-2ubuntu5.diff.gz

Changed in accountsservice (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → High
status: New → In Progress
Changed in lightdm (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package accountsservice - 0.6.40-2ubuntu5

---------------
accountsservice (0.6.40-2ubuntu5) wily; urgency=medium

  * debian/patches/0009-language-tools.patch:
    - Correction of a code inconsistency introduced in version
      0.6.40-2ubuntu2 (LP: #1502921).

 -- Gunnar Hjalmarsson <email address hidden> Tue, 06 Oct 2015 06:51:00 +0200

Changed in accountsservice (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

Hi Robert,
According to the attached screenshot, GDM_LANG does not set.

Changed in lightdm (Ubuntu):
status: New → Invalid
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

Hi Gunnar,
Thank you for your great work!

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

On 2015-10-06 15:09, Ikuya Awashiro wrote:
> According to the attached screenshot, GDM_LANG does not set.

It's probably because of this Ubuntu patch:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/gdm/wily/view/head:/debian/patches/revert_override_LANG_with_accountservices.patch

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

Other bug subscribers