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

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