Debian already installs with middle and right click mapped to F11 and F12 respectively, but on the iBook F12 is taken up by the eject key, so........
Time to remap. I'd simply find the keycodes to fn + ctrl and fn + option and map the clicks there instead of F11 and F12, and I'd be on my way. The terminal command
showkeyconveniently does this for you, except when I do it. Then it gives back
Couldnt get a file descriptor referring to the console. Crap. Instead of investigating and finding out what the hell is going on, I was feeling lazy so I just cribbed off what other people on the web did.
So here's the solution: Edit the file /etc/sysctl.conf by adding the following lines (notice there's no "/" before the dev)--
dev/mac_hid/mouse_button_emulation = 1
dev/mac_hid/mouse_button2_keycode = 97
dev/mac_hid/mouse_button3_keycode = 100
then save. This will make fn + ctl and fn + alt your middle and right click keys. Or if you prefer the command and enter key (next to the spacebar) to be middle and right click, replace 97 with 125 and 100 with 96. Desktop users will want f11 and f12, so replace 97 with 87 and 100 with 88 (desktop users only because f12 may conflict with a laptop's eject key).
To initiate changes either restart or run
sudo sysctl -p /etc/sysctl.conf
Now I have middle and right click working on the iBook as fn + ctrl and fn + option. I'm starting modestly.
UPDATE: On a new install, I noticed
mouseemuconflicts with this, so to fix it I just did a
sudo aptitude purge mouseemu. Or if you prefer to use mouseemu to emulate middle and right click, you can stick with that. Also, the
showkeycommand works as