Bug 471273

Summary: [Wayland] User-specific keyboard layouts are not available in system settings
Product: [Applications] systemsettings Reporter: Gerry Agbobada <gagbobada>
Component: kcm_keyboardAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: butirsky, gagbobada
Priority: NOR    
Version: 5.27.6   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Minimum reproducing user-specific xkb configuration

Description Gerry Agbobada 2023-06-20 20:43:15 UTC
Created attachment 159791 [details]
Minimum reproducing user-specific xkb configuration

SUMMARY

I am trying to include a custom keybioard layout (the "symbols" part) by adding my own files in ~.config/xkb~, but even after adding those files, the systemsetting dialog doesn't list the user-specific layout, so it's unusable.

The reproduction includes a tarball to untar in ~/.config, which will expand to .config/xkb with a carbon-copy of the fr(nodeadkeys) variant, but with an alternate description and slug to be actually different. I'm expecting to have this new layout appear in the list of available layout of systemsetting when running a Plasma _wayland_ session.

I mostly followed the instruction from Peter "who-t" Hutterer's blog[1] 

STEPS TO REPRODUCE
1. Unpack the xkb.tar.gz in ~/.config
2. Log out / Log back in
3. Go to systemsettings and open the keyboard layout tab
4. Search for "at Home" in the search bar

OBSERVED RESULT

Nothing is shown

EXPECTED RESULT

The "French at Home (no dead keys)" layout existing in `~/.config/xkb` should be available as a french variant (with the french flag)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.3.8-arch1-1 (64-bit)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: Version 5.15.10 (Compiled with 5.15.9)

ADDITIONAL INFORMATION

1. Note that running "xmllint --dtdvalid /usr/share/X11/xkb/rules/xkb.dtd ~/.config/xkb/rules/evdev.xml" returns no error at all (That's actually the reason I added empty `<modelList></modelList>` and `<optionList></optionList>` in the file, but I have the same bug without it)

2. I also have the bug on Fedora 37 and Fedora 38, hence why I create the bug here

3. I know that somehow libxkbcommon still go through these files at startup, because at some point I tried to "fix" my issue by renaming "rules/evdev.lst" to "rules/evdev", and that created a syntax error somewhere that made _all_ (GNOME, Plasma, Hyprland) sessions to crash on start and go back to SDDM. I could only log in using X11 sessions (which is coherent with Peter's blog [2] that states user-specific xkb configuration is a wayland-only thing I suppose)

[1]: https://who-t.blogspot.com/2020/09/user-specific-xkb-configuration-putting.html to try to get it working
[2]: https://who-t.blogspot.com/2020/09/no-user-specific-xkb-configuration-in-x.html
Comment 1 Andrey 2023-06-20 20:53:55 UTC
Please read bug 432818 comments carefully about how to make it work without GUI configuration.

*** This bug has been marked as a duplicate of bug 432818 ***