I put this line in the crontab:
1 * * * * DISPLAY=:0.0 /usr/bin/gnome-terminal -e /home/user/Desktop/mltpl
The script is executable.
If paste that command in the terminal--that is, the string without stars, it works perfectly:
DISPLAY=:0.0 /usr/bin/gnome-terminal -e /home/user/Desktop/mltpl
I tried:
sudo service cron restart
But the problem persists. How can I get cron
to run that command hourly?
Update. Got it working with ROOT crontab:
1 * * * * DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 XAUTHORITY=/home/user/.Xauthority /usr/bin/gnome-terminal -e /home/user/Desktop/mltpl
/run/user/<uid>/dconf/
will be changed, thus some errors will be generated. Please read this answer. – pa4080 Sep 14 '17 at 12:18