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.
> Hi Steve, > > I'm having a problem running a GEMPAK script under a cron job. > Everything seems to run ok, but at the end I'm getting this error: > > [GEMPLT -83] NDISP - DISPLAY not set or invalid > > I've set the DEVICE parameter to "gf", so I don't quite understand > why DISPLAY needs to be set. Granted, cron runs with minimal > environment variable settings, so it's not surprising that nothing's > set for DISPLAY. I've tried setting DISPLAY to :0.0 within the > script, but GEMPAK doesn't seem to like that, either. Is there > something I can set DISPLAY to in order to get it to create the > gif files? > > Thanks for any help you can provide, > > > Brian > > > Brian, There are 2 different GIF output drivers: GF uses the X display to render the image, generally has better looking fonts since it is using the X fonts. GIF does not use the X display, uses software fonts. When you run a cron, you typically don't have access to the console display, even if you set the DISPLAY variable since the console user has a magick cookie, and unless you allow other access (using xhost + localhost), the cron's won't be able to connect to the display. Moreover, if you log off the console, there is no access. You can use the GIF driver, or, set up a virtual X server (using the Xvfb program) which creates a display in memory that crons can draw to, typically using DISPLAY :1, such as: Xvfb :1 -screen 0 1600x1200x24 & See the Xvfb man page for further information. Steve Chiswell Unidata User Support Ticket Details =================== Ticket ID: FYS-891494 Department: Support GEMPAK Priority: Normal Status: Closed