Help: the problem to run GUI program with cron when logged out

Xiaoshen Li xsli2 at
Mon May 14 10:52:49 PDT 2012


Many people say that it is a simple fix to let cron run a GUI program: just export DISPLAY=:0.0 -- telling where to display it. However, it is hard and even impossible for me.

(I am using "env -i script_name" to test) 
Suppose my script "" can be run successfully:

env -i /path/

Within, there are:
export XAUTHORITY=xxx
export DISPLAY=:0.0
start the Java GUI program //this program is an automatic GUI program. It runs for about one minute or so, then shut down automatically. No human interaction is needed.

If I put on cron and logged out(These linux machines are shared desktops, not my personal machines). Our IT support told me that my gui program have no place to put the display.(Since I have logged out, everything has closed). I told them that many people on newsgroup say that it is possible and they don't think so.

Another problem is that, since I was not logged in when the cron job("") was running, so there is no XAUTHORITY value.

I am just confused: many people say it is possible to run a GUI program by cron. I assume that means they are not logged in when the cron job is run. How come it is impossible for me?

Thank you very much.

More information about the xorg mailing list