diff --git a/Makefile b/Makefile index de5d70a0e..c104979d5 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME := $(or $(NAME),$(NAME),selenium) CURRENT_DATE := $(shell date '+%Y%m%d') BUILD_DATE := $(or $(BUILD_DATE),$(BUILD_DATE),$(CURRENT_DATE)) -VERSION := $(or $(VERSION),$(VERSION),4.0.0-alpha-6) +VERSION := $(or $(VERSION),$(VERSION),4.0.0-alpha-7) TAG_VERSION := $(VERSION)-$(BUILD_DATE) NAMESPACE := $(or $(NAMESPACE),$(NAMESPACE),$(NAME)) AUTHORS := $(or $(AUTHORS),$(AUTHORS),SeleniumHQ) diff --git a/NodeBase/Dockerfile.txt b/NodeBase/Dockerfile.txt index cea175113..f0a900f95 100644 --- a/NodeBase/Dockerfile.txt +++ b/NodeBase/Dockerfile.txt @@ -117,8 +117,7 @@ RUN sudo chmod -R 777 ${HOME} \ #============================== # Scripts to run fluxbox and x11vnc #============================== -COPY start-fluxbox.sh \ - start-vnc.sh \ +COPY start-vnc.sh \ /opt/bin/ #============================ @@ -129,6 +128,7 @@ ENV SCREEN_HEIGHT 1020 ENV SCREEN_DEPTH 24 ENV SCREEN_DPI 96 ENV DISPLAY :99.0 +ENV DISPLAY_NUM 99 ENV START_XVFB true #======================== diff --git a/NodeBase/selenium.conf b/NodeBase/selenium.conf index 32547c5e9..49f58b886 100644 --- a/NodeBase/selenium.conf +++ b/NodeBase/selenium.conf @@ -21,25 +21,6 @@ stderr_logfile_backups=5 stdout_capture_maxbytes=50MB stderr_capture_maxbytes=50MB -[program:fluxbox] -priority=5 -command=/opt/bin/start-fluxbox.sh -autostart=true -autorestart=unexpected -startsecs=0 -startretries=0 - -;Logs -redirect_stderr=false -stdout_logfile=/var/log/supervisor/fluxbox-stdout.log -stderr_logfile=/var/log/supervisor/fluxbox-stderr.log -stdout_logfile_maxbytes=50MB -stderr_logfile_maxbytes=50MB -stdout_logfile_backups=5 -stderr_logfile_backups=5 -stdout_capture_maxbytes=50MB -stderr_capture_maxbytes=50MB - [program:vnc] priority=10 command=/opt/bin/start-vnc.sh diff --git a/NodeBase/start-fluxbox.sh b/NodeBase/start-fluxbox.sh deleted file mode 100755 index 56e3d44ac..000000000 --- a/NodeBase/start-fluxbox.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# -# IMPORTANT: Change this file only in directory NodeDebug! - -if [ "${START_XVFB}" = true ] ; then - fluxbox -display ${DISPLAY} -else - echo "Fluxbox won't start because Xvfb is configured to not start." -fi diff --git a/NodeBase/start-vnc.sh b/NodeBase/start-vnc.sh index a70cb8c81..b921af050 100755 --- a/NodeBase/start-vnc.sh +++ b/NodeBase/start-vnc.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# IMPORTANT: Change this file only in directory NodeDebug! +# IMPORTANT: Change this file only in directory NodeBase! if [ "${START_XVFB}" = true ] ; then if [ ! -z $VNC_NO_PASSWORD ]; then @@ -20,8 +20,7 @@ if [ "${START_XVFB}" = true ] ; then echo "Waiting for Xvfb..." done - # -noxrecord fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859213 in x11vnc 0.9.13-2 - x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -display ${DISPLAY} -noxrecord + x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -rfbportv6 5900 -display ${DISPLAY} else echo "Vnc won't start because Xvfb is configured to not start." fi diff --git a/NodeBase/start-xvfb.sh b/NodeBase/start-xvfb.sh index 4d2ed0f2c..d86c537ec 100755 --- a/NodeBase/start-xvfb.sh +++ b/NodeBase/start-xvfb.sh @@ -5,7 +5,14 @@ if [ "${START_XVFB}" = true ] ; then rm -f /tmp/.X*lock - /usr/bin/Xvfb ${DISPLAY} -screen 0 ${GEOMETRY} -dpi ${SCREEN_DPI} -ac +extension RANDR + # Command reference + # http://manpages.ubuntu.com/manpages/bionic/man1/xvfb-run.1.html + # http://manpages.ubuntu.com/manpages/bionic/man1/Xvfb.1.html + # http://manpages.ubuntu.com/manpages/bionic/man1/Xserver.1.html + /usr/bin/xvfb-run --server-num=${DISPLAY_NUM} \ + --listen-tcp \ + --server-args="-screen 0 ${GEOMETRY} -dpi ${SCREEN_DPI} -listen tcp -noreset -ac +extension RANDR" \ + /usr/bin/fluxbox -display ${DISPLAY} else - echo "Xvfb won't start. Chrome/Firefox can only run in headless mode. Remember to set the 'headless' flag in your test." + echo "Xvfb and Fluxbox won't start. Chrome/Firefox/Opera can only run in headless mode. Remember to set the 'headless' flag in your test." fi diff --git a/Standalone/selenium.conf b/Standalone/selenium.conf index 055e2155c..d43952750 100644 --- a/Standalone/selenium.conf +++ b/Standalone/selenium.conf @@ -21,25 +21,6 @@ stderr_logfile_backups=5 stdout_capture_maxbytes=50MB stderr_capture_maxbytes=50MB -[program:fluxbox] -priority=5 -command=/opt/bin/start-fluxbox.sh -autostart=true -autorestart=unexpected -startsecs=0 -startretries=0 - -;Logs -redirect_stderr=false -stdout_logfile=/var/log/supervisor/fluxbox-stdout.log -stderr_logfile=/var/log/supervisor/fluxbox-stderr.log -stdout_logfile_maxbytes=50MB -stderr_logfile_maxbytes=50MB -stdout_logfile_backups=5 -stderr_logfile_backups=5 -stdout_capture_maxbytes=50MB -stderr_capture_maxbytes=50MB - [program:vnc] priority=10 command=/opt/bin/start-vnc.sh