I made a file
/root/startup.sh (I am on Ubuntu with Gnome 3.22.3 with root access) with the following contents:
#!/bin/bash DISPLAY=":0" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" SHELL="/bin/bash" $(/usr/bin/xinput list > /root/Desktop/output.txt)
and I have put this line in the
crontab -e file:
* * * * * /bin/bash /root/startup.sh
but after a minute when the file
output.txt is created and when I open it it is empty and there is no contents in it.