This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Jim, The DISPLAY variable should be set to the screan and display number not the x/y dimensions of your screen. So, setenv DISPLAY localhost:0 should be adequate so long as someone is logged in to the console and has allowed the user running the crontab to acess the display, AND... the user logged in to the console hasn't eaten up all the available colors by running something like netscape, or someother color intensive application like a window manager that uses lots of colors. One way to deal with the problem of needing a display to write to is to use the Xvfb virtual frame buffer to create a display in memory like: /usr/X11R6.3/bin/Xvfb :1 -screen 0 1280x1024x8 & then setting your DISPLAy to localhost:1 Steve CHiswell Unidata User Support >From: "Jim St. John" <address@hidden> >Organization: . >Keywords: 199906161904.NAA28862 >Sorry to bug you again. I thought I had this fixed last night. We have been >trying to run Gempak scripts from cronjobs under Linux. They were working whe > n >I went home last night. Today they are bombing. The problem apperas to be in >the line: > >setenv DISPLAY localhost: > >Last night I set this to > >setenv DISPLAY localhost:1024:768 and I was getting good gif files as output. > When I run that now I get the error > >Creating process: gf for queue 3202 >_X11TransSocketINETConnect: Can't connect: errno = 111 > >If I set setenv DISPLAY localhost:0.0 I get > > > [GEMPLT -46] NCLRAL - Can not allocate read/write colors. > > >we put in a new gaphics display card but that didn't seem to help. Mark >doesn't know what Gempak is trying to reference or grab with the Device >command. Have you got any suggestions? > >Here is the full script: > >#! /bin/csh ># >#Script to plot meteogram ># > >cd /home/stjohn # go somewhere to do this >if(-e gempak.gif) then > rm gempak.gif >endif # remove old gempak.gif > >cd /home/httpd/html >if(-e metgram.gif) then > rm metgram.gif >endif > >/usr/X11R6/bin/xhost + lou >setenv LD_LIBRARY_PATH /usr/X11R6/lib >setenv DISPLAY localhost:1024.768 >source /nawips/Gemenviron ># >set YMD = `date -u +%Y%m%d` >echo $YMD >set mfile = $SAO'/'$YMD'_sao.gem' >set d1 = `date -u '+%H'` >echo $mfile >echo $d1 >if($#argv == 0) then > set stn=ATL >else > set stn=$1 >endif > >echo $stn >echo $stn > > >sfgram << SFGRAM_EOF > SFFILE = $mfile > DATTIM = all > STATION = atl > TRACE1 = TMPF;DWPF:3/2;3//y0;10;20;30;40;50;60;70;80;90;100 > TRACE2 = PMSL/4 > TRACE3 = gust;brbk > TRACE4 = vsby/7 > TRACE5 = clds;;wsym/6 > NTRACE = 5 > TAXIS = $YMD/0000-$YMD/2359-3 > BORDER = 1 > MARKER = 0 > TITLE = 3 > CLEAR = y > DEVICE = gf | /home/httpd/html/metgram.gif | .5;.5 > PANEL = 0 > TEXT = 1/23//sw > > run > > exit >SFGRAM_EOF > >gpend > > > > > >-- >********************************************************* >* Dr. Jim St. John * >* Research Scientist * >* School of Earth and Atmospheric Sciences * >* Georgia Institute of Technology * >* Phone: 404-894-1754 * >* Fax: 404-894-1106 * >* e-mail: address@hidden * >* Homepage: http://louisxiv.eas.gatech.edu/~stjohn * >********************************************************* >