Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Robert Hanson
OK, Jonathan. I think I found the problem. Please try what I just checked in -- do a build, and then use jmolData.jar instead of jmol.jar. Formerly: JmolData.jar -s foo.spt execute the script foo.spt with absolutely no graphics and no rendering, including no image creation now: JmolData.ja

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Robert Hanson
If awt is not there, you are out of luck. But with the -n flag there is no creation of Display. But there might be a reference to it. Let me see. Based on this discussion: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ we should be able to do it. Bob On Mon, Mar 19, 2012

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Jonathan Gutow
Bob, Thanks for trying...Your changes definitely reduce the error messages, but the application is still looking for screen dimensions somewhere in the tree after entering JmolPanel. It is making a call to the awt package. I'm suspicious this is all associated with the allocation of a Display

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Robert Hanson
Could be I'm wrong.Try what I just checked in. Be sure to use the -ions t.spt option (silent/no console/no graphics) You won't get THAT error. but will it create an image? I used this script: load $tylenol write image 300 300 t.png Bob On Mon, Mar 19, 2012 at 7:55 AM, Gutow, Jonathan H wr

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Gutow, Jonathan H
Nico, I had forgot about fonts. Since we want to be able to put text in our graphics, that may pretty much require us to have a GUI. For your information, it appears that xpra/winswitch is an extension of the facilities provided by xvfb and in some cases makes use of xvfb. Jonathan On Mar 1

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Nicolas Vervelle
Hi, You can check also tools like xvfb which can create a virtual display. Even without the GUI, image generation may require a display for some image operations (like fonts, ...), this is a Java limitation. I used xvfb in several projects where I needed to create images without having a real dis

Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?

2012-03-19 Thread Gutow, Jonathan H
I dug a little and agree it would be a significant undertaking to make the image generation work without the GUI. That said, we might want to put that on a long term to-do list. My solution is to run an Xsession using xpra & winswitch. As long as I launch the server process in the xpra Xsessi