Linux Mint – Fix Wrong Keyboard Layout on Login Screen

display-managerkeyboard-layoutlinux-mint

After installing Mint 15 / updating to Mint 17, I'm unable to log in using the GUI login screen and German localisation with a password containing special characters. Changing the language using the language selector doesn't help.

It seems to be an issue regarding the window manager (mdm), since I'm able to log in using a text console (e.g. using ALT+CTRL+F1).

Adapting the file /etc/default/keyboard (as proposed on launchpad) or reconfiguring the keyboard configuration didn't change anything.

Best Answer

To solve the issue, do the following (as proposed in this comment on github):

  1. Switch to a text console (e.g. using ALT+CTRL+F1) and login.
  2. Open the following file using your preferred text editor (with root privileges):

    /etc/mdm/Init/Default

  3. Go to the last line – it should be exit 0
  4. Insert a new line before that last line and enter /usr/bin/setxkbmap de for a german localisation. Choose the localisation according your needs, for example fr for french localisation, ru for russian and so on.
Now, the last lines of /etc/mdm/Init/Default should be:

/usr/bin/setxkbmap de
exit 0

Don’t forget to adapt the file /etc/mdm/Init/Default again after upgrading to a new Mint version.

On this website you can find an overview of the abbreviations of all the layouts:

Related Question