Disable Gitea workflows and stabilize VNC startup

Pause automated builds while updating the image, and improve VNC startup/logging with a one-way clipboard bridge for reliable browser sync.
This commit is contained in:
2026-03-01 12:21:22 +01:00
parent ba48d1c8d1
commit 2742058a32
9 changed files with 473 additions and 18 deletions

View File

@@ -32,12 +32,36 @@ if [ ! -z "$VNC_PASSWORD" ]; then
fi
# Export environment variables for supervisord
export DISPLAY
export DISPLAY=${DISPLAY:-:0}
export VNC_PORT
export NOVNC_PORT
export VNC_RESOLUTION
export VNC_DEPTH
export USER
# Ensure X11 socket directory exists with the correct permissions (needed by Xvnc)
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
chown root:root /tmp/.X11-unix
# Remove stale X lock files for the configured DISPLAY to avoid "Server is already active" errors
DISPLAY_NUM=${DISPLAY#:}
LOCK_FILE="/tmp/.X${DISPLAY_NUM}-lock"
SOCKET_FILE="/tmp/.X11-unix/X${DISPLAY_NUM}"
if [ -f "$LOCK_FILE" ]; then
LOCK_PID=$(cat "$LOCK_FILE" 2>/dev/null || true)
if pgrep -f "Xvnc :${DISPLAY_NUM}" >/dev/null 2>&1; then
echo "Existing Xvnc server detected for display :${DISPLAY_NUM}; leaving lock file intact"
elif [ -n "$LOCK_PID" ] && kill -0 "$LOCK_PID" 2>/dev/null; then
echo "Lock file $LOCK_FILE points to PID $LOCK_PID, but no Xvnc found; removing stale lock"
rm -f "$LOCK_FILE"
rm -f "$SOCKET_FILE"
else
echo "Removing stale X lock file $LOCK_FILE"
rm -f "$LOCK_FILE"
rm -f "$SOCKET_FILE"
fi
fi
# Start supervisord as root (which will start processes as nicotine user)
exec "$@"