update to use i3 instead of openbox
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 29s

This commit is contained in:
Merith 2025-06-05 04:38:43 +00:00
parent eb937f0aab
commit b46f9fccce
3 changed files with 67 additions and 27 deletions

28
vnc.sh
View file

@ -1,10 +1,10 @@
#!/bin/bash
# Prepare variables
: "${VNC_BUILTIN_WIDTH:=1280}"
: "${VNC_BUILTIN_HEIGHT:=720}"
: "${VNC_BUILTIN_PIXELDEPTH:=24}"
: "${VNC_BUILTIN_DISABLED:=false}"
: "${VNC_BUILTIN_WIDTH:=1024}"
: "${VNC_BUILTIN_HEIGHT:=786}"
: "${VNC_BUILTIN_PIXELDEPTH:=32}"
: "${VNC_BUILTIN_DISABLED:=true}"
if [ "${VNC_BUILTIN_DISABLED}" = true ]; then
echo "Builtin VNC is disabled. You must ensure the DISPLAY variable is set and the target display is accessible"
@ -18,21 +18,19 @@ else
fi
# Wait for the display to become ready
while true
do
if xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; then
echo "Display ${DISPLAY} is ready!"
break
else
echo "Waiting for display ${DISPLAY} to become ready..."
sleep 0.25
fi
while ! xdpyinfo -display "${DISPLAY}" > /dev/null 2>&1; do
echo "Waiting for display ${DISPLAY} to become ready..."
sleep 1
done
echo "Display ${DISPLAY} is ready!"
# Launch the VNC server if enabled
if [ "${VNC_BUILTIN_DISABLED}" != true ]; then
x11vnc -bg -forever -nopw -display ${DISPLAY} &
fi
# Launch OpenBox
openbox &
# Launch i3 window manager
/usr/bin/i3
echo "i3 exited unexpectedly"
sleep infinity