Ubuntu – Unrecognized keyboard layout after login

gnomekeyboardkeyboard-layoutlightdmunity

Two of my computers running Ubuntu randomly ignore the configured keyboard layout and fall back to qwerty.

On one computer the configured layout is "Français" (French), on the other it is a bépo (dvorak-like layout for French). On both computers the layout was selected at installation time in order to make it the default system-wide. On both computers the login screen always uses the right layout. It's only once that the user is logged in that the keyboard starts working as a qwerty

One computer uses LightDM and Unity, the other uses GNOME Display Manager and GNOME 3.8. The problem occurred with Ubuntu 14.04 and is still in 14.10.

So far I tried to erase my ~/.gnome* and ~/.config directories and to reinstall the system, without success. I have also ensured that the session settings were copied in the system settings in the control panel.

Do you have any hint to solve this problem?

Edit: also, even if the layout is incorrect in the session, it is still correct in a terminal opened with ctrl+alt+F1.

Best Answer

try running :

sudo dpkg-reconfigure keyboard-configuration

you will see a command-line configuration screen like this (sorry, French version) :

screen capture) :

Use keyboard UP and DOWN to select the correct options, TAB to switch over "OK" or "CANCEL" and ENTER to move to the next screen.

Hope this helps.