[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990505: GEMPAK scripts core dump when run as cron jobs



Robert,
The program needs to be able to connect to an X display so that the
gif window can be drawn.

If the script is being run by a different user than who is logged in,
you have to allow that user access to the server with xhost + machinename.
Without allowing connections from your machine, only the logged in user
has the magic-cookie to connect to the display. 

If nobody is logged in to the server, you have to configure your X server
to allow connections in its configuration- most people don't do this since it
would theoretically allow a user to make a screen that looked like
a login screen and display to the console.

An alternative to the above is to run the Xvfb virtual X server on
screen 1, so that the drawing area is in memory.

Steve


>From: weather <address@hidden>
>Organization: .
>Keywords: 199905051535.JAA25623

>I am trying to generate images for a web page using GEMPAK scripts
>run as cron jobs.  However, unless I run them while logged in
>as that particular user, the script core dumps and I get a
>connection to X-server refused.  I realize this is probably a
>Unix problem rather than GEMPAK, but you give me some idea as to
>what the problem is.  Here is an excerpt of the script.
>
>Thanks
>Robert Mullenax
>
>
>
>#!/bin/csh -f
>source /export/home/gempak/NAWIPS-5.4/Gemenviron
>setenv DISPLAY wxmcidas:0
>set CURRENT_UPA=`ls -t /var/data/ldm/gempak/upperair/*_upa.gem | head -1`
>cd /var/http/demo/public/float-winds/upperairobs-images-knots
>set DATE=`date +%m%d`
>snmap << EOF
>AREA     = 20;-175;78;-25
>GAREA    = 20;-175;78;-25
>SATFIL   = 
>RADFIL   = 
>SNPARM   = brbk
>DATTIM   = 12
>LEVELS   = 10
>VCOORD   = PRES
>SNFILE   = $CURRENT_UPA
>COLORS   = 3
>MAP      = 16
>LATLON   = 0
>MARKER   = 0
>TITLE    = 1/0/~ @ Wind in knots
>CLEAR    = YES
>PANEL    = 0
>DEVICE   = gf|uaobs-$DATE-12z10mb.gif
>PROJ     = MER
>FILTER   = YES
>TEXT     = 1
>LUTFIL   = 
>STNPLT   = 
>r
>
>e
>EOF
>
>gpend
>
>snmap << EOF
>AREA     = 20;-175;78;-25
>GAREA    = 20;-175;78;-25
>SATFIL   = 
>RADFIL   = 
>SNPARM   = brbk
>DATTIM   = 12
>LEVELS   = 8
>VCOORD   = PRES
>SNFILE   = $CURRENT_UPA
>COLORS   = 3
>MAP      = 16
>LATLON   = 0
>MARKER   = 0
>TITLE    = 1/0/~ @ Wind in knots
>CLEAR    = YES
>PANEL    = 0
>DEVICE   = gf|uaobs-$DATE-12z08mb.gif
>PROJ     = MER
>FILTER   = YES
>TEXT     = 1
>LUTFIL   = 
>STNPLT   = 
>r
>
>e
>EOF
>
>gpend
>
>snmap << EOF
>AREA     = 20;-175;78;-25
>GAREA    = 20;-175;78;-25
>SATFIL   = 
>RADFIL   = 
>SNPARM   = brbk
>DATTIM   = 12
>LEVELS   = 7
>VCOORD   = PRES
>SNFILE   = $CURRENT_UPA
>COLORS   = 3
>MAP      = 16
>LATLON   = 0
>MARKER   = 0
>TITLE    = 1/0/~ @ Wind in knots
>CLEAR    = YES
>PANEL    = 0
>DEVICE   = gf|uaobs-$DATE-12z07mb.gif
>PROJ     = MER
>FILTER   = YES
>TEXT     = 1
>LUTFIL   = 
>STNPLT   = 
>r
>
>e
>EOF
>
>gpend
>NSBF Meteorology
>