osic-stacks/scripts/start_server
2023-09-28 23:37:28 -03:00

25 lines
473 B
Bash

#!/bin/bash
cd /home/designer
# Run VNC server
eval $(vncserver -dry-run) &
echo -e "${LOGIN_PASSWORD}\n${LOGIN_PASSWORD}\n" | vncpasswd -u ${LOGIN_USER} -w -r
# Wait for VNC server to start
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
volare_set_latest
# Keep container alive
sleep infinity