Select Page

If you’re setting up Ubuntu on a MacBook Pro like I am, do yourself a favor and read the excellent and thorough documentation at the Ubuntu site. The benefit to installing on such a specific, set of components common to many, many users is that you aren’t the first one to figure out the configuration.

One note that may help you skip some frustration- when you install the pommed service as they recommend, do this instead of setting the keyboard model to be MacBook Pro specifically. Leave it as the default Apple configuration, or ‘Apple Laptop’. pommed maps a lot of special things to your keyboard that seem to break if you actually set the model correctly.

If you do want to set the keyboard, read the Mapping the apple key to Alt (or whatever) part of this guy’s instructions to get your keyboard to do exactly what you want. If I were you I’d stick to pommed.

Use the command xev to find that the key codes for the left and right apple keys are 115 and 116. I just made them Alt keys by adding this to my $HOME/.xmodmap file:

keycode 115 = Alt_L
keycode 116 = Alt_R

You then have to run

xmodmap $HOME/.xmodmap

to make this take effect. (You should add this somewhere that is run when you start X windows. What’s a good place??)

One thing I noticed after following this instructions was that without me doing anything, the next time I logged in, the desktop asked if I wanted to load in the xmodmap I had made automatically from now on. Very cool.