Skip to content

Commit 26d33be

Browse files
authored
fix startup with Xephyr (elgalu#414)
When Xephyr (or another X server) is provided outside of the container, do not try to start Xvfb on its DISPLAY - this will fail. Instead, set the display number.
1 parent 793fa76 commit 26d33be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xvfb/bin/start-xvfb.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ function start_xvfb() {
8989
}
9090

9191
if [ ! -z "${XE_DISP_NUM}" ]; then
92+
# we do not wish to start another X server if it is provided externally
9293
echo "INFO: XE_DISP_NUM '${XE_DISP_NUM}' was provided so switching to that DISPLAY"
9394
echo "INFO: and skipping virtual framebuffer startup in favor of remote."
9495
export DISP_N="${XE_DISP_NUM}"
9596
export DISPLAY=":${DISP_N}"
96-
start_xvfb
97+
echo "${DISPLAY}" > DISPLAY
98+
echo "${DISP_N}" > DISP_N
9799
# elif [ "${PICK_ALL_RANDOM_PORTS}" = "true" ] || [ "${DISP_N}" = "-1" ]; then
98100
else
99101
# Find a free DISPLAY port starting with current DISP_N if any

0 commit comments

Comments
 (0)