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