I've been using for years my own custom made keyboard layout. It's fairly easy to create and use a new layout. However I frequently reinstall my system and each time I do, I need to add my custom layout again and again.
I want to know is it possible to keep my files somewhere safe, for example, under my /home
dir, instead of /usr/share
? Ideally, I would love to be able to create only two files
~/.xkb/rules/myevdev.xml
~/.xmb/symbols/my_lng
and then have Xkb pick them up somehow. Here are my questions:
- Is anything like this possible?
- If yes, would I need to copy the entire
evdev.xml
file to my /home dir and then add my rule in it, or can I keep it clean and only have it contain my rule and no other (and have Xkb somehow integrate it with the existing/usr/share/X11/xkb/rules/evdev.xml
)? - Would a different location be more suitable for these custom files? How about if I want multiple users to have access to the custom layout?
- A bonus question: If I wanted to build my own
.deb
installation for my custom layout, what would be an ideal file and folder structure in this case? Where could it be installed so as not to affect the system files and not get overwritten during an upgrade/reinstall?
So far I've tried fiddling with the setxkbmap, but nothing seems to work the way I'd expect. I tried setting the -rules
option, but my file isn't detected.
Thanks in advance.
I don't think it's possible to do what you want. There are a few possible approaches which are described in answers to other questions.
As regards a .deb file, one way is to write a patch with your customizations and build your own
xkb-data
package from a customxkeyboard-config
source.In this PPA you find an example of patching
xkeyboard-config
including the exact debdiff compared to the source in the Ubuntu archive.You can compile a modified configuration. I did a similar thing here: https://askubuntu.com/a/794087/514921.
Basically the idea is to print the existing configuration, add references to your local additions via e.g. sed, and compile the result. Do this in a script that is run at login. None of the commands require root access.