How do I change the login manager's keyboard layout?
I have a netbook with an AZERTY layout. I've changed it to "bépo" to try it, but now I've reset it to a french layout.
While all the apps have taken the change into account, Ubuntu's login manager still uses bépo, making entering passwords a challenge. I've enabled the virtual keyboard for the time being so that I could login again.
I don't remember what I had done in the first place to switch the login screen to bépo, but now I can't switch it back.
EDIT : In the keyboard settings page, if I click "use system defaults", then everything is in bépo ! Where is this different keyboard layout set ?
ANOTHER EDIT : Here's what did not work :
- Changing the layout in settings
- using the "use system defaults" checkbox in settings
- sudo dpkg-reconfigure keyboard-configuration
- changing it in Xconf
- adding a line in /etc/lightdm/lightdm.conf
- sudo dpkg-reconfigure locales
- slaming head against desk
- dpkg-reconfigure lightdm
- sudo gsettings set org.gnome.libgnomekbd.keyboard layouts "['fr']"
- combinations of the above
Is it possible to relaunch the keyboard configuration tool that's in ubuntu's setup ? The thing has automatic layout detection and it changes the setting everywhere.
What did seem to work for me was this suggestion: change /etc/default/keyboard
.
Banging head on desk indeed, this is ridiculous.
From terminal, run the following command to set the language layouts (you can set maximum four layouts) for your lightdm login screen:
gsettings set org.gnome.libgnomekbd.keyboard layouts "['us\taltgr-intl', 'fr']"
With the above command you set English (International) and French layouts, but you can change them as you wish.
To see the current layouts, you can use:
gsettings get org.gnome.libgnomekbd.keyboard layouts
Now, you should be able to use the keyboard icon from the top-right of your screen:
Next is a screen capture from my login screen (I used gsettings set org.gnome.libgnomekbd.keyboard layouts "['us\taltgr-intl', 'gr', 'ro']"
in terminal). As you can see, I can change the language layout as I wish:
Must have been a weird lightdm
bug.
Lightdm
got the new keyboard layout once I changed the login manager to gdm
, then back to lightdm
, even though simply doing dpkg-reconfigure lightdm
did nothing.
So here it is :
sudo apt-get update
sudo apt-get install gdm
(set gdm as the login manager when asked)
sudo dpkg-reconfigure lightdm
(set it as the login manager when asked)
sudo apt-get remove gdm
Then, restart.
Changing a keyboard layout in linux is serious business.
What helped me was to enter shell alt+ctrl+f1 and close lightdm
sudo service lightdm stop
then
dpkg-reconfigure keyboard-configuration
and
sudo service keyboard-setup restart
I ran those commands as user and as root, then when I started lightdm
sudo service lightdm start
the keyboard was fixed.