Blame SOURCES/0003-startx-Make-startx-auto-display-select-work-with-per.patch

f19413
From 72939fed64b00be4a74dd0e1bf0b418e00ac4c57 Mon Sep 17 00:00:00 2001
f19413
From: Hans de Goede <hdegoede@redhat.com>
f19413
Date: Fri, 20 Mar 2015 14:30:08 +0100
f19413
Subject: [PATCH xinit 3/3] startx: Make startx auto display select work with
f19413
 per user /tmp dirs
f19413
f19413
If a separate /tmp per user is used the existing auto display select code
f19413
does not work, add an extra check for the unix socket for the display number
f19413
existing in /proc/net/unix (linux only).
f19413
f19413
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
f19413
---
f19413
 startx.cpp | 6 +++++-
f19413
 1 file changed, 5 insertions(+), 1 deletion(-)
f19413
f19413
diff --git a/startx.cpp b/startx.cpp
f19413
index fe49996..3b0dd86 100644
f19413
--- a/startx.cpp
f19413
+++ b/startx.cpp
f19413
@@ -120,7 +120,11 @@ enable_xauth=1
f19413
 XCOMM Automatically determine an unused $DISPLAY
f19413
 d=0
f19413
 while true ; do
f19413
-    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break
f19413
+    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] ||
f19413
+#ifdef __linux__
f19413
+        grep -q "/tmp/.X11-unix/X$d" "/proc/net/unix" ||
f19413
+#endif
f19413
+        break
f19413
     d=$(($d + 1))
f19413
 done
f19413
 defaultdisplay=":$d"
f19413
-- 
f19413
2.3.3
f19413