I'd like to automatically disable the touchpad on my Thinkpad X301 after the system boots up.

I can successfully run the script manually, but when I try to execute it by any autostart method, it just won't do.

The script looks like that:

xinput set-prop 10 "Device Enabled" 0
exit 0
  • I checked that the ID is correct with xinput list.
  • I have granted execution rights to the script.

What I've tried with no success:

  • to add it to Startup Applications in Control Center
  • put a disable_touchpad.desktop file to ~/.config/autostart with the following content:

    [Desktop Entry]
    Name=Disable Touchpad

I also tried to put the script from my home folder to /usr/local/bin (and edit the file above accordingly), did not make any difference.

Currently I put the script to my Desktop and I manually execute it every time.

I know that there is one more way to try, which is using crontab and @reboot, but I would prefer the options above and would really like to know why these approaches don't work.

What am I doing wrong?

  • Have you checked if the script executes at all? Maybe add a date > /tmp/log to it and see if the file /tmp/log gets created?
    – muru
    Feb 6, 2016 at 12:18
  • Well, if I execute it manually it disables the touchpad with no problem. Do you think I should add it to the script anyway? Feb 6, 2016 at 12:28
  • There are two possibilities: either the script executes at startup and something else fails, or the script doesn't execute at startup. We can eliminate one possibility.
    – muru
    Feb 6, 2016 at 12:30
  • Thank you for your kind help, editinit's recommendation worked. So the script ran successfully. But thank you again! Feb 6, 2016 at 12:40
  • 3
    Possible duplicate of "Startup Applications" not working Feb 6, 2016 at 12:45

1 Answer 1


Might be ubuntu-mate startup program taking time to load(touchpad driver). you can try adding sleep into your above script.

sleep 30
xinput set-prop 10 "Device Enabled" 0
exit 0

Please increase the sleep time if above does not work.

  • You're a genius! :) It did not work with 30, but I increased it to 60 and it's perfect. I added the script to startup applications and now it works like a charm. Thank you! Feb 6, 2016 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.