fix: remove stale Xvfb lock file on container restart
On restart, /tmp/.X1-lock remains from previous run causing Xvfb to fail with 'Server is already active for display 1', which then breaks xfreerdp and x11vnc. Clean up lock and socket before starting Xvfb. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -183,6 +183,8 @@ cat > /opt/portal/index.html <<HTML
|
||||
HTML
|
||||
|
||||
export DISPLAY="$DISPLAY_NUM"
|
||||
DISPLAY_N="${DISPLAY_NUM#:}"
|
||||
rm -f "/tmp/.X${DISPLAY_N}-lock" "/tmp/.X11-unix/X${DISPLAY_N}" 2>/dev/null || true
|
||||
Xvfb "$DISPLAY_NUM" -screen 0 "$SCREEN_GEOMETRY" >/tmp/xvfb.log 2>&1 &
|
||||
sleep 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user