<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Hello:</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">A couple of things. The Xvfb package
is very useful to run programs that must start a gui on machines
without screens. This package usually comes with a very helpful
starter program which takes care of starting the (virtual)
graphics server, waiting until it is ready, setting the
appropriate environment variables, running the actual user
program, and shutting everything down at the end. This is named</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">xvfb-run</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">and you can start your user problem
under xvfb by simply running</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">xvfb-run my_gui_program some arguments</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">This may be easier and more reliable
than setting DISPLAY manually.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Now, as far as the temporary directory
problem, there's a pretty glaring bug in the Xmgrace.pm module
when the environment variable TMPDIR is set, which condor does
set.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Try adding the following to your
startup script before perl runs:</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">unset TMPDIR</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">-greg<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 10/29/21 6:02 PM,
<a class="moz-txt-link-abbreviated" href="mailto:htcondor-users@cs.wisc.edu">htcondor-users@cs.wisc.edu</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SN7PR06MB710258A43F18407FE23C6D4DCD879@SN7PR06MB7102.namprd06.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Hello again,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
The error message: <span
style="font-family:Consolas,Courier,monospace"><b>could not
make temporary directory</b>:
`/var/lib/condor/execute/dir_33779/Graph_Xmgrace_23'</span>
etc</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
only appears on HTcondor when the perl script contains more than
one call to xmgrace.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Adding permission changes before the perl script is called:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Consolas, Courier, monospace;
font-size: 10pt;">chmod g+w $TEMP</span><br>
<span style="font-family: Consolas, Courier, monospace;
font-size: 10pt;">chmod g+w $TMPDIR</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Consolas, Courier, monospace;
font-size: 10pt;">chmod a+rw ${PWD}</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Assuming that ${PWD} is in fact the temporary <span
style="font-family:Consolas,Courier,monospace">
/var/lib/condor/execute/dir_</span>*<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
has no effect on the error even though it does change the
permissions:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Consolas, Courier, monospace;
font-size: 10pt;">drwxrw-rw-. 2 390870428 390800513 202 Oct
29 22:48 .</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
But still the error persists. <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
It is rather strange... and the error does not occur on a the
Mac when using <code>
docker run</code> <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Any idea?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
JYS<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
HTCondor-users <a class="moz-txt-link-rfc2396E" href="mailto:htcondor-users-bounces@cs.wisc.edu"><htcondor-users-bounces@cs.wisc.edu></a> on
behalf of <a class="moz-txt-link-abbreviated" href="mailto:htcondor-users@cs.wisc.edu">htcondor-users@cs.wisc.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:htcondor-users@cs.wisc.edu"><htcondor-users@cs.wisc.edu></a><br>
<b>Sent:</b> Friday, October 29, 2021 3:53 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:htcondor-users@cs.wisc.edu">htcondor-users@cs.wisc.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:htcondor-users@cs.wisc.edu"><htcondor-users@cs.wisc.edu></a><br>
<b>Cc:</b> JEAN-YVES SGRO <a class="moz-txt-link-rfc2396E" href="mailto:jsgro@wisc.edu"><jsgro@wisc.edu></a><br>
<b>Subject:</b> Re: [HTCondor-users] Fw: Xvfb | Docker
Universe | Can't open display | (but works with docker run)</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Hello Dima,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Thank you very much for taking the time to answer so promptly.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
I am just an "end user" trying to make things work. (i tried
many things before replying...)<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
I found the Display problem: the following line is necessary
to have Xvfb active (on DISPLAY named :99) and can be added to
the script or source from
<span style="font-family:Consolas,Courier,monospace">/etc/bashrc</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace"><b>Xvfb
:99 -ac &</b></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
However, I encounter another problem reported in the error
output:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<blockquote style="margin-top:0; margin-bottom:0">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace"><b>could
not make temporary directory</b>:
`/var/lib/condor/execute/dir_33779/Graph_Xmgrace_23' at
/usr/local/share/perl5/Chart/Graph/Xmgrace.pm line 136.</span><br>
</div>
</blockquote>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
The directory name varies. This time it ends with <code>23</code>
but another time it ended with
<code>21</code> so it's not predictable.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Lines 135 and 136 from the <span
style="font-family:Consolas,Courier,monospace">Xmgrace.pm</span>
file say:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace;
font-size:10pt"> 135 # create tmpdir</span>
<div><span style="font-family:Consolas,Courier,monospace;
font-size:10pt"> 136 _make_tmpdir("_Xmgrace_"); #
grace files should be saved for user tweaking</span></div>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Is there a way to fix this permission issue?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
I don't have these issues when running on the Mac: I "pushed"
the image onto the hub, and it is available to test. I
included the simple
<code>test.pl</code> file into the <code>/home</code>
directory on the image. In that case there is no need for
<code>-v</code> to test:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
This is what I can do on my Mac from a Terminal:<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace">docker
run -it --rm -w /home jysgro/xmgrace-c7</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
This creates a new container, with interactive Terminal, which
will be removed when using
<code>exit</code> and goes directly into the <code>/home</code>
directory. There is a single file called
<code>test.pl</code> which can then be executed within the
container with: <code>
perl test.pl</code><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
When this is done, the <code>/home</code> directory will
contain 3 files:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Consolas,Courier,monospace">test.pl
xmgrace1.agr xmgrace1.png</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
and that means that the program worked fine.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
If there is a temporary directory to create it is not a
problem there but it is on HTCondor.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Is there a permission to be given so that temporary
directories can be created ?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
THank you!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Jean-Yves<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
HTCondor-users <a class="moz-txt-link-rfc2396E" href="mailto:htcondor-users-bounces@cs.wisc.edu"><htcondor-users-bounces@cs.wisc.edu></a> on
behalf of <a class="moz-txt-link-abbreviated" href="mailto:dmitri.maziuk@gmail.com">dmitri.maziuk@gmail.com</a>
<a class="moz-txt-link-rfc2396E" href="mailto:dmitri.maziuk@gmail.com"><dmitri.maziuk@gmail.com></a><br>
<b>Sent:</b> Friday, October 29, 2021 12:52 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:htcondor-users@cs.wisc.edu">htcondor-users@cs.wisc.edu</a>
<a class="moz-txt-link-rfc2396E" href="mailto:htcondor-users@cs.wisc.edu"><htcondor-users@cs.wisc.edu></a><br>
<b>Subject:</b> Re: [HTCondor-users] Fw: Xvfb | Docker
Universe | Can't open display | (but works with docker run)</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span
style="font-size:11pt">
<div class="x_PlainText">On 2021-10-29 12:07 PM, JEAN-YVES
SGRO via HTCondor-users wrote:<br>
<br>
> Problem1: Docker Universe does not provide the
same environment as docker run within the container.<br>
> Problem2: Xvfb works fine within a docker run
container but does not work when running as a Docker
Universe job.<br>
> Question: is there a way to make Xvbf work on
HTcondor?<br>
<br>
How does it "work fine" outside of condor?<br>
<br>
Access to host XVfb is via a socket in /tmp/.X11-unix,
are you mounting <br>
it with `-v` for the non-condor runs? Or are you firing
up Xvfb inside <br>
the container?<br>
<br>
For the former, my guess is you should be able to mount
the socket as <br>
per <br>
<a
href="https://htcondor.readthedocs.io/en/latest/admin-manual/setting-up-vm-docker-universes.html#the-docker-universe"
moz-do-not-send="true">https://htcondor.readthedocs.io/en/latest/admin-manual/setting-up-vm-docker-universes.html#the-docker-universe</a>
<br>
<br>
<br>
Dima<br>
_______________________________________________<br>
HTCondor-users mailing list<br>
To unsubscribe, send a message to
<a class="moz-txt-link-abbreviated" href="mailto:htcondor-users-request@cs.wisc.edu">htcondor-users-request@cs.wisc.edu</a> with a<br>
subject: Unsubscribe<br>
You can also unsubscribe by visiting<br>
<a
href="https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users"
moz-do-not-send="true">https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users</a><br>
<br>
The archives can be found at:<br>
<a
href="https://lists.cs.wisc.edu/archive/htcondor-users/"
moz-do-not-send="true">https://lists.cs.wisc.edu/archive/htcondor-users/</a></div>
</span></font></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to <a class="moz-txt-link-abbreviated" href="mailto:htcondor-users-request@cs.wisc.edu">htcondor-users-request@cs.wisc.edu</a> with a
subject: Unsubscribe
You can also unsubscribe by visiting
<a class="moz-txt-link-freetext" href="https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users">https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users</a>
The archives can be found at:
<a class="moz-txt-link-freetext" href="https://lists.cs.wisc.edu/archive/htcondor-users/">https://lists.cs.wisc.edu/archive/htcondor-users/</a></pre>
</blockquote>
<p><br>
</p>
</body>
</html>