<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Ryo<br><br>I thought I had the -b options in my script; I actually worked!!!<br><br>but I had the DISPLAY thing that is not working.<br>Many thanks anyway, you sorted my problem.<br>Best Regards<br><br>-Mariane<br><br>--- En date de : <b>Mar 25.11.08, Ryo Furue <i><furue@HAWAII.EDU></i></b> a écrit :<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">De: Ryo Furue <furue@HAWAII.EDU><br>Objet: Re: Fw : Running Grads automatically with crontab<br>À: GRADSUSR@LIST.CINECA.IT<br>Date: Mardi 25 Novembre 2008, 23h23<br><br><pre>Hi Mariane,<br><br>| I'm plotting lots of figures with grads. I have a script that runs<br>| fine automatically, but fails when I set it with crontab.<br>| Below is the error message<br>| Error in GXSTRT: Unable to connect to Xserver.<br><br>This error means that
the cron job doesn't know which<br>display (screen) to use.<br><br>First of all, do you want to draw something on the<br>computer's screen? If not, you can simply use<br>the "-b" option of GrADS to instruct GrADS not to<br>access any screen. (I think.)<br><br>If, on the other hand, you want to draw something on<br>the screen, you would need to take care of screen access.<br><br>I'm not sure whether the following works, but . . .<br>At the very least, you would need to set the<br>DISPLAY environment variable in your crontab, as<br><br> DISPLAY=:0.0<br> . . . . . . .<br><br> 23 4 * * * grads -c . . . .<br><br>You may also need to get the authorization of your access:<br><br> DISPLAY=:0.0<br> . . . . . . .<br><br> 23 4 * * * xauth merge /home/yourhomedir/.Xauthority; grads -c . . . .<br><br>if you are both the owner of the cron job and the owner of the<br>display.<br><br>Regards,<br>Ryo<br></pre></blockquote></td></tr></table><br>