diff --git a/base/web.Dockerfile b/base/web.Dockerfile index a6974b5..c812d5a 100644 --- a/base/web.Dockerfile +++ b/base/web.Dockerfile @@ -8,6 +8,7 @@ RUN sudo pacman -Syuq --noconfirm # Install KASM VNC server RUN paru -S --noconfirm kasmvncserver-bin +ENV DISPLAY=:1 # KASM requires the hostname binary to start RUN sudo pacman -S --noconfirm inetutils diff --git a/scripts/startserver b/scripts/startserver index 5932175..4b4380a 100644 --- a/scripts/startserver +++ b/scripts/startserver @@ -2,12 +2,18 @@ cd /home/designer # Run VNC server -export DISPLAY=:1 eval $(vncserver -dry-run) & echo -e "password\npassword\n" | vncpasswd -u designer -w -r # Wait for VNC server to start -sleep 1 +sleep 2 +while ! xset q &>/dev/null; +do +echo "XServer not responsive, retrying..." +sleep 2 +done + +echo "XServer has been found, running desktop environment" # Run desktop environment (XFCE) xfce4-session --display=$DISPLAY