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

2012-03-21 Thread Robert Hanson
superb! On Wed, Mar 21, 2012 at 11:26 AM, Jonathan Gutow wrote: > I was able to successfully embed it in the SAGE web server. Now for lots > of code cleanup... > > Jonathan > > On Mar 20, 2012, at 7:43 PM, Robert Hanson wrote: > > OK, so I definitely learned something! > > On Tue, Mar 20, 2012

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

2012-03-21 Thread Jonathan Gutow
I was able to successfully embed it in the SAGE web server. Now for lots of code cleanup... Jonathan On Mar 20, 2012, at 7:43 PM, Robert Hanson wrote: > OK, so I definitely learned something! > > On Tue, Mar 20, 2012 at 5:48 PM, Jonathan Gutow wrote: > Bob, > > You did it! My preliminary t

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

2012-03-20 Thread Robert Hanson
OK, so I definitely learned something! On Tue, Mar 20, 2012 at 5:48 PM, Jonathan Gutow wrote: > Bob, > > You did it! My preliminary tests show it works. I have to do some > modifications to get it embedded in Sage, but I think it will work fine. > > Thanks, > Jonathan > > On Mar 19, 2012, at 9

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

2012-03-20 Thread Jonathan Gutow
Bob, You did it! My preliminary tests show it works. I have to do some modifications to get it embedded in Sage, but I think it will work fine. Thanks, Jonathan On Mar 19, 2012, at 9:53 PM, Robert Hanson wrote: > OK, Jonathan. I think I found the problem. Please try what I just checked in >

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

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

2012-03-17 Thread Robert Hanson
You can't run it without graphics if you are going to create JPG files. . If you are doing something else, you can use JmolData.jar, which has no graphics. On Sat, Mar 17, 2012 at 8:38 AM, Jonathan Gutow wrote: > I've been working on using 12.0.45 as a server-side static graphics engine >

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

2012-03-17 Thread Jonathan Gutow
Is this because of the try{...} at line 513 of JmolPanel.java? Shouldn't this be inside the preceding if..., which checks to see if the display and splash are enabled? Jonathan On Mar 17, 2012, at 8:38 AM, Jonathan Gutow wrote: > I've been working on using 12.0.45 as a server-side static graph

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

2012-03-17 Thread Jonathan Gutow
I've been working on using 12.0.45 as a server-side static graphics engine for the SageMath group. I've run into the following problem. The server does not run in an X-session, so there is no graphics environment. This causes an error when Jmol is run as Jmol.jar -ionx. The error seems to im