10

I installed LightDM on an Arch Linux system (using pacman) and it runs fine, except, that if I try to type a special character (like "@", "$", ...) in the user or password field it doesn't do anything. I'm using the gtk3 greeter, but it doesn't work with other greeters aswell.

I configured the keyboard and the locale like described in the Arch Linux installation guide and it also says in the top right corner of LightDM "de_DE.utf-8".

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
TeHeRu33
  • 181
  • 1
  • 1
  • 6

5 Answers5

8

The problem was that I forgot the file /etc/X11/xorg.conf.d/20-keyboard.conf . I created it with the content:

Section "InputClass"
    Identifier "keyboard"
    MatchIsKeyboard "yes"
    Option "XkbLayout" "de"
    Option "XkbVariant" "nodeadkeys"
EndSection

and now LightDM works.

TeHeRu33
  • 181
  • 1
  • 1
  • 6
  • 1
    Here is the pertaining [Arch documentation](https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files). – Serge Stroobandt Oct 27 '16 at 12:39
  • The `localectl list-x11-keymap-layouts` command will list all available keyboard layouts/maps. – Serge Stroobandt Oct 27 '16 at 20:32
  • Nowadays, the Arch documentation recommends `localectl [--no-convert] set-x11-keymap layout [model [variant [options]]]` over manual edits – it works well in 2022. – Hermann Jan 16 '22 at 11:35
3

I edited /etc/lightdm/lightdm.conf and under the section [Seat:*] I added a line:

display-setup-script=setxkbmap de

to get my layout (I use dvorak but I think you'll want de perhaps) layout in the display manager/greeter. The installed keymaps can be listed with ls /usr/share/kbd/keymaps/i386 and you probably want de for yours.

Peter Lyons
  • 464
  • 2
  • 5
  • 12
2

On Xubuntu

On Xubuntu, I had to create a file in a different directory:

$ cd /etc/lightdm/lightdm.conf.d
$ sudo touch 00-keyboard.conf
$ sudo nano 00-keyboard.conf

with this contents for a Belgian be keyboard:

[SeatDefaults]
display-setup-script=/usr/bin/setxkbmap be oss

The command setxkbmap is provided by the package x11-utils, hence

$ sudo apt install x11-utils

The available keyboard codes are listed with:

$ localectl list-x11-keymap-layouts

While you are at it, you might also want to ensure that NumLock is active during LightDM login. This can be achieved by appending an additional line to that very same 00-keyboard.conf configuration file:

[SeatDefaults]
display-setup-script=/usr/bin/setxkbmap be oss
greeter-setup-script=/usr/bin/numlockx on

Of course, this requires that the numlockx package is installed:

$ sudo apt install numlockx
Serge Stroobandt
  • 2,314
  • 3
  • 32
  • 36
0

With my linux mint (which is an Ubuntu derivative, so I suppose it should wok with other Ubuntu based distros):

Looking in file /etc/default/keyboard, there is a line like XKBLAYOUT="us".

I replaced us by fr (for my french keyboard) and it works.

user313492
  • 101
  • 1
0

display-setup-script=setxkbmap de works for the local console. However it breaks dynamic vnc sessions startup.

If you need to also supports such sessions, ignore command errors, like

display-setup-script=/usr/bin/bash -c "setxkbmap de >/dev/null 2>&1 || :"
guest
  • 1