I am trying to execute headless chrome Selenium tests via Jenkins using XVFB on UBUNTU AWS/VM.
Pre-build Execute Shell:
export DISPLAY=:98
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :98 -auth /var/run/lightdm/root/:0 -rfbport 5900
When build starts, I see:
Xvfb starting$ /usr/bin/Xvfb :98 -screen 0 1024x768x24 -fbdir /var/lib/jenkins/xvfb-82-..fbdir10942188934689457655
[Jenkins-Headless] $ /bin/sh -xe /tmp/jenkins11502774511620101086.sh
+ export DISPLAY=:98
+ x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :98 -auth /var/run/lightdm/root/:0 -rfbport 5900
17/09/2020 09:50:33 passing arg to libvncserver: -rfbport
17/09/2020 09:50:33 passing arg to libvncserver: 5900
.
.
.
and finally:
17/09/2020 09:50:34 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 11460
17/09/2020 09:50:34 Using X display :98
17/09/2020 09:50:34 rootwin: 0x298 reswin: 0x200001 dpy: 0x1a57e8f0
.
.
The VNC desktop is: jenkins-it02:0
PORT=5900
Now via Terminal on my MAC, I am connecting to VM using ssh -L 5900:localhost:5900 [email protected]
command.
and using VNCViewer, I am connecting to localhost:5900. It get's connected but I see only a black screen. I am expecting Chrome browser window on the screen.
How can I solve this issue and get to watch Chrome window on vncviewer?