Ensure /tmp/.X11-unix exists with sane perms
This commit is contained in:
parent
cfc1e0ee12
commit
949206dbf2
1 changed files with 6 additions and 0 deletions
|
|
@ -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/')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue