← Back to team overview

desktop-packages team mailing list archive

[Bug 868149] Re: Need to set $LANG from .dmrc for backwards compatibility

 

On 2011-10-06 07:46, Martin Pitt wrote:
> Didn't we introduce the "Langlist" field for that, in order to not break
> other DMs which expect a locale there?

No, I'm afraid we didn't. "Langlist" contains e.g. 'de:en_GB:en' while
"Language", which in GDM 2 was related to GDM_LANG, contains only 'de'
(i.e. the first "Langlist" element, which should be one of the items
that /usr/share/language-tools/language-options outputs).

On 2011-10-06 07:48, Robert Ancell wrote:
> So old GDM had it set to a locale:
> http://projects.gnome.org/gdm/docs/2.20/configuration.html
> 
> Did it change in the new GDM, or is this an Ubuntu specific thing?

It's an Ubuntu specific thing in GDM 2. (In GDM 3 ~/.dmrc isn't used.)

So, in order to find out the size of this possible problem for LightDM, we should better ask ourselves if there is any Ubuntu derivative that
- used GDM up to Natty AND
- uses LightDM in Oneiric AND
- does not use accountsservice in Oneiric.
If not, there may be no need to do anything.

Otherwise, the language2locale() function I proposed in
https://code.launchpad.net/~gunnarhj/lightdm/lang-chooser/+merge/78226
might be handy. You could use that function to convert ~/.dmrc
"Language" values that does not contain a '.' before setting LANG.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/868149

Title:
  Need to set $LANG from .dmrc for backwards compatibility

Status in “lightdm” package in Ubuntu:
  Fix Released
Status in “lightdm” source package in Oneiric:
  Fix Released

Bug description:
  This is fallout from bug 864618: In that bug we disabled the
  set_language() call as it invalidly sets $LANG to the "Language"
  property of accountsservice, which cannot work because $LANG is a
  locale and "Language" is only a language name.

  However, set_language() also sets the $LANG variable from ~/.dmrc,
  which we need for backwards compatibility and derivatives.

  So what should happen is that all the code which does the `locale -a`
  guesswork needs to be dropped, and only these parts remain which
  evaluate ~/.dmrc.

  Please see http://pad.ubuntu.com/locale-handling for details.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/868149/+subscriptions


Follow ups

References