1

I've got a udev rule that is properly matching, but it is not executing the command in the RUN+="/usr/bin/synclient TouchpadOff=1" properly. If I change that to be some sort of test shell script then it works fine.

If I run synclient TouchpadOff=1 from the command line I get no return and it doesn't work. However, adding sudo to that line disables the touchpad as intended.

Is udev not executing this command with superuser permissions?

Ubuntu 15.04

1 Answer 1

2

synclient depends on X server to work. See man synclient. So you need to define the DISPLAY and XAUTHORITY environment variables of the current running server.

If you are using just a single user account with simple server setup, try this:

RUN+="/bin/sh -c 'DISPLAY=:0 XAUTHORITY=/home/<username>/.Xauthority synclient TouchpadOff=1'"

Change <username> to your username.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .