[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Fw: Xvfb | Docker Universe | Can't open display | (but works with docker run)



Greetings,

I believe that answers to the questions would be beneficial to many:

Problem1: Docker Universeâ does not provide the same environment as docker runâ within the container. 
Problem2: Xvfb works fine within a docker runâ container but does not work when running as a Docker Universeâ job.
Question: is there a way to make Xvbfâ work on HTcondor?

Xvfb provides a virtual DISPLAY for X11 GUI.
I am trying to use a perlâ script that requires Chart::Graph::Xmgrace

If I use docker runâ on my Mac everything works fine,
so the problem is definitely with HTcondorâ way of using a Dockerâ container and just related to X11 and DISPLAY as judged by the error:

Can't open display
Failed initializing GUI, exiting
Execution error: /usr/bin/xmgrace at /usr/local/share/perl5/Chart/Graph/Xmgrace.pm line 869.

Here are the things are tried:
  1. Is Xvfb running?
The "run" script sent over with the .sub file contains lines:

export DISPLAY=99
Xvfb :99 -ac &

On my laptop with docker runâ I can see that Xvfbâ creates file /tmp/.X99-lockâ
And everything works OK, i.e. the Xmgrace perl script creates the files.

If I run on HTCondor and ask to see the content with ls -ls /tmpâ and also with ls -la $TEMPâ I don't see that file.
In addition a printenvâ command confirms that: DISPLAY=99
But I get the "Can't open display" error.

I surmise that it means that the Xvfb run was not successful.
  1. Adding the perl module Test::NeedsDisplay
This module was pre-intalled on the Docker image as well as that of xmgraceâ.
Adding the line "use Test::NeedsDisplay;" within the perl script worked fine within a docker runâ on my Mac, but failed in the Docker Universeâ with the error:
Can't locate Test/NeedsDisplay.pm in @INC (@INC contains...

THe Xmgraceâ module is always found in all cases. But not that one.
Hence that did not fix the DISPLAY problem either.
However, things worked fine on the docker runâ without this as well.

------

I have searched extensively without finding much information:

I only found 5 entries on HTCondor-users Archives that match the word xvfbâ
and most are very old.

Incidently, one entry for using PhotoShop headless suggested adding  +WantXvfb within the .subâ file but that seems to be related to the overall HTcondor installation. Furthermore, searching for this exact term on Google only yields... that single page! Was it an abandoned solution?

I thought that I would find many more entries on the archives or even on Google about this.

Is there a better way to do that?

Thank you to all who might be inspired to reply!

----------------------------

Jean-Yves Sgro, Ph.D.

Distinguished Scientist | Data Scientist II

Biotechnology Center    | Biochemistry Department 

University of Wisconsin-Madison - USA

Formerly at the Institute for Molecular Virology VirusWorld web site -

COVID-19: coloring books