We have had problems with the session manager for X Windows System that we use in the laboratories of the EPS to allow to identify users choosing the keyboard type and language. This was a problem for our Erasmus students because they couldn’t select English language in our computers. How we solved that? That’s what we want to explain on this entry.
Introduction
The session manager for X Windows System we use in the laboratories of the EPS under Ubuntu 12.04 LTS to request a username and password , is based on the LightDM environment , a graphical layer based on GDM but quite lighter.

LightDM makes available several types of keyboard, ie associated keyboard layouts for different languages. In theory, with the directive show-selector-language=true in /etc/lightdm/lightdm.conf file, the language selector should appear in the user interface application , but it really does not appear.

Selecting keyboard type does NOT necessarily imply language selection in the “locale”
In addition, by selecting a keyboard of a given language, one could thought that this involves selecting/changing the “locale” system to that language. Nothing could be further from the truth. Selecting a keyboard British English does not necessarily imply that the active language in the “locale” (variables LANG, LANGUAGE , LC_XX , … ) which we believe is associated with that type of keyboard (British English in this case, en_GB.UTF-8) . Even having installed the desired language packages and even , as we have seen before, having the show-selector-language=true directive in /etc/lightdm/lightdm.conf file.
In fact, with the previous directive and rebooting the computer (or X Windows System) we see that it still does not show the idiomatic selector interface (just shows the keyboard).
Example: you can select English keyboard but you will still have, running the “locale” command in a terminal, variable LANG=en_US.UTF-8

Type:
export LANG=”C”
( English en-US under the ISO/ANSI C specification, default language in any Linux/Unix system ).

It is also possible, for example, running an application in other languages (if it supports it and has the appropriate idiomatic files) , eg Catalan encoded UTF-8 characters:
export LANG=ca_CA.UTF-8
3. Launch the application from the terminal.
You must know the absolute PATH if there are different versions of the application or it does not have its executable file in the PATH.
The application will be launched in English (or reactivated on the LANG variable).
Example: launching the kate application from the terminal with the “locale” modified into English :

We hope you find it useful!!
One Reply to “How to select the keyboard type and language in Ubuntu 12.04 lightDM”