Thursday 15 May 2014

user interface - cron that needs a display -


I am trying to run a cronch that involves opening a graphical program and thus a DISPLAY set is required. I have tried the following:

  * * * * * * DISPLAY =: 0.0 / opt / firefox / firefox-print ..  

this work And even if I try it on my console then the above command does not work. It just does not do anything there. Now, the only way to do this is to do the following:

$ echo $ DISPLAY Localhost: 10.0 $ crontab -l * * * * * * DISPLAY =: 10.0 / opt / firefox / firefox -print

And it works if I stay logged in to the machine and wait for the cron to run.

Is this a viable way of working? The only way I can be thin is always to be logged into the machine (which I want to save).

I do not think this is just a simple setting for working.

However, Xvfb (X Virtual Framebuffer) should be able to provide a dummy X display that meets your requirement:

< / Html>

No comments:

Post a Comment