6

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.

migrated from askubuntu.com Jun 10 '14 at 9:48

This question came from our site for Ubuntu users and developers.

8

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:

  • 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 '15 at 9:25
1

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"
155 
156 if [ -f "$userxkbmap" ]; then
157     setxkbmap `cat "$userxkbmap"`
158     XKB_IN_USE=yes
159 fi
160 
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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.