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:
#!/bin/bash xinput set-prop 10 "Device Enabled" 0 exit 0
- I checked that the ID is correct with
- I have granted execution rights to the script.
What I've tried with no success:
- to add it to Startup Applications in Control Center
~/.config/autostartwith the following content:
[Desktop Entry] Type=Application Exec=/home/username/disable_touchpad.sh Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=Disable Touchpad Icon=/home/username/Pictures/icon_touchpad.png
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
@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?