A big thank you to everyone who has contributed these tips, esp. the OP
Below are the steps that work for me, for the record.
Note the importance of removing the .xkm files. To test that your layout is being read properly, do something silly like assigning the number 1 to the letter z. These .xkm files nearly drove me mad.
Code:
3-step instructions (see further down for details):
sudo cp ~/workspace/dv.txt /usr/share/X11/xkb/symbols/dv # copy layout, remove .txt extension in the process
sudo rm /var/lib/xkb/*.xkm # force recompile of the xkm files
sudo rm /usr/share/X11/xkb/symbols/dv~ # clean up
Dvorak customized keyboard layout for Ubuntu
version 0.01
ptoche
Install instructions:
replace -kate- by your editor, e.g. -gedit-
1.
copy the layout file dv into /usr/share/X11/xkb/symbols
$ sudo cp ~/mykeyboard/dv /usr/share/X11/xkb/symbols
2.
edit the evdev.xml file to include a reference to the new layout:
$ sudo kate /usr/share/X11/xkb/rules/evdev.xml
In the editor, insert the following reference to the layout:
<layoutList>
<layout>
...
</layout>
<layout>
<configItem>
<name>dv</name>
<shortDescription>dv</shortDescription>
<description>myDvorak</description>
<languageList><iso639Id>eng</iso639Id></languageList>
</configItem>
<variantList>
<variant>
<configItem>
<name>dv-variant</name>
<description>myDvorakVariant</description>
</configItem>
</variant>
</variantList>
</layout>
</layoutList>
This may need to be done again after a major operating system upgrade.
3.
$ sudo kate /usr/share/X11/xkb/rules/evdev.lst
In the editor, add the following line to the end of the layout section :
!model
...
!layout
...
dv Dvorak Layout (Custom)
!variant
...
This may need to be done again after a major operating system upgrade.
4.
$ sudo rm /var/lib/xkb/*.xkm
According to 'man setkxbmap':
"An XKB keymap is constructed from a number of components which are compiled only as needed.
The source for all of the components can be found in /usr/share/X11/xkb"
The new layout will have no effect until the system recompiles.
Removing the .xkm files forces a recompilation.
and just in case, remove any backup of your custom layout:
$ sudo rm /usr/share/X11/xkb/symbols/dv~
2013/04/05
Bookmarks