Recently in Linux Category

Boot Process

Ubuntu has abandoned inittab in favour of their homegrown upstart, not in itself a bad thing, but as shipped it is not configured in such a way that some very useful behaviour of inittab is replicated.

Not having the three extra Swedish vowels (ä, å and ö) readily accessible on a keyboard can be a real pain. What follows is a very simple solution for users of The X Window System, including everyone using GNU/Linux like me.


The solution is to use xmodmap to replace characters that you never use with the three Swedish vowels. Ubuntu Linux, my current distro of choice, is set up with the level 3 modifier key enabled. This means that the Alt Gr (the “Alt” key to the right of the space-bar) works a lot like Shift, but selects a third set of symbols. It turns out that most of these are pretty useless to me, so I just replaced a few of them.

By experiment, I found that the default mapping has lots of characters I never used. I wanted something easy to remember, so I decided to remap AltGr-o to produce ö, replacing the ø used in Danish and Norwegian; AltGr-q to produce ä, replacing capital greek Omega; and AltGr-w to produce å, replacing l-slash as used in Polish. Note that ä and å are “over the a”, with the å, which sounds like “aw”, on the w key. I find this easy to remember, but you can remap as you wish with trivial and obvious changes to the following instructions.

You can remap individual keys at the console like this:

$ xmodmap -e "keysym w = w W aring Aring aring Aring"

I put the whole remapping into a shell-script, which works just great. I put a call to it into my startup programs in Xfce, the default window-manager on Xubuntu, which I use on my aging laptop.


cat <<EOF | xmodmap -
keysym q = q Q adiaeresis Adiaeresis adiaeresis Adiaeresis
keysym w = w W aring Aring aring Aring
keysym o = o O odiaeresis Odiaeresis odiaeresis Odiaeresis

I don't know of an equally simple solution for users of Microsoft Windows as I eschew that platform.