Fw : Running Grads automatically with crontab

MARIANE DIOP KANE riane_diopkane at YAHOO.FR
Wed Nov 26 06:39:27 EST 2008


Hi Ryo

I thought I had the -b options in my script; I actually worked!!!

but I had the DISPLAY thing that is not working.
Many thanks anyway, you sorted my problem.
Best Regards

-Mariane

--- En date de : Mar 25.11.08, Ryo Furue <furue at HAWAII.EDU> a écrit :
De: Ryo Furue <furue at HAWAII.EDU>
Objet: Re: Fw : Running Grads automatically with crontab
À: GRADSUSR at LIST.CINECA.IT
Date: Mardi 25 Novembre 2008, 23h23

Hi Mariane,

| I'm plotting lots of figures with grads. I have a script that runs
| fine automatically, but fails when I set it with crontab.
| Below is the error message
|      Error in GXSTRT: Unable to connect to Xserver.

This error means that the cron job doesn't know which
display (screen) to use.

First of all, do you want to draw something on the
computer's screen?  If not, you can simply use
the "-b" option of GrADS to instruct GrADS not to
access any screen.  (I think.)

If, on the other hand, you want to draw something on
the screen, you would need to take care of screen access.

I'm not sure whether the following works, but . . .
At the very least, you would need to set the
DISPLAY environment variable in your crontab, as

  DISPLAY=:0.0
  . . . . . . .

  23 4  * * *   grads -c . . . .

You may also need to get the authorization of your access:

  DISPLAY=:0.0
  . . . . . . .

  23 4  * * *  xauth merge /home/yourhomedir/.Xauthority; grads -c . . . .

if you are both the owner of the cron job and the owner of the
display.

Regards,
Ryo



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20081126/4f5de95a/attachment.html 


More information about the gradsusr mailing list