Make a directory tree under
/home/<user>/ which has the same structure as
/usr/share/X11/xkb/. In other words:
$ tree -L 1
So put the relevant files in
symbols, etc. You obviously don’t need to make empty directories, just the directories for the files that you need.
Then consider renaming your symbols file to something different than
us. There might be a way to disambiguate your own
us symbols file from the one under
/usr/share/X11/xkb/, but it is easier to just pick a new name which doesn’t appear in
mine will do fine.
Let’s say that you put your custom Xkb directory at
/home/<user>/my-xkb and that your custom symbols file is named
If you use
setxkbmap(1) to set your layout you simply need to change it to print its output and pipe it to
xkbcomp(1). So if this is your
You will need to change it to this:
setxkbmap mine -print |
xkbcomp -I"/home/<user>/my-xkb" - "$DISPLAY"