Blog Post

1 mouse, 2 mouse, IT WORKS!

Thanks to muzzol for the solution to the plug/unplug detection of an external USB mouse and disabling/enabling the Synaptics Touchpad. And now the answer you have all be waiting for!

Add the following line to your /etc/udev/rules.d/85-hal.rules file:

KERNEL==”mouse*”, RUN+=”/usr/bin/”

Once you have added that, the next step would be to create the /usr/bin/ file. Here is what is in that file:

#echo “$DATE – [$*] – [$ACTION]” >> “$FLOG”
case $ACTION in
#echo “DEBUG: conectat” >> “$FLOG”
synclient TouchpadOff=1
#echo “DEBUG: desconectat” >> “$FLOG”
synclient TouchpadOff=0

Uncomment (remove the #) from the lines in the code if you want the script to log to /tmp/udev_test.log every time you plug/unplug your mouse. DO NOT remove the # from the #!/bin/bash line. And that concludes this tutorial. Thanks again to muzzol who left a comment in my previous post.

UPDATE: I forgot to mention that you need to make one small edit to your /etc/X11/xorg.conf file in order for the synclient command to work. Under InputDevice section, look for the Identifier for “Synaptics Touchpad”. This is where you want to add the following extra option:

Option “SHMConfig” “on”

This entry was posted in Linux and tagged . Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • Archives