max-moser / lightdm-elephant-greeter

A simple LightDM greeter that can run under Wayland.
MIT License
61 stars 3 forks source link

Change keyboard layout? #1

Open HiImJulien opened 3 years ago

HiImJulien commented 3 years ago

Hey there!

I am trying to setup a system without a Xorg server. So far everything works fine except for the keyboard layout:

But I cannot login because the greeter uses a QWERTY layout while my keyboard is a German one.

What I have tried so far:

max-moser commented 3 years ago

Hey, thanks for giving elephant greeter a shot!

Unfortunately, I haven't been using keyboard layouts different from US for a while now, and this issue hasn't even really crossed my mind...

I just quickly checked cage, and it is referencing XKB_DEFAULT_LAYOUT to set the keymap: https://github.com/Hjdskes/cage/blob/master/seat.c#L361 So it looks like that's a promising route at least.

I'll try to have a look at it when I find some time :slightly_smiling_face:

max-moser commented 2 years ago

Hey, @HiImJulien !

I found a section about XKB environment variables in cage's wiki.

One possibility to change the keyboard layout would then be to change the Exec line in the lightdm-elephant-greeter.desktop file (worked for me): Exec=env XKB_DEFAULT_LAYOUT=de XKB_DEFAULT_VARIANT=nodeadkeys cage -m last -s -d elephant-greeter.py Of course that won't help you when you want to change the keyboard layout in the greeter at runtime, but it's better than nothing :sweat_smile: