0

I create a virtual monitor in jenkins file using:

wrap([$class: 'Xvfb', screen: '1920x1080x24']) {
    // my steps here
}

The out is:

Xvfb starting$ Xvfb :0 -screen 0 1920x1080x24 -fbdir /var/lib/jenkins/xvfb-2-6842399732643585931.fbdir

I can't specify particular display name offset, so it can vary, but I need to use its value (O in this example) later in my build scripts. Is there an env variable for this or what is the best way to get this number?

Bohdan Nesteruk
  • 794
  • 17
  • 42

1 Answers1

0

I just needed to print the env variables and found this:

DISPLAY=:0

So the problem is solved, but for some reason I didn't find any mentions of this in the documentation.

Bohdan Nesteruk
  • 794
  • 17
  • 42