4

I'm trying to use a custom keyboard layout variant on my linux machine. In the past, I used to modify the /usr/share/X11/xkb files (evdev.lst, evdev.xml, symbols/de) which worked well for years. But recently I switched my distro (now Opensuse Tumbleweed) which has some more "dynamics" in the xkb package thus overwriting my changes with almost every update :(

I'm well aware that changing files inside /usr/share/X11/xkb cannot be the recommended way as it's part of a maintained package. But did not manage to find a working alternative. As stated here https://lists.freedesktop.org/archives/wayland-devel/2020-January/041133.html, XKB should look in $HOME/.xkb as well as in $HOME/.config/xkb, but it seems, it doesnt:

$ setxkbmap -v 10 de colemak
Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of layout variant
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc86
layout:     de
variant:    colemak
options:    terminate:ctrl_alt_bksp,grp:alt_shift_toggle
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwertz)
types:      complete
compat:     complete
symbols:    pc+de(colemak)+inet(evdev)+terminate(ctrl_alt_bksp)+group(alt_shift_toggle)+terminate(ctrl_alt_bksp)
geometry:   pc(pc86)
Error loading new keyboard description

The same is happening when I use the -I command line argument with setxkbmap. strace confirms the output above:

$ strace setxkbmap -v 10 de colemak |& grep open
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libxkbfile.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libX11.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libXau.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/run/user/1000/xauth_ZOJrbC", O_RDONLY) = 4
openat(AT_FDCWD, "./rules/evdev-C.lst", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "./rules/evdev.lst", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/X11/xkb/rules/evdev-C.lst", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/X11/xkb/rules/evdev.lst", O_RDONLY) = 4
openat(AT_FDCWD, "/usr/share/X11/xkb/rules/evdev-C", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
openat(AT_FDCWD, "/usr/share/X11/xkb/rules/evdev", O_RDONLY) = 4

Any idea how to get custom keyboard layout running?

Any help appreciated :) Thank you!

Greetings

Tornado
  • 261
  • 1
  • 2
  • 10
  • Off-topic, not a programming question; waiting for bounty to lapse and then close-vote ... better suited for e.g. [unix.se] or [su]. – tink Oct 03 '21 at 00:32
  • You can very well change _add_ your own files to the folder you mention, but you still have to "register" your keyboard layouts. And indeed I haven't seen any other solution, despite looking for something similar for several years by now. – 0xC0000022L Feb 07 '23 at 23:03

0 Answers0