Blame SOURCES/0002-startx-Fix-startx-picking-an-already-used-display-nu.patch

3c096a
From 848dc9b7f3a95f14efd4ea34188cba51965c9f53 Mon Sep 17 00:00:00 2001
3c096a
From: Hans de Goede <hdegoede@redhat.com>
3c096a
Date: Fri, 20 Mar 2015 14:25:44 +0100
3c096a
Subject: [PATCH xinit 2/3] startx: Fix startx picking an already used display
3c096a
 number when -nolock is used
3c096a
3c096a
Currently startx relies on /tmp/.X?-lock being present for automatically
3c096a
picking a free display number. This does not work if -nolock is used when
3c096a
starting the server, or if the server is started with -displayfd as -displayfd
3c096a
implies -nolock.
3c096a
3c096a
This is becoming a problem now that -displayfd is getting used by
3c096a
display-managers (e.g. gdm), this fixes this by also checking for
3c096a
/tmp/.X11-unix/X?
3c096a
3c096a
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3c096a
---
3c096a
 startx.cpp | 2 +-
3c096a
 1 file changed, 1 insertion(+), 1 deletion(-)
3c096a
3c096a
diff --git a/startx.cpp b/startx.cpp
3c096a
index 8520399..fe49996 100644
3c096a
--- a/startx.cpp
3c096a
+++ b/startx.cpp
3c096a
@@ -120,7 +120,7 @@ enable_xauth=1
3c096a
 XCOMM Automatically determine an unused $DISPLAY
3c096a
 d=0
3c096a
 while true ; do
3c096a
-    [ -e /tmp/.X$d-lock ] || break
3c096a
+    [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break
3c096a
     d=$(($d + 1))
3c096a
 done
3c096a
 defaultdisplay=":$d"
3c096a
-- 
3c096a
2.3.3
3c096a