Ensure /tmp/.X11-unix exists with sane perms
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m16s

This commit is contained in:
nocci 2025-12-30 17:21:53 +00:00
parent cfc1e0ee12
commit 949206dbf2

View file

@ -34,6 +34,12 @@ fi
# ls -l /tmp/.X11-unix/
rm -f /tmp/.X1-lock
# Ensure X11 socket dir exists with sane ownership/permissions.
mkdir -p /tmp/.X11-unix
if [ "$(stat -c %U /tmp/.X11-unix 2>/dev/null)" != "root" ]; then
chown root:root /tmp/.X11-unix 2>/dev/null || chmod 1777 /tmp/.X11-unix
fi
# 6000+SERVERNUM is the TCP port Xvfb is listening on:
# SERVERNUM=$(echo "$DISPLAY" | sed 's/:\([0-9][0-9]*\).*/\1/')