summaryrefslogtreecommitdiff
path: root/startx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'startx.cpp')
-rw-r--r--startx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/startx.cpp b/startx.cpp
index 125c398..31187b9 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -206,7 +206,7 @@ if [ x"$server" = x ]; then
XCOMM "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
tty=$(tty)
if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then
- tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+ tty_num=${tty#/dev/tty}
vtarg="vt$tty_num -keeptty"
fi
#endif