You are not logged in.
I recently installed the test version of the linux kernel, 3.2.7-1-ARCH
Shortly after that I noticed that my touchpad was working even though my mouse was plugged in.
After looking at udev info/debug logs for way too long, I realized the mouse was coming in as mouse0
The udev script posted in the touchpad wiki detects mouse1 - mouse9.
/etc/udev/rules.d/01-touchpad.rules
ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0",
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[1-9]", ENV{DISPLAY}=":0.0",
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
Minor edit and reload using udevadm control --reload fixed the problem.
/etc/udev/rules.d/01-touchpad.rules
ACTION=="add", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", KERNEL=="mouse[0-9]", ENV{DISPLAY}=":0.0",
ENV{XAUTHORITY}="/home/USERNAME/.Xauthority", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
Someone might want to fix the wiki.
Cheers,
Mark
Offline
Is there a way to get udev to query the current user rather than having to hard-code the username?
For example:
ENV{XAUTHORITY}="/home/$USER/.Xauthority"
This attempt doesn't work, and I've tried various methods similar to that, but haven't had any luck.
Offline