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 display.

Nico


On Mon, Mar 19, 2012 at 1:55 PM, Gutow, Jonathan H <gu...@uwosh.edu> wrote:

> 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 Xsession, there is always a graphics
> environment available.
>
> 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 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 imply that we are still initializing the look-and-feel, even when there
> is no GUI.  Is there any reason we can't switch this off?  Here's the error:
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> > initialize class sun.awt.X11GraphicsEnvironment
> >       at java.lang.Class.forName0(Native Method)
> >       at java.lang.Class.forName(Class.java:186)
> >       at
> > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron\
> > ment.java:82)
> >       at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:112)
> >       at java.lang.Class.forName0(Native Method)
> >       at java.lang.Class.forName(Class.java:186)
> >       at java.awt.Toolkit$2.run(Toolkit.java:849)
> >       at java.security.AccessController.doPrivileged(Native Method)
> >       at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841)
> >       at
> > sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:\
> > 121)
> >       at
> > javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookA\
> > ndFeel.java:1564)
> >       at
> > javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.jav\
> > a:147)
> >       at
> > javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.jav\
> > a:1599)
> >       at javax.swing.UIManager.setLookAndFeel(UIManager.java:530)
> >       at javax.swing.UIManager.setLookAndFeel(UIManager.java:570)
> >       at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1320)
> >       at javax.swing.UIManager.initialize(UIManager.java:1407)
> >       at javax.swing.UIManager.maybeInitialize(UIManager.java:1395)
> >       at javax.swing.UIManager.getDefaults(UIManager.java:644)
> >       at javax.swing.UIManager.put(UIManager.java:973)
> >       at org.jmol.export.dialog.Dialog.setupUIManager(Unknown Source)
> >       at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown
> > Source)
> >       at org.openscience.jmol.app.Jmol.main(Unknown Source)
> >
> >
> >                         Dr. Jonathan H. Gutow
> > Chemistry Department                                gu...@uwosh.edu
> > UW-Oshkosh                                          Office: 920-424-1326
> > 800 Algoma Boulevard                                FAX:920-424-2042
> > Oshkosh, WI 54901
> >                http://www.uwosh.edu/facstaff/gutow
> >
> >
> >
> ------------------------------------------------------------------------------
> > This SF email is sponsosred by:
> > Try Windows Azure free for 90 days Click Here
> > http://p.sf.net/sfu/sfd2d-msazure
> > _______________________________________________
> > Jmol-developers mailing list
> > Jmol-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>                        Dr. Jonathan H. Gutow
> Chemistry Department                                 gu...@uwosh.edu
> UW-Oshkosh                                           Office:920-424-1326
> 800 Algoma Boulevard                                 FAX:920-424-2042
> Oshkosh, WI 54901
>                http://www.uwosh.edu/facstaff/gutow/
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to