From 7927920c35290aa038f4052bc22c3ac1edf74993 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 26 Oct 2021 13:21:18 -0700 Subject: [PATCH] fix(docker): do not export DISPLAY for everybody without XVFB running (#9795) Fixes #9756 --- utils/docker/Dockerfile.bionic | 2 -- utils/docker/Dockerfile.focal | 2 -- utils/docker/start_agent.sh | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/utils/docker/Dockerfile.bionic b/utils/docker/Dockerfile.bionic index 58d743aa81..124db261c4 100644 --- a/utils/docker/Dockerfile.bionic +++ b/utils/docker/Dockerfile.bionic @@ -31,8 +31,6 @@ RUN apt-get update && apt-get install -y python3.8 python3-pip && \ ARG NOVNC_REF="1.2.0" ARG WEBSOCKIFY_REF="0.10.0" -ENV DISPLAY_NUM=99 -ENV DISPLAY=":${DISPLAY_NUM}" RUN mkdir -p /opt/bin && chmod +x /dev/shm \ && apt-get update && apt-get install -y unzip fluxbox x11vnc \ diff --git a/utils/docker/Dockerfile.focal b/utils/docker/Dockerfile.focal index 20ac37cc17..aafd7bd110 100644 --- a/utils/docker/Dockerfile.focal +++ b/utils/docker/Dockerfile.focal @@ -31,8 +31,6 @@ RUN apt-get update && apt-get install -y python3.8 python3-pip && \ ARG NOVNC_REF="1.2.0" ARG WEBSOCKIFY_REF="0.10.0" -ENV DISPLAY_NUM=99 -ENV DISPLAY=":${DISPLAY_NUM}" RUN mkdir -p /opt/bin && chmod +x /dev/shm \ && apt-get update && apt-get install -y unzip fluxbox x11vnc \ diff --git a/utils/docker/start_agent.sh b/utils/docker/start_agent.sh index 35a0c2f999..349c618487 100644 --- a/utils/docker/start_agent.sh +++ b/utils/docker/start_agent.sh @@ -2,6 +2,9 @@ set -e set +x +DISPLAY_NUM=99 +export DISPLAY=":${DISPLAY_NUM}" + SCREEN_WIDTH=1360 SCREEN_HEIGHT=1020 SCREEN_DEPTH=24