Linux – How to Use Crontab to display something to users on DISPLAY=:0.0 or run a GUI program

bashcronlinuxubuntu-10.10

I really would like to be able to use crontab to update something every 3hrs, BUT crontab won't run my script with enough priveleges to run a GUI.

Clarification: I have a complicated script that generates a picture (based on the current available web content from a couple of servers) every 3hrs – I want to have it display what it is that it's doing so I know whether it failed or not.

I've tried:
1. Adding a file to /etc/cron.d/myscript for cron to run
2. variations of xdg-open, gnome-terminal, mrxvt -e, env DISPLAY=:0.0, root /usr/local/bin/myscript
3. Editing my user cron — crontab -u username -e

Myscript is a complicated little beastie that downloads a picture (which is updated every half hr) then downloads a different websites webpage as index.html – sed's it, finds the particular image it needs (based on today's date & time) then crops and transforms it, with imagemagick.

Best Answer

man xauth
man xhost

You can try xhost local: as the beginning.