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.

  • I have the same problem in xubuntu 16.04 :-\. The layout after login is right, but on the login screen is another one. :-\ Sep 13, 2019 at 10:12

4 Answers 4


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):


  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:

  • 1
    It's September 2015 and still have to use the above solution? After fresh install of Mint 17.2 it worked fine for a day. Today I recognized 2 things: 1. The login uses us layout instead de. 2. The languages were gone and I had to reinstall at least German. This had not fixed the us layout during login. So I searched and found the above solution. Looks like a bug in Mint that should have been fixed long ago?
    – Nabor
    Sep 16, 2015 at 9:25

In the Linux Mint 17.2 /etc/mdm/Xsession script, there's code which reads keymap name from a filein user's home directory. The contents of the file is simply the keymap name. Alternatively, there's also code to read xmodmap setup instead. So, forcing the keymap to be set to German layout should happen by running this line to generate file with contents 'de' in the user's home directory:

echo de > $HOME/.Xkbmap

Note that each user of the computer will have unique keyboard setup by having their favorite setup name in their own home directories.

This is the code in /etc/mdm/Xsession responsible for acting on the files:

153 usermodmap="$HOME/.Xmodmap"
154 userxkbmap="$HOME/.Xkbmap"
156 if [ -f "$userxkbmap" ]; then
157     setxkbmap `cat "$userxkbmap"`
158     XKB_IN_USE=yes
159 fi
161 # xkb and xmodmap don't play nice together
162 if [ -z "$XKB_IN_USE" ]; then
163     if [ -f "$usermodmap" ]; then
164        xmodmap "$usermodmap"
165     fi
166 fi

I can't find the file /etc/mdm/Init/Default, then I found this command.

sudo dpkg-reconfigure keyboard-configuration

It works for me.

Description:    Ubuntu 16.04.3 LTS

This problem can still happen on Mint 19.2.

But since there is no /etc/mdm directory, the above solutions didn't work for me.

After some searching I found the culprit: The default layout is specified in the file /etc/default/keyboard and was incorrectly set to "us" on my machine. (I am using an english OS and a german keyboard. This might have gotten things confused in the first place.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .