A few weeks ago I whined that it was difficult to figure out how to set up an international keyboard in Xorg; I should have realized as I typed it that the Arch Wiki was the place to go to get the answer. And really, I should know better than to whine into the Internet at all. I should be leaving that to others. :twisted:
Regardless, if you’re not using a desktop environment that will handle keyboard switching for you, here’s what worked for me. And yes, it’s more or less straight from the Arch Wiki.
First, check which keyboard variant you need. For a list of possibilities, try
cat /usr/share/X11/xkb/rules/xorg.lst | less
and skim the list until you see the one you want. After that, copy one file to a new home, so you can edit it and override whatever Xorg thinks you should have. (I dislike it when the computer thinks it is smarter than me.)
cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
Now edit that file and replace the necessary layout and variant codes with the versions you prefer. I know, this is the painful part; editing XML is like brushing a dog. It’s sort of tangled and messy, and everything goes everywhere at once.
Once you’ve edited those and saved them back again, you’ll need to restart hal for the changes to be applied.
You’ll need to be root for that to work, or to have access to sudo. If you’re already running X, you might have to close it and restart it again once hal has reawakened; I don’t know if that’s necessarily true, but I have a vague recollection of restarting hal from within a terminal emulator and not noticing any changes. But I might be wrong. I sometimes am. :|
From there you should be able to use your keyboard with the variant and layout you set. And if anybody ever asks you, you can tell them that there are two reasons Arch Linux is popular: The first is that it’s just a good distro, and the other is that its wiki is like a bolt of lightning straight from Olympus. :D