Keyboard layout

Hey again :smiley:

after fresh install of qubesOS, I looked 10 times for the right keyboard layout and chose the german layout for the system. In dom0 I have aösp german layout set. BUT just as always, if I plug the keyboard it has english layout. So wtf (sorry)? Just wondering.

Sure, there is:

But is there still no possibility just to change system layout to german?? Is it because of hitler?

Best regards
qun

It’s great that you’re starting from a fresh install, because that makes it easier to debug the issue. But could you please explain very systematically what you have done so far?

Have you tried running:

setxkbmap -layout "de,us"

In the AppVM? If that allows you to type German, then following this post will allow you to make it permanent and across all VMs.

If it doesn’t work, then run sudo dnf install xkeyboard-config and try again.

yes, the layout changes if I setxbmap to “de” within the AppVM. I knew already your post regarding this issue, but 1. I didn’t really understand the thing with “salt” (for it’s the only way to make it persistant within all VMs) and 2. this problem seems to be rather old, are there still no better workarounds?

This is a known recurring bug in Qubes (see Qubes issue 1396 and 8035). You can give those issues a thumbs-up to draw more attention to them.

What I gave you is the best workaround I know of. There is an easy version and a hard version.

Easy version

In the TemplateVM, create /etc/profile.d/keyboard.sh:

setxkbmap -layout "de,us"

This will allow you to use German in all AppVMs based on the template VM. E.g. if you are using the default setup, everything will be based on fedora-37. So open fedora-37 and create that file and now all your AppVMs should default to German, but you can switch to English with Alt + Shift.

Downside: If you install new templates, e.g. debian-11 or fedora-38, you will have to repeat this process for each template.

The hard version automates this with SALT so that you don’t have to repeat this process every time you update to a new version of Fedora.

Why use the hard version?

Because the power of Linux is that you can customize it with the command line and text files. You can create simple files like the above to change the behavior of the system. Unfortunately with Qubes, all those changes are lost every time you update to a new Template. So SALT allows you to persist these changes.

All the SALT script I linked does is tell Qubes to create that file.

If you learn how to use SALT, you will be able to persist your installed packages, customizations like this, etc, when you update your template.

Let me know if you need further help.

thanks a lot! I’ll try it next days!

#Edit: I made a file in the TemplateVM and the first time it worked. But it’s not persistant. After a reboot of the VM it doesn’t change the layout. So before I will try to make it with the SALT, I should get it work that way.

Workaround that works for me is that when I switch layout in dom0 for the focused qube, it doesn’t do it. Then I just pop up and focus another qube, and come back to desired qube, and new layout is there. Weird, I know, but I just don’t want to have installed layouts in tens of dozens of templates…