File tree Expand file tree Collapse file tree 4 files changed +33
-20
lines changed Expand file tree Collapse file tree 4 files changed +33
-20
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ ENV SCREEN_WIDTH 1360
8989ENV SCREEN_HEIGHT 1020
9090ENV SCREEN_DEPTH 24
9191ENV DISPLAY :99.0
92+ ENV START_XVFB true
9293
9394#========================
9495# Selenium Configuration
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- export GEOMETRY=" ${SCREEN_WIDTH} " " x" " ${SCREEN_HEIGHT} " " x" " ${SCREEN_DEPTH} "
3+ if [ " ${START_XVFB} " = true ] ; then
4+ export GEOMETRY=" ${SCREEN_WIDTH} " " x" " ${SCREEN_HEIGHT} " " x" " ${SCREEN_DEPTH} "
45
5- rm -f /tmp/.X* lock
6+ rm -f /tmp/.X* lock
67
7- /usr/bin/Xvfb ${DISPLAY} -screen 0 ${GEOMETRY} -ac +extension RANDR
8+ /usr/bin/Xvfb ${DISPLAY} -screen 0 ${GEOMETRY} -ac +extension RANDR
9+ else
10+ echo " Xvfb won't start. Chrome/Firefox can only run in headless mode. Remember to set the 'headless' flag in your test."
11+ fi
Original file line number Diff line number Diff line change 22#
33# IMPORTANT: Change this file only in directory NodeDebug!
44
5- fluxbox -display ${DISPLAY}
5+ if [ " ${START_XVFB} " = true ] ; then
6+ fluxbox -display ${DISPLAY}
7+ else
8+ echo " Fluxbox won't start because Xvfb is configured to not start."
9+ fi
Original file line number Diff line number Diff line change 22#
33# IMPORTANT: Change this file only in directory NodeDebug!
44
5- if [ ! -z $VNC_NO_PASSWORD ]; then
6- echo " Starting VNC server without password authentication"
7- X11VNC_OPTS=
8- else
9- X11VNC_OPTS=-usepw
10- fi
11-
12- for i in $( seq 1 10)
13- do
14- sleep 1
15- xdpyinfo -display ${DISPLAY} > /dev/null 2>&1
16- if [ $? -eq 0 ]; then
17- break
5+ if [ " ${START_XVFB} " = true ] ; then
6+ if [ ! -z $VNC_NO_PASSWORD ]; then
7+ echo " Starting VNC server without password authentication"
8+ X11VNC_OPTS=
9+ else
10+ X11VNC_OPTS=-usepw
1811 fi
19- echo " Waiting for Xvfb..."
20- done
2112
22- x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -display ${DISPLAY}
13+ for i in $( seq 1 10)
14+ do
15+ sleep 1
16+ xdpyinfo -display ${DISPLAY} > /dev/null 2>&1
17+ if [ $? -eq 0 ]; then
18+ break
19+ fi
20+ echo " Waiting for Xvfb..."
21+ done
22+
23+ x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -display ${DISPLAY}
24+ else
25+ echo " Vnc won't start because Xvfb is configured to not start."
26+ fi
You can’t perform that action at this time.
0 commit comments