This answer shall explain how to install the Dvorak international extended keyboard layout found in this article by Arjen van Kol. The installation and setup were fairly straightforward using XKB.
Install new layout
Download the layout file dvorak_intl
from the linked article. Then, copy the file as superuser to /usr/share/X11/xkb/symbols/
with the same filename.
sudo cp dvorak_intl /usr/share/X11/xkb/symbols/dvorak_intl
No need to further change permission. For curious users, use stat
command to check the permission. The permission is 644
by default.
$ ls -l /usr/share/X11/xkb/symbols/dvorak_intl
-rw-r--r-- 1 root root 2989 May 14 17:32 /usr/share/X11/xkb/symbols/dvorak_intl
$ stat -c '%a %n' /usr/share/X11/xkb/symbols/dvorak_intl
644 /usr/share/X11/xkb/symbols/dvorak_intl
Apply new layout
Before making changes, run setxkbmap -query
to check the current layout in case we want to revert the changes later. The layout is us
by default.
$ setxkbmap -query
rules: evdev
model: pc105
layout: us <-- current layout
Now, run setxkbmap
command to set the new keyboard layout. The -verbose
option was added to see the output, which otherwise will show nothing.
$ setxkbmap -verbose dvorak_intl
Warning! Multiple definitions of keyboard layout
Using command line, ignoring X server
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+dvorak_intl+inet(evdev)
geometry: pc(pc105)
User can run again setxkbmap -query
to verify the changes that have been made and now being shown in the layout column.
$ setxkbmap -query
rules: evdev
model: pc105
layout: dvorak_intl <-- new layout
Test new layout
The changes will be effective immediately; no need to logout or reload X server at all. Open a text editor, then press each keys of four rows on the keyboard to see the output.
First and second level keys (without and with Shift):
`1234567890[]
~!@#$%^&*(){}
´,.pyfgcrl/=\
¨<>PYFGCRL?+|
aoeuidhtns-
AOEUIDHTNS_
;qjkxbmwvz
:QJKXBMWVZ
Third and fourth level keys (with AltGr and Shift+AltGr):
¡ ♯
[]{}
´¸… č
«»¶ ¿
å°əŭ ß—
Å Ŭ ¯
ĸ×
Not sure if there is any missing keys for third and fourth levels for the keyboard layout dvorak_intl
, since I am not used to typing at these levels.
Make layout persistent
The setxkbmap
command by itself is effective for current session only. However, it is possible to add the following command to startup applications in respective desktop environment.
setxkbmap LAYOUTNAME
So that the LAYOUTNAME
will be set up every time the user logs into the system and the desktop session is started. Log out and log in again, then open Terminal and run setxkbmap -query
to verify that new keyboard layout has been applied for every sessions.
Configure for non-Debian system
Should the system upgrade overwrites the configuration file in /usr/share/X11/xkb/symbols
, then user may relocate the layout configuration file at somewhere else--perhaps Home directory--and remove from system directory to be sure.
$ mkdir -p ~/.xkb/symbols
$ cp /usr/share/X11/xkb/symbols/dvorak_intl ~/.xkb/symbols
$ sudo rm -i /usr/share/X11/xkb/symbols/dvorak_intl
Then load the layout configuration from there, using the command with -I
option. It works similarly.
$ setxkbmap -I ~/.xkb dvorak_intl
$ setxkbmap -query
rules: evdev
model: pc105
layout: dvorak_intl
So instead of setxkbmap LAYOUTNAME
, add setxkbmap -I ~/.xkb LAYOUTNAME
to startup application in respective desktop environment to load the keyboard configuration for every sessions.
Discrepancy in Debian
If the command returns "Error loading new keyboard description" message (as described by this older post on Unix.SE), then use the following command instead.
$ setxkbmap -I ~/.xkb dvorak_intl -print | xkbcomp -I$HOME/.xkb - $DISPLAY
Warning: Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
Ignoring extra symbols
Warning: Key <OUTP> not found in evdev+aliases(qwerty) keycodes
Symbols ignored
...
Warning: No symbols defined for <I253> (keycode 253)
Strangely, the last command returns many warning messages that may be related to my foreign keyboard model (Japanese OADG 109A keyboard layout variant). Also, the changes won't be reflected in setxkbmap -query
but works as expected when typed.
Tested using setxkbmap 1.3.0 in Xubuntu 14.04 (Xfce 4.10), Debian Xfce 8 (Xfce 4.10) and Debian 8.7 Gnome 3.14.
Disclaimer: This answer is intended to show how to use XKB to install and set new keyboard layout. The original instruction was found from the workman/xorg repository, which mentioned both legacy path and current path (for Ubuntu 10.04, GNOME 2.30 back then). However, the instruction has been tested valid for non-GNOME environment i.e. Xfce as well.
The dated instructions provided in dvorak_intl
file was most likely intended for older releases of GNOME and no longer valid for modern distributions we use today. While legacy path is found at /etc/X11/xkb/symbols/
, the current path is found at /usr/share/X11/xkb/symbols/
.
The AltGr key refers to the compose key. It is not assigned by default (at least in Xfce) or usually Right Alt key, depending on Linux distribution in use. While I have enabled compose key to demonstrate the third and fourth level keys, the setup for the compose key is not shown above.
Best Answer
Are you trying as a root user? Open the command prompt and type,
After selecting the language you want, the next time you boot, the settings will take place. To verify if the language change took place, run the below command.
However, since you want to change the keyboard layout, you can use the command,
After changing the keyboard configuration, you can verify if the change took place by using the below command.