~bin/
things in my bin
Tue Mar 9 16:54:39 2010

Successive versions of Ubuntu have moved farther and farther from using xorg.conf to do stuff. In Karmic, to get (vertical and horizontal) scrolling with middleclick+mouse on my x61t, I had to write a magic hal policy file:

OLD AND BUSTED:

In /etc/hal/fdi/policy/10-mouse.fdi (or something):

<match key="info.product" string="TPPS/2 IBM TrackPoint">
 <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
 <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
 <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
</match>

In Lucid, hal is old and busted, and udev is the new hotness. hal is gone, so of course scrolling broke. It took a while to find the udev way:

NEW HOTNESS:

In /etc/udev/rules.d/99-local-xorg.rules (or something):

ACTION!="add|change", GOTO="xorg_local_end"
KERNEL!="event*", GOTO="xorg_local_end"

ENV{ID_INPUT_MOUSE}!="1", GOTO="xorg_local_end"
ATTRS{idProduct}!="TPPS/2 IBM TrackPoint", GOTO="xorg_local_end"

ENV{x11_options.EmulateWheel}="true"
ENV{x11_options.EmulateWheelButton}="2"
ENV{x11_options.YAxisMapping}="4 5"
ENV{x11_options.XAxisMapping}="6 7"
ENV{x11_options.Emulate3Buttons}="false"
ENV{x11_options.EmulateWheelTimeout}="200"

LABEL="xorg_local_end"

It was hard to find a lot of useful information on udev rules, these urls helped, especially the kubuntu link:

https://wiki.ubuntu.com/X/Config/Input
http://daniel.hahler.de/hal-configuration-fdi-for-kingsis-peripherals-evoluent-verticalmouse-3
https://wiki.kubuntu.org/X/InputConfiguration

The tool you use to get some sort of idea what udev stuff is udevadm. I dunno a lot about it, but here's some of the kind of stuff you do with it ...

UDEVADM EXAMPLES:

udevadm info --query=all --attribute-walk --name="/dev/input/event7
udevadm info --query=all --attribute-walk --name="/dev/input/by-path/platform-i8042-serio-1-event-mouse
udevadm info --query=all --path="/devices/platform/i8042/serio1/input/input7"
udevadm info --query=all --attribute-walk --path=/sys/class/input/mouse1