I've decided to retire this blog — I don't really see
myself updating it any time soon, and haven't for over two
years anyway. I intend to leave the content on-line for the
forseeable future, but have converted it to a static site. As a
result, dynamic things like search and comments aren't really
going to work.

You can find me on
Twitter or on
Google+
if you like. Alternatively, I'm usually on IRC as LawnGnome on
Freenode.

I’ve had to contend with a few little annoyances since installing Ubuntu 7.10 on my new MacBook Pro, so here’s a short list of things that might help if you find yourself with the same issues I’ve had.

Problem: Without mouseemu, there’s no way to use middle and right click from the keyboard.

As long as you don’t need the mouse outside of X and don’t really care whether NumLock actually results in numbers rather than mouse movements, you can solve this with xmodmap and mouse keys support. In short:

Create a file called .xmodmaprc in your home directory with the following contents:

keycode 95 = Pointer_Button2
keycode 96 = Pointer_Button3

These keycodes correspond to F11 and F12 for me — you can change them to whatever you’d prefer for the middle and right click functions. xev will give you the keycodes for the keys you want.

Ensure that the modmap is loaded when you log in. In Gnome, this can be done through the System → Preferences → Sessions dialog box. Click Add to add an additional startup program, then ensure that the command is xmodmap /home/USER/.xmodmaprc, replacing USER with your username. Give it any name and hit OK, then close the session preferences.

Log out and log back in. The first time you log in, you should get a dialog box from xmodmap to confirm that you want to load the .xmodmaprc file — confirm that you do and that you don’t want to be asked each time, and from then on you should have the goodness of three mouse buttons again.

Problem: The keyboard backlight doesn’t work or I can’t change the display backlight brightness.

There’s a kernel module that needs to be loaded for some of these features to work. The easiest way to do it is to edit /etc/modules and appending the line applesmc. This will ensure it’s loaded on subsequent boots.

Load the applesmc module at the command line using sudo modprobe applesmc.

Install pommed (available in the universe repository, so ensure that’s enabled). These things will start working. If you’d prefer to use the function key to change volume or brightness, you can do this by editing /etc/pommed.conf and changing fnmode to 2.

Most of this is pretty minor in the grand scheme of things — it was really the issue of NumLock freezing the keyboard (particularly on waking from sleep, although I’ve had it happen a couple of times in general use as well) that led me to start looking into this. I have a Rev. D MacBook Pro, so it may be that many of these things aren’t issues on the older hardware; I don’t recommend blindly doing any of this unless you know you have a problem.

This entry was posted
on Sunday, November 18th, 2007 at 20:20 and is filed under Tech Geekery.
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.