diff --git a/Dockerfile.debian b/Dockerfile.debian index aadb494..26e7d26 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -186,7 +186,8 @@ RUN \ ENV \ XORG_SOCKET_DIR="/tmp/.X11-unix" \ XDG_RUNTIME_DIR="/tmp/.X11-unix/run" \ - XDG_SESSION_TYPE="x11" + XDG_SESSION_TYPE="x11" \ + FORCE_X11_DUMMY_CONFIG="false" RUN \ echo "**** Update apt database ****" \ && apt-get update \ diff --git a/overlay/etc/cont-init.d/70-configure_xorg.sh b/overlay/etc/cont-init.d/70-configure_xorg.sh index e75cb8c..7361ed4 100644 --- a/overlay/etc/cont-init.d/70-configure_xorg.sh +++ b/overlay/etc/cont-init.d/70-configure_xorg.sh @@ -84,7 +84,7 @@ function configure_x_server { chmod 1777 /tmp/.ICE-unix/ # Check if this container is being run as a secondary instance - if [ "${MODE}" == "p" ] | [ "${MODE}" == "primary" ]; then + if ([ "${MODE}" = "p" ] || [ "${MODE}" = "primary" ]); then echo "Configure container as primary the X server" # Enable supervisord script sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/xorg.ini @@ -108,7 +108,7 @@ function configure_x_server { fi # Configure dummy config if no monitor is connected (not applicable to NVIDIA) - if [[ "X${monitor_connected}" == "X" ]]; then + if ([ "X${monitor_connected}" = "X" ] || [ "${FORCE_X11_DUMMY_CONFIG}" = "true" ]); then echo "No monitors connected. Installing dummy xorg.conf" # Use a dummy display input cp -fv /templates/xorg/xorg.dummy.conf /etc/X11/xorg.conf