No language chooser on login screen in LightDM

Bug #803858 reported by Haitao Zhang
108
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Fix Released
Wishlist
Unassigned
lightdm (Ubuntu)
Fix Released
Wishlist
Unassigned
lightdm-gtk-greeter (Ubuntu)
Fix Released
Undecided
Gunnar Hjalmarsson

Bug Description

LightDM doesn't appear to have a language selection choice in the Login screen, we need this to switch between Chinese and English for regular use, this feature is present in GDM, and we are really want to have it in LightDm as well, including correct setup of the zh_CN.utf-8 locale.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Agreed, this wouldn't be a good place to remove functionality from GDM.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Changed in lightdm (Ubuntu):
status: Confirmed → Triaged
Changed in lightdm:
importance: Undecided → Wishlist
Changed in lightdm (Ubuntu):
importance: Undecided → Wishlist
Changed in lightdm:
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This is the situation as I understand it:
- There are users, who need to use the same session (e.g. Unity) but frequently switch languages, due to applications working better in one locale than another.
- In general users will not need to do this, but this is particularly useful for Chinese language users (who switch between Chinese and English).
- This is currently possible in GDM, as it has a language option on login (that is set the the users default as set in language selector). This is not possible in GDM3, as they are dropping this functionality.
- LightDM does not have a language option, as the correct way to set the language is in the language selector in the users session (expected to be changed very infrequently).

Please comment if this is incorrect.

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

I think the correct layer to do this in is the session layer, rather than by getting the user to explicitly choose a language. This is because (as I understand it) users do not need to pick a particular language, but instead have a small set they use.

This could be accomplished by making new sessions /usr/share/xsessions/gnome-en.desktop and /usr/share/xsessions/gnome-zh.desktop which are copies of /usr/share/xsessions/gnome.desktop. This would mean the user could choose the session language from the session type combo box.

In /etc/X11/Xsession.d/99locale-session, you can check for the session and override the users locale settings, i.e.:
if [ $DESKTOP_SESSION = "gnome-en" ] ; then
    LANG=en_US.utf8
    DESKTOP_SESSION=gnome
elif [ $DESKTOP_SESSION = "gnome-zh" ] ; then
    LANG=zh_CN.utf8
    DESKTOP_SESSION=gnome
fi

(This is not tested and theoretical)

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

Like Haitao and Brendan I would like to see a language chooser in LightDM. I think that a lot of Ubuntu users, not only Chinese ditto, appreciate that feature, and would be disappointed if it disappeared with Oneiric.

I'm not able to talk about a way to set the language in terms of correct or incorrect as long as it works as expected. To me it appears to be more straight-forward and convenient to have a language chooser separated from the session chooser.

See also bug #793366.

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

This feature is currently being discussed on this thread:
https://lists.ubuntu.com/archives/ubuntu-desktop/2011-July/003137.html

We are struggling to define what the requirement is for being able to change language from the login screen. What we have come up with so far:
- It is easier than logging in, using the control panel then logging out (limitation of how GNOME currently does language support)
- Setting language for new users (no longer applicable as the Oneiric control center allows the language to be set at user creation).
- You need to be able to choose the language for the guest session (currently doesn't get used for GDM anyway, this is probably better supported by having a welcome screen to the guest session with a language choice).
- Handy for testing (not a requirement for default installations. Testers can use other methods to do this, e.g. a zenity dialog run from the .profile)
- The feature already exists in GDM (invalid as this is not a requirement, we should only keep this feature if there is a need for it)
- We spent a lot of time making it work (invalid as this is not a requirement)

I've talked to a number of non-English users and they do NOT have a requirement for this. They set the language once (at install time) and then never change it. New users that are added to a system set it once after the first login and then never change it.

A number of people have said "we need this to switch between Chinese and English for regular use" or similar, but we need to define exactly:
- What sort of users are these? Are these typical users or power users?
- Why do they change language so frequently - is there a better method of fulfilling this requirement?

Revision history for this message
Guido Berhoerster (gber) wrote :

There several assumptions in the above list which cannot be taken as given:

1) the users language preference in known and can be easily set at the time an account is created
2) there is an user interface in the desktop environment to select the language of a session
3) every user of the system will be able to navigate in the system's default language to this interface in order to change it to his preferred/native language

The first assumption is Ubuntu-specific, e.g. it is currently not possible to select the preferred language when creating users through YaST in openSUSE. E.g. in a large computer lab an admin creating accounts may not know what languages a user speaks. The second assumption is GNOME/KDE-centric, there is e.g. no native UI to switch the user's language in Xfce, LXDE, or when using a plain window manager. Even if there is, it will be very difficult for a user to find it if he/she does not understand the default language.

Use cases where this becomes a problem are e.g. computer labs in public libraries or universities and even in my own household where not everyone speaks the preferred/native language of the owner of each computer.

So I support the request to add this functionality back to LightDM.

summary: - Unable to switch between Chinese and English in LightDM
+ No language chooser on login screen in LightDM
Revision history for this message
PCMan (pcman-tw) wrote :

A "very valid" usage for this feature is for public computers in libraries.
We don't know in advance what the language the users will need.
This is especially useful in countries where many languages are in use simultaneously, such as Swiss, India, Singapore, or others.
Another possible usage is for a central server providing terminal services in network environment.

Please add it back or at least make it possible for other greeters to do it.
If Ubuntu doesn't need it, just remove this feature from your default greeter.
However, we'd like to add this feature to our own greeter. Please, at least make this optional.

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

As stated in comment #5, the need for guest accounts to pick language is a definite requirement, but this doesn't necessarily have to be solved in the greeter.

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

In response to Guido's statements:

1) the users language preference in known and can be easily set at the time an account is created

Good point. For new accounts I think you would expect to need to be prompted for choosing a language.

2) there is an user interface in the desktop environment to select the language of a session

Yes. I'd be interested to know if desktop environment intentionally do not provide this functionality?

3) every user of the system will be able to navigate in the system's default language to this interface in order to change it to his preferred/native language

This goes back to point 1) - if you haven't set the language then you really need to be prompted

Revision history for this message
Hadmut Danisch (hadmut) wrote :

I do require locale (and keyboard) settings at login time as well. And I do not really care what a „number of non-English users” do require, because if I would care then I'd be using Microsoft Windows.

The locale is an environment setting and thus should be set in general at login time (and not in the desktop settings, which is annoying).

BTW, moving the locale settings in the desktop is simply *wrong*, because it is too late. Script files like .xsession, .profile,... are run separately and not as child processes of the desktop. Thus, they do not inherit the language session.

It is, furthermore, wrong to assume that „the users language preference in known and can be easily set at the time an account is created” . What a nonsense. There are lot's of people changing their locales (including the Time Zone) depending on their work, their location, especially while travelling.

A major wrong assumption is that a user could always use english (or the same) settings, just because he is able to speak english. Plenty of programs, especially the office programs, change their behaviour (such as date/time/currency formats) depending on the locale settings, and programs like Open/LibreOffice simply cannot be used properly for doing work in german language without german locale settings, even if I usually prefer english settings, due to the lousy translations into german.

So the assumption, that a user would pick his preferred language at account creation time and then never changes it, is simply bullshit.

So I agree with Guido and have to stress hat Robert Ancell's assumptions are completely arbitrary and wrong.

@Robert Ancell: Where do you get this weird assumptions from? May I assume that you are a genuine english user and are not familiar with using different languages?

Ubuntu once was a stable and reliable distribution, but for about two years canonical/ubuntu has gone crazy and is worsening every new version of ubuntu with such silly assumptions and ideas. What a pity.

And, btw., no, I am not a chinese. I am german.

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

An update on this issue:
- As Gunnar stated not all desktops provide a method of configuring LANG, so for legacy reasons it would be nice to be able to set it from the greeter.
- I'm happy to support this as a legacy interface for LightDM 1.0, the issue is to do it in a way that does not conflict with more advanced uses of setting LANG (e.g. if PAM was to set LANG which in my opinion is the correct location to do it).

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

Hi Robert,

On 2011-08-26 09:32, Robert Ancell wrote:
> - I'm happy to support this as a legacy interface for LightDM 1.0,
> the issue is to do it in a way that does not conflict with more
> advanced uses of setting LANG (e.g. if PAM was to set LANG which in
> my opinion is the correct location to do it).

This sounds good to me. There is a reason why I have been quiet on this topic for a few weeks. :)

I have recently moved around code for dealing with language settings, and now it's accountsservice that provides that functionality in Ubuntu. You can query accountsservice for both the current language and the available languages on the system. You also set a new language via accountsservice's SetLanguage method, and accountsservice takes care the bits and pieces behind the scenes.

Actually it's not LANG that is set (since that variable is currently reserved for other localisation stuff such as date/time formats, default paper size, etc.), but basically lightdm does not need to know that. I'd say that what you need for a simple language chooser that play well with other interfaces is now in place.

Revision history for this message
Kevin Huang (wasikevin) wrote :

@Gunnar, It seems the language chooser behavior is a bit strange. Below is my test steps on Beta1.

1. At Installation, select language: Simplified Chinese, and location: Taiwan. The assumption is many Chinese work in Taiwan , and vice versa, who usually prefer to see Simplified Chinese UI.

2. After installation, ran update manager, then updated language pack as usual.

3. I found the installed languages in language-selector was Taiwanese-Chinese-English which should be Chinese-Taiwanese-English, and the character of folder is in Traditional Chinese which should be in Simplified Chinese. Please see the attachment.

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

@Kevin,
Thanks for reporting those observations. However, they are not lightdm related, but probably related to ubiquity, so I ask you to please file a new bug report.

Revision history for this message
Kevin Huang (wasikevin) wrote :

@ Gunna,

Thanks for your guidance. It seems the bug has been there for a while, https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/590108.

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

There is now an optional language selector in the GTK greeter for desktops that require it. To enable it set show-language-selector=true in /etc/lightdm/lightdm-gtk-greeter.conf. Fixed in 0.9.8.

Changed in lightdm:
status: Triaged → Fix Committed
Changed in lightdm (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Side effects of this change:
- If the language selector is not enabled language settings are not changed.
- If "Language" is set (either in ~/.dmrc or in AccountsService) this the daemon will set LANG after PAM sets variables but before the session wrapper is run:
  - This will override PAM if you have it setup to set the language correctly (in my opinion the correct location to do it). To stop this make sure nothing sets ~/.dmrc or AccountsService
  - If you set LANG in the session wrapper this will override the LANG set by the daemon (in the case of Ubuntu)
- If "Language" is not set no variables will be modified. You will get what PAM sets and what the session wrapper overrides.

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

Promising news; thanks Robert!

I haven't checked out this option yet. When I do, I suppose that a few questions on what you say in comment #17 will be straightened out.

I for one hope that the language chooser will be enabled by default in Ubuntu 12.04, and that related packages will be backported to Oneiric. However, there is a need to dig into the details before a proper decision on the topic can be made.

Changed in lightdm:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.0.0-0ubuntu1

---------------
lightdm (1.0.0-0ubuntu1) oneiric; urgency=low

  [ Steve Langasek ]
  * don't start on graphics-device-added; reintroducing this reverted the fix
    for bug #615549 from maverick without explanation.
  * clean up the completely illegible start rule for debian/lightdm.upstart,
    killing off the unnecessary parentheses
  * debian/lightdm.upstart: when lightdm is shut down by a runlevel call,
    emit an upstart event that can be caught by plymouth so it can
    distinguish between the DM shutting down for a runlevel change vs. other
    causes. LP: #854329.

  [ Robert Ancell ]
  * New upstream release.
    [ 0.9.8 ]
    - GetSeatForCookie and GetSessionForCookie are now deprecated. They
      remain for now but use the XDG_SEAT_PATH and XDG_SESSION_PATH
      environment variables instead.
    - Change log filenames to be unique across different display types.
    - Fix up script hooks, add regression tests for them
    - Complete removal of X code from the core of LightDM, so it can better
      support various display types
    - Add ability to set the language of a user from the greeter (LP: #803858)
    - Set LANG variable based on the user language
    - Add language selector into GTK greeter (disabled by default)
    - Allow TCP/IP connections if xserver-allow-tcp is true
    - Allow lightdm --version to be run as non-root
    - Automatically respond to PAM messages without prompts (LP: #783598)
    - Create 'AddLocalXSeat' D-Bus method, and require root to use 'AddSeat'
    - Fix multi-seat configuration picking the same display number (LP: #851362)
    - Use correct D-Bus and power interface in liblightdm-qt (LP: #852803)
    - Run pam_setcred inside the session process so pam_group works
      (LP: #851347)
    - Make sure one session is always selected in the GTK greeter (LP: #819177)
    [ 1.0.0 ]
    - Explicitly grab keyboard focus in GTK greeter
    - Fix removed power and a11y menu items in GTK greeter
    - Put system binary directory into path when running in test mode
      (LP: #860003)
    - Call pam_getenvlist after pam_setcred

  [ Lionel Le Folgoc ]
  * Make the gtk greeter easily themable by derivatives: (LP: #845549)
    - rename lightdm-gtk-greeter.conf to lightdm-gtk-greeter-ubuntu.conf,
      and handle the move in maintainer scripts.
    - manage /etc/lightdm/lightdm-gtk-greeter.conf with update-alternatives,
      by default it uses /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf with a
      very low priority.
  * debian/control: lightdm-gtk-greeter provides lightdm-gtk-greeter-config.
 -- Robert Ancell <email address hidden> Wed, 28 Sep 2011 16:00:20 +1000

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
David Gómez (dabisu) wrote :

This should be enabled by default...

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

The language chooser in the LightDM version that was shipped with the 11.10 release is unfortunately broken; see bug #868346.

A proposed fix is available in my PPA at https://launchpad.net/~gunnarhj/+archive/misc
I hope it will be uploaded as an update of Ubuntu 11.10. You can help increase the chances for that by installing the PPA package and let us know via a comment on bug #868346 whether it works to your satisfaction.

Revision history for this message
.cobnet (mattias-campe) wrote :

At the moment I'm using Ubuntu 12.04 and I would like to have the ability to have a language chooser on login screen. I tried the suggestion in comment #16, but even after restarting the computer I didn't see any change at login screen.

$ cat /etc/lightdm/lightdm-gtk-greeter.conf
show-language-selector=true

Personally I see potential in schools for this feature request. Eg. in our (Dutch speaking) school we have language classes for Dutch, French, Spanish and German (and even Chinese). Eg. my class has Dutch, French and English. I think it's interesting to be able to choose the language at login: if a pupil has an English class, he takes 'English' and if he has a French class, he takes 'French'. Microsoft Windows... try to defeat that :-)!

Revision history for this message
Bazon (bazonbloch) wrote :

I didn't mention yet, not having a language chooser makes trouble-shooting and reporting bugs harder, as you don't know what's the message/menu/button/whatever in english.

Revision history for this message
markba (mark-baaijens) wrote :

I've tried #16

There is no /etc/lightdm/lightdm-gtk-greeter.conf:
/etc/lightdm$ ls
lightdm.conf unity-greeter.conf users.conf

Adding a line show-language-selector=true to unity-greeter.conf (as an alterative to unity-gtk-greeter.conf) does not work.

How do we activate the language selector?

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

As from 12.04 the language chooser is in the GTK greeter, which is not included in a fresh Ubuntu installation. In other words you need to install the package lightdm-gtk-greeter separately. Once that's done, you should be able to activate the language chooser in accordance with the above guidance.

Also, in Language Support Help you find a short section about enabling the language chooser on the login screen:

  yelp ghelp:language-selector#alt-language

HTH

Revision history for this message
Vincent Fortier (th0ma7) wrote :

Sadly, it is really anoying of not having this option set default... Here's a good reason for hat:

At my office, for multiple reasons, we are using KDE into our operational environment. We have a full french/english setup and KDE allows to switch between both languages perfectly fine BUT:

There is no way to force GTK applications to also run in the language choosen by the user unless it internally has specific options for it. Therefore, if the system wide language is set to english, french users will have to manually set the language into OpenOffice (since it does have such option) while they will have to be stuck with an english firefox & gimp & mostly every other gtk apps. Same goes the other way around... Since the user using the desktop is never the same each day, the language varies depending of who's sitting at that specific desk all the time. So we are stuck at having one of the two languages not fully functional.

How can I properly get around this issue without having a language chooser at the login screen that will set all background locales properly at login time?

For this specific reason I am strongly suggesting for a return of this option into GDM as it was default and working well in previous ubuntu releases up until this is finally set by default into lightdm:
https://bugs.launchpad.net/gdm/+bug/1015114

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

Vincent,

You can use Language Support, which is the primary tool for language/locale handling in Ubuntu.

But talking about default... Both Xubuntu and Lubuntu ship lightdm-gtk-greeter as the default greeter, and they have choosen to enable the language chooser by default. Standard Ubuntu users of lightdm-gtk-greeter have to explicitly change a config setting to see the language chooser (if they even know that it exists). I think it's time that the language chooser feature is enabled in lightdm-gtk-greeter by default. I have linked a related merge proposal to this bug report.

Changed in lightdm-gtk-greeter (Ubuntu):
status: New → In Progress
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
Revision history for this message
Vincent Fortier (th0ma7) wrote :

Thnx for the tip. Although, Language Support requires the user to not only set it's language in KDE but also using this utility...

Still , I agree that the language selector should be there as default. thnx! :)

Revision history for this message
Vincent Fortier (th0ma7) wrote :

As a side note, getting multiple language being repeated at the login prompt ... Created a new bug entry for that:
https://bugs.launchpad.net/lightdm-gtk-greeter/+bug/1067149

Revision history for this message
Sebastien Bacher (seb128) wrote :

(unsubscribing sponsors since the the merge request is already listed in the queue)

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

This bug was fixed in the package lightdm-gtk-greeter - 1.3.1-0ubuntu2

---------------
lightdm-gtk-greeter (1.3.1-0ubuntu2) raring; urgency=low

  * debian/lightdm-gtk-greeter-ubuntu.conf:
    - Show the language chooser by default (LP: #803858).
 -- Gunnar Hjalmarsson <email address hidden> Mon, 15 Oct 2012 21:59:00 +0200

Changed in lightdm-gtk-greeter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Ruslan (b7-10110111) wrote :

So apparently this is fixed in GTK greeter. But what about KDE greeter? KDE users are still without any language selector in LightDM.

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.