[idvusers] Running IDV headlessly under Mac OS X

IDV users,

I last broached the question about running the IDV “headlessly” on a Mac to the 
idvusers mailing list in September 2015, but, sadly, got no solution. I gave up 
then, but if there’s actually a solution now, I can’t afford to give up this 
time.

Note first that I believe that there are solutions to running the IDV 
headlessly under LINUX, but I think that the Mac differs in at least one 
crucial respect: it has it’s own, native windowing system  that is not the same 
as X-windows. Hence, applications such as Xvfb (X-window frame buffer) and 
Xdummy, which redirect graphical output aimed at an Xserver to a virtual 
X-window, would seem to have no effect on applications that direct graphical 
output to the Mac’s native windowing system. It seems to me that the IDV on a 
Mac directs output to the native windowing system, not to an Xserver, so all of 
my attempts to set up the IDV to run headlessly using Xvfb and Xdummy have so 
far been futile—they seem to have no effect on the behavior of the IDV 
whatsoever.

XQuartz is an X-windowing program that runs on a Mac by “talking to” the native 
windowing system. It seems as if it might be possible in principle to get 
applications that send graphical output to an X-window managed by Xquartz to 
run headlessly. However, I don’t know whether or not the IDV can be directed to 
do that, or if so, whether that would be sufficient to implement a headless 
mode using, say, Xvfb.

If anyone is running the IDV headlessly on a Mac, or has some insight into the 
issues I’ve tried to describe above (I really don’t know what I’m talking 
about, so it’s probably muddled at best), I’d love to hear from you!

I’ve included an edited version of my 2015 message below, much of which still 
applies today (with IDV v.5.7, Mac OS X v10.14 [Mojave], and XQuartz v.2.7.11, 
which includes Xvfb). 

— Dave

***************************************************************
* Dr. Dave Dempsey, Prof. Emeritus  |       ^    ___    \|/   * 
* Dept. of Earth & Climate Sciences |  )   ^   /||_||\ —-0—-  *
* San Francisco State University    | )  )    / ||_|| \ /|\   * 
* 1600 Holloway Ave.                |  )  )  /  ||_||  \      *   
* San Francisco, CA   94132         |  )  ) /   ||_||   \  ^  *  
*                                   | )  )  )   ||_||    \    *   
* Cell:   (415) 802-5548            |  )  )  )~~||~||~~~~~\~~ *
* Email:  dempsey@xxxxxxxx          | )  )  )  ) ~  ~ ~ ~ ~ ~ *
***************************************************************

From the IDV User mailing list archives, in September 2015:

IDV Users,

If anyone is running the IDV “headlessly” to generate images (for a Web server, 
for example), I’d like to pick your brain!
I’m trying to run IDV v5.2 under Mac OS X v.10.8 (Snow Leopard) to generate GIF 
images for a Web server. In particular, I’m trying to use my server’s LDM to 
run the IDV automatically when the LDM receives certain weather data via the 
IDD. As I understand it, this process occurs “headlessly”--that is, without 
requiring or using a local interface (keyboard, monitor, or mouse, though my 
server has all three).

My IDV bundle, which is executed through an ISL (IDV scripting language) script 
via the IDV installation’s runIDV script, works fine when I execute it on my 
server manually  (that is, using the server’s keyboard and a Terminal window 
directly).

However, when the the LDM triggers the same command when it receives certain 
specific weather data via the IDD, the job fails with a 
java.awt.HeadlessException 
message. The same thing happens when I log onto the server remotely using ssh 
(with X11 forwarding enabled) and try to run the same job (below).

My server had been running Java v.7 but I upgraded to Java v.8—the results are 
the same; it runs X11 (XQuartz v.2.7.7) continuously; and it is continuously 
logged onto the account that runs the LDM and IDV.

Some messages from the IDV when I try to execute my GIF-generating bundle 
and ISL script when logged onto my server remotely using ssh:

Fri Sep 18 09:54:41 PDT 2015: Loading bundle: RadarSummary.xidv
3D [dev] 1.6.0-pre9-daily-experimental daily

ERROR: Error loading bundle: RadarSummary.xidv
java.awt.HeadlessException
java.awt.HeadlessException
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:269)
at javax.media.j3d.Canvas3D.<clinit>(Canvas3D.java:3806)
at visad.java3d.DisplayImplJ3D.initialize(DisplayImplJ3D.java:405)
at visad.java3d.DisplayImplJ3D.<init>(DisplayImplJ3D.java:289)
at visad.java3d.DisplayImplJ3D.<init>(DisplayImplJ3D.java:276)
 etc.

[Today, in April 2020, the results are basically the same. Moreover, when I run 
Xvbf in a Bourne shell script that specifies the value of the DISPLAY variable, 
and run the script when triggered by the LDM, the results are still the same:
Xvfb :99 &
export DISPLAY=:99
runIDV myIDVscript.isl  ]
Any insight or suggestions that I can get will be welcome—I’ve come up empty in 
my attempts to forage among online forums, and the last reference to running 
the IDV headlessly was in 2015, for Linux systems.





  • 2020 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: