I am trying to make a regular notification to remind me to get out of the computer chair and have a stretch regularly. This command works as a command or single line bash script:
kdialog --passivepopup 'Get off your arse' 15
However running it from cron fails, crontab:
*/5 * * * * /home/roger/bin/motivation-popup >> /home/roger/motivation.log 2>&1
Log error:
Wednesday 19 March 23:15:01 EST 2014
kdialog: cannot connect to X server
Is there a simple way to modify the script to make it work? It's probably pretty basic but so is my scripting knowledge.