[Gmsh] Problem with image-generation without GUI is solved

Eiser, Sebastian sebastian.eiser at k-ai.at
Thu Oct 11 09:56:19 CEST 2012


Hi Stefan,
I also asked myself this question in the past, but didn't find a way to perform batch plotting without opening the GUI. I wanted to perform plotting when working remotely (ssh).
The workaround I found was to set the $DISPLAY variable in bash

export DISPLAY=:0

or just attach to an existing "GNU screen" session for which the $DISPLAY variable is correctly set and run:

xset s reset
xset dpms force on
gmsh batchplot.opt || die "$LINENO: gmsh error. "

The first two lines are to disable the screen blanking/saver; otherwise the picture will be black. Depending on your Xorg configuration this might not be necessary.
It is advisable to perform some more checks (not just || die), because the return value of gmsh can be "0" even if plotting failed.

It seems your Windows workaround is very similar.

-Sebastian

From: gmsh-bounces at ace20.montefiore.ulg.ac.be [mailto:gmsh-bounces at ace20.montefiore.ulg.ac.be] On Behalf Of Stefan.Kremer at Schoeck.de
Sent: Wednesday, September 19, 2012 9:55 AM
To: gmsh at geuz.org
Cc: cgeuzaine at ulg.ac.be
Subject: [Gmsh] Problem with image-generation without GUI is solved

Problem with image-generation without GUI is solved
The solution was to "allow the service to interact with desktop" (=windows settings)

Best regards
Stefan Kremer


From: gmsh-bounces at ace20.montefiore.ulg.ac.be [mailto:gmsh-bounces at ace20.montefiore.ulg.ac.be] On Behalf Of Stefan.Kremer at Schoeck.de
Sent: Wednesday, September 19, 2012 9:41 AM
To: gmsh at geuz.org
Cc: cgeuzaine at ulg.ac.be
Subject: [Gmsh] gmsh-image-generation without GUI


Dear Prof. Geuzaine,

i use your great tool gmsh and getdp for thermal conduction calculations.

I run gmsh and getdp on a server (IIS) in command line mode (executed with PHP).
Everthing works fine.

If i generate a .png-Imagefile of the model  with an apache-server  the GUI of gmsh started on the server and the png-file was successfully build.

But if i try the same process with IIS as server the image could not be generated because the server don't start the gmsh GUI.

Question: Is there an alternative to generate image-files of the model in command line mode without starting the GUI?

Thanks in advance.

Best regards
Stefan Kremer


Dipl.-Phys. Stefan Kremer
Strategic Productmanagement

Schöck Bauteile GmbH
Vimbucher Straße 2
76534 Baden-Baden
Germany

Tel.      +49 7223 967-204
Fax      +49 7223 967-7204
Mobil   +49 173 5717495
stefan.kremer at schoeck.de<mailto:stefan.kremer at schoeck.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20121011/270252d8/attachment.html>