How do I switch keyboard layout on the console?

Is there a way to change the keyboard layout on the console (entered with Ctrl-Alt-F3) from english to german?

is there really no solution?

As far as I know, there should be something like loadkeys in /bin but I cannot find it in EndlessOS

Unfortunately there is no simple solution for this issue, as the required keyboard layouts and tools for the console are not shipped with Endless OS, as this is a rather unusal requirement for the main audience :slight_smile:

You can howerver take the long road and put the necessary files into /usr/local, by first grabbing them from a Ubuntu Focal repository. The following two files are needed:

/usr/local/bin/loadkeys
/usr/local/bin/ckbcomp

Please note that these binaries will probably break at some time in the future as the ABI may change without notice.

http://mirrors.kernel.org/ubuntu/pool/main/c/console-setup/console-setup_1.194ubuntu3_all.deb
http://mirrors.kernel.org/ubuntu/pool/main/k/kbd/kbd_2.0.4-4ubuntu2_amd64.deb

thanks Egon. I’ll try to use dumpkeys on my Q4OS (Debian Bullseye derivate) installation living on an usb-stick, check that its kernel version and the kernel version of EndlessOS are equal/comparable and the use loadkeys from the Q4OS installation under EndlessOS. I’ll post results here …

More important than the kernel version are the versions of the shared libraries the application links to, especially the LIBC. You can check the version required with ldd:

egon@s01-r2700pro:~$ ldd /usr/local/bin/loadkeys
	linux-vdso.so.1 (0x00007fff0f8c8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6212433000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6212642000)

In the above output, the most important one is libc.so.6, which has version 2.31 on Endless OS:

egon@s01-r2700pro:~$ ls -al /lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 3 root root 12 Mar  3 22:56 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so

This is also the version used by Ubuntu Focal (20.04), so i used the version from there.

thanks. Q4OS libc is also libc-2.31.so, so it might work, but currently my EndlessOS does not boot anymore, I opened another topic with some screenshots of the boot messages … it is finally stuck at Failed to start the Accounts Service (endlessly repeating this message with delay of about two minutes between lines), but there are quite some other strange error messages before.

using dumpkeys mykeymap under Q4OS and using the Q4OS version of loadkeys under EndlessOS as root with loadkeys mykeymap switches the console(s) keyboard layout to a usable version.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.