Comment 10 for bug 553162

Revision history for this message
Martin Pitt (pitti) wrote : Re: Unset $LANGUAGES if the user picks a different locale in gdm

This was just discussed in #ubuntu-desktop. The basic problem here is that language-selector now is able to set system-wide locale settings which gdm does not understand. gdm is only able to set a locale (i. e. $LANG), while language-selector can set a locale and additionally a language list (which overrides LC_MESSAGES from $LANG) in $LANGUAGE.

I think a reasonable compromise would be:

 * As long as the locale picked in gdm matches the system locale, keep $LANGUAGE, since it's explicit configuration that the admin did for this machine, and we need to respect it. (cf. bug 407300)

 * Once the user selects a different locale, $LANGUAGES should be unset. This can be one of:

    - $LANGUAGES is set system-wide, and $GDM_LANG != the system wide locale
    - $LANGUAGES is set in ~/.profile, and $GDM_LANG != $LANG set from ~/.profile or ~/.dmrc

This needs to be done in /etc/gdm/Xsession.