Compose foreign characters on Linux
If you need to add an umlaut (á) or eñe (ñ) to a character you can do so easily. First you need to make a change to your keyboard map. The following script will do that.
cat >~/.Xmodmap <<EOF clear Lock keycode 0x42 = Multi_key Mode_switch EOF xmodmap .Xmodmap
Once you've executed this script you may put the following in your .bashrc if you are running bash or whatever startup script you use for your shell. Note that this changes the function of the caps lock key, which may be considered a good thing.
Once you have executed xmodmap you can create all sort of special characters by pressing and releasing the caps lock key, pressing a symbol followed by a letter. Here's a list of some of the characters that can be created: <CL> = cap lock
That last one isn't an “i”, it's an inverted exclamation point. There are other combinations. I just haven't found them yet.