I have edited the crontab on dom0 using the command:
$ crontab -e
And added the following lines in it:
# Run the script disabling the touchpad once
# at every reboot
@reboot bash /home/tanky0u/.local/bin/disable_touchpad
The disable_touchpad script is a simple one. And it works successfully when I call the bash to execute it manually: $ bash /home/tanky0u/.local/bin/disable_touchpad
However, when I reboot the QubesOS, the TouchPad is still functional, and thus I believe the cronjob isn’t executed.
How can I get this cronjob executed in dom0?
Edit: For the sake of clarity, here’s the full content of disable_touchpad script:
#!/bin/bash
# disable_touchpad -- Disables the TouchPad using xinput.
# Find the device ID of the TouchPad
declare -i ID
ID=`xinput --list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
# Disable it
xinput --disable $ID
Hmm… this seems to be a problem that’s plaguing debian/ubuntu distros; which makes sense given I have made Debian as the default distro in my QubesOS (so the dom0 must also be a debian OS).
So, schucks!, I just wanted to get a script execute once per QubesOS boot and not deal with systemd stuff that I do not understand. I wasn’t expecting to bump into an esoteric bug about @reboot.