summaryrefslogtreecommitdiff
path: root/startx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'startx.cpp')
-rw-r--r--startx.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/startx.cpp b/startx.cpp
index b7a29f9..f4a0283 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -187,6 +187,17 @@ XCOMM process server arguments
if [ x"$server" = x ]; then
server=$defaultserver
+#ifdef __linux__
+ XCOMM When starting the defaultserver start X on the current tty to avoid
+ XCOMM the startx session being seen as inactive:
+ XCOMM https://bugzilla.redhat.com/show_bug.cgi?id=806491
+ tty=$(tty)
+ if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
+ tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+ defaultserverargs=${defaultserverargs}" vt"${tty_num}
+ fi
+#endif
+
XCOMM For compatibility reasons, only use xserverrc if there were no server command line arguments
if [ x"$serverargs" = x -a x"$display" = x ]; then
if [ -f "$userserverrc" ]; then