Mighty Mouse with udev and horizontal scrolling on Debian

This may not be the best way to do things, but this was the combination I seemed to need to get an Apple Mighty Mouse working with an IA64 desktop and udev, including horizontal scrolling.

I found that the current event input drivers shipped with the Debian X.org release weren't quite up to the job for me; I ended up with something about not being able to connect to the brain. Upstream has a better version in CVS, but I had all sorts of problems with CVS X.org for IA64.

Firstly the udev rules. If you add to /etc/udev/rules.d/mightymouse.rules

KERNEL=="event*", SYSFS{manufacturer}="Mitsumi Electric", SYSFS{product}="Apple Optical USB Mouse", NAME="input/mightymouse", MODE="0644"

Your mouse should appear on /dev/input/mightymouse when you plug it in.

Next grab the X.org source with apt-get source xserver-xorg. Then in the exapanded directory go to debian/patches/general and do

wget http://bugs.debian.org/cgi-bin/bugreport.cgi/052_evdev.diff?bug=325807;msg=5;att=1

to get a backport (with an extra little bit I put in for the Mighty Mouse horizontal scroll). Then edit debian/patches/series to remove the 053_lnx_evdev.diff, 054_lnx_evdev_mouse.diff and 055_lnx_evdev_keyboard.diff patches from the list, and add 052_evdev.diff.

I'm a bit unclear as to how the manifest system works; I modified MAINIFEST.ia64.in to have the new usr/X11R6/lib/modules/input/evdev_drv.o file, but that didn't seem to get it included in the package. If anyone can tell me how it is supposed to work that would be great, and I'll update this.

So build with fakeroot debian/rules binary or similar, and install the new xserver-xorg package. I then had to hand copy from debian/tmp/usr/X11R6/lib/modules/input/evdev_drv.o to /usr/X11R6/lib/modules/input/evdev_drv.o because the manifest thing didn't work.

Anyway, finally modify your mouse section to look like

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "evdev"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/mightymouse"
EndSection

and for me everything "just works", with the exception of Firefox which binds the horizontal scroll to the history buttons, which with such a small wheel makes surfing very hard. See this hint on how to fix it.