These instructions are valid in Ubuntu up to 16.04 at least. It may break if you're using Wayland instead of X11.
You can do it manually, or using GNU Stow and the provided stow_setup
scripts.
-
Copy the keyboard definition file (e.g.
us_rod
) to/usr/share/X11/xkb/symbols
. -
Open the layouts file (
/usr/share/X11/xkb/rules/evdev.xml
), above the<layoutList/>
closing tag, paste the XML snippet with the layout definition (e.g.us_rod_layout.xml
).
-
From the parent directory:
sudo stow -t /usr/share/X11/xkb keylayout
-
cd keylayout && sudo ./setup
which installs the layout xml
In the layout definition's shortDescription
tag, only some results are accepted,
such as "en" or "pt". If you pick, for example, "us", the keyboard icon in the panel
indicator will still be active, but will have a dark background.
To reload changes you must the X session (in Gnome: Alt-F2 r )