<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 70.85pt 56.7pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Stefan,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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). <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The workaround I found was to set the $DISPLAY variable in bash<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>export DISPLAY=:0<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> or just attach to an existing “GNU screen” session for which the $DISPLAY variable is correctly set and run:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>xset s reset<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>xset dpms force on<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>gmsh batchplot.opt || die “$LINENO: gmsh error. ”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It is advisable to perform some more checks (not just </span><span style='font-size:11.0pt;font-family:Consolas;color:#1F497D'>|| die</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>), because the return value of gmsh can be “0” even if plotting failed.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It seems your Windows workaround is very similar.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-Sebastian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gmsh-bounces@ace20.montefiore.ulg.ac.be [mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be] <b>On Behalf Of </b>Stefan.Kremer@Schoeck.de<br><b>Sent:</b> Wednesday, September 19, 2012 9:55 AM<br><b>To:</b> gmsh@geuz.org<br><b>Cc:</b> cgeuzaine@ulg.ac.be<br><b>Subject:</b> [Gmsh] Problem with image-generation without GUI is solved<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Problem with image-generation without GUI is <b>solved</b></span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>The solution was to "allow the service to interact with desktop" (=windows settings)</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Best regards</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Stefan Kremer</span> <br><br><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gmsh-bounces@ace20.montefiore.ulg.ac.be [mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be] <b>On Behalf Of </b>Stefan.Kremer@Schoeck.de<br><b>Sent:</b> Wednesday, September 19, 2012 9:41 AM<br><b>To:</b> gmsh@geuz.org<br><b>Cc:</b> cgeuzaine@ulg.ac.be<br><b>Subject:</b> [Gmsh] gmsh-image-generation without GUI<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Dear Prof. Geuzaine,</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>i use your great tool gmsh and getdp for thermal conduction calculations.</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I run gmsh and getdp on a server (IIS) in command line mode (executed with PHP).</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Everthing works fine.</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.</span> <br><br><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Question: Is there an alternative to generate image-files of the model in command line mode <u>without starting the GUI</u>?</span></b> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks in advance.</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Best regards</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Stefan Kremer</span> <br><br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Dipl.-Phys. Stefan Kremer</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Strategic Productmanagement</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Schöck Bauteile GmbH</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Vimbucher Straße 2</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>76534 Baden-Baden</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Germany</span> <br><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Tel. +49 7223 967-204</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Fax +49 7223 967-7204</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Mobil +49 173 5717495<br><a href="mailto:stefan.kremer@schoeck.de">stefan.kremer@schoeck.de</a></span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>