SDDM Multiple keyboard layouts

Hi!

Before Plasma 6 I had a working setup for SDDM that allowed me to switch my keyboard layout. As I use a laptop that has a different keyboard layout from my everyday keyboard, I would like to still be able to login using the laptop’s keyboard.

By looking at various ressources online, I created the following file /etc/sddm.conf.d/10-wayland.conf

[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

However, now I don’t have the keyboard layout menu in the SDDM greeter. Is there a way to bring it back?

Here is the output of localectl

System Locale: LANG=en_US.UTF-8
    VC Keymap: fr
   X11 Layout: us,fr
    X11 Model: grp:alt_shift_toggle

And the content of ~/.config/kxkbrc

[$Version]
update_info=kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions,kxkb_variants.upd:split-variants

[Layout]
DisplayNames=,,
LayoutList=us,ru,fr
Options=grp:lalt_lshift_toggle,caps:escape
ResetOldOptions=true
Use=true
VariantList=qwerty-fr,,azerty

I have not used sddm on wayland, but while RTFM (man sddm.conf and kwin_wayland --help), I would remove --locale1 from the wayland command. Also, despite security warnings, I would test what happens without --no-global-shortcuts.

After determining the behavior, you could modify the command to what is suitable to your requirements.

I tried combinations of both or only one of the options, it didn’t work. If I understand correctly, according to this and this, the fix should be in version 0.20 and I should be using kwin_wayland --locale1.

@temnyles
I fought and went towards the lower resistance: LightDM


localectl --no-convert set-x11-keymap fr,pl,hu

/etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
theme-name = Breeze-Dark
icon-theme-name = breeze
indicators = ~host;~spacer;~spacer;~layout;~spacer;~language;~session;~a11y;~clock;~power
position = 50%,center 25%,center
a11y-states = ~keyboard;~font

Destination: Plasma (Wayland) session

1 Like