You are not logged in.
Hi, I have a Dell notebook with a synaptics touchpad, and I'd like to disable it when I plug a mouse in, and reactivate when I disconnect the mouse. I found that the following udev rule will do the job:
ACTION=="add", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
ACTION=="remove", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
but it doesn't work. Note that I can successfully activate/deactivate the touchpad manually by issuing the above synclient commands, and that the path of synclient above is correct.
However, the udev rule does work: if I replace the commands to be executed with '/bin/touch /home/venator/touchpad_off' and '/bin/touch /home/venator/touchpad_on', these 2 files are actually touched in my home dir.
Can you help me?
Thanks
Last edited by Venator85 (2009-05-30 08:13:46)
Offline
I currently have a usb mouse i bought today, it is working, i dont even use a Xorg.conf file, as it is not needed with the recent xorg and as long hal is running. even though my usb mouse is pluged in my touchpad will work still but i dont mind as long as my usb mouse works.
ArchLinux + ZFS
Offline
I currently have a usb mouse i bought today, it is working, i dont even use a Xorg.conf file, as it is not needed with the recent xorg and as long hal is running. even though my usb mouse is pluged in my touchpad will work still but i dont mind as long as my usb mouse works.
Sounds a bit off-topic to me...
Offline
ndowens04 wrote:I currently have a usb mouse i bought today, it is working, i dont even use a Xorg.conf file, as it is not needed with the recent xorg and as long hal is running. even though my usb mouse is pluged in my touchpad will work still but i dont mind as long as my usb mouse works.
Sounds a bit off-topic to me...
not really, that's what i would do if i was you ignore the touchpad and just use the mouse :-)
ArchLinux + ZFS
Offline
I normally would, but it so strange that synclient and udev work separately but not together... I'm intrigued
Besides, I'm constantly and accidentally touching the touchpad, clicking all over... My cat does that as well, loving to lay down on the palm rest of the notebook
Last edited by Venator85 (2009-05-30 07:26:05)
Offline
Update: replaced the synclient command in the udev rule with a script calling synclient and redirecting stdout/stderr to file:
new udev rules:
ACTION=="add", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/home/venator/Desktop/touchpad off"
ACTION=="remove", SUBSYSTEM=="input", ID_CLASS="mouse", RUN+="/home/venator/Desktop/touchpad on"
/home/venator/Desktop/touchpad
#!/bin/bash
[ "$1" = "off" ] && cmd='TouchpadOff=1' || cmd='TouchpadOff=0'
/usr/bin/synclient $cmd >/home/venator/log_$1 2>&1
Here's what I have in the log files:
No protocol specified
Failed to connect to X Server.
I tried to add
export DISPLAY=':0.0'
to the script before calling synclient but nothing changes.
Any hints, other than let it go?
Offline
SOLVED!
It was enough to add the -s option (force shm mode) when calling synclient.
Offline
I know I'm bringing up an old one, but what do I do now that the -s flag doesn't work anymore? I can get the script to fire, but the log still complains about not having an X server.
Offline
Try this thread.
“First principle, Clarice. Simplicity” – Dr. Hannibal Lecter
Offline