Blame SOURCES/xorg-x11-xinit-1.3.2-systemd-logind.patch

741de5
diff -Nur xinit-1.3.2.orig/startx.cpp xinit-1.3.2/startx.cpp
741de5
--- xinit-1.3.2.orig/startx.cpp	2012-09-29 11:55:06.661264745 -0600
741de5
+++ xinit-1.3.2/startx.cpp	2012-09-29 11:56:24.849771316 -0600
741de5
@@ -80,6 +80,7 @@
741de5
 defaultdisplay=":0"
741de5
 clientargs=""
741de5
 serverargs=""
5178f4
+tty_num=$(tty | sed -n 's/.*tty\([0-9]\+\)$/\1/p')
741de5
 
741de5
 #ifdef __APPLE__
741de5
 
5178f4
@@ -135,6 +136,12 @@
741de5
 enable_xauth=1
741de5
 #endif
741de5
 
741de5
+if [ x"$tty_num" != x ]; then
741de5
+    # Specify TTY number directly to avoid recognizing startx session as
741de5
+    # inactive: RHBZ#820675
741de5
+    serverargs=${serverargs}" vt"${tty_num}
741de5
+fi
741de5
+
741de5
 XCOMM Automatically determine an unused $DISPLAY
741de5
 d=0
741de5
 while true ; do