diff options
Diffstat (limited to 'startx.cpp')
-rw-r--r-- | startx.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -56,7 +56,7 @@ defaultclient=XTERM defaultserver=XSERVER defaultclientargs="" defaultserverargs="" -defaultdisplay=":0" +defaultdisplay="" clientargs="" serverargs="" vtarg="" @@ -120,7 +120,7 @@ enable_xauth=1 XCOMM Automatically determine an unused $DISPLAY d=0 while true ; do - [ -e /tmp/.X$d-lock ] || break + [ -e "/tmp/.X$d-lock" -o -S "/tmp/.X11-unix/X$d" ] || break d=$(($d + 1)) done defaultdisplay=":$d" @@ -193,9 +193,9 @@ if [ x"$server" = x ]; then 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 + if expr "$tty" : '/dev/tty[0-9][0-9]*$' > /dev/null; then tty_num=$(echo "$tty" | grep -oE '[0-9]+$') - vtarg="vt$tty_num" + vtarg="vt$tty_num -keeptty" fi #endif @@ -217,7 +217,7 @@ fi XCOMM if no vt is specified add vtarg (which may be empty) have_vtarg="no" for i in $serverargs; do - if expr match "$i" '^vt[0-9]\+$' > /dev/null; then + if expr "$i" : 'vt[0-9][0-9]*$' > /dev/null; then have_vtarg="yes" fi done @@ -283,7 +283,7 @@ EOF XCOMM now add the same credentials to the client authority file XCOMM if '$displayname' already exists do not overwrite it as another - XCOMM server man need it. Add them to the '$xserverauthfile' instead. + XCOMM server may need it. Add them to the '$xserverauthfile' instead. for displayname in $authdisplay $hostname$authdisplay; do authcookie=`XAUTH list "$displayname" @@ | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null; @@ -326,11 +326,6 @@ if command -v deallocvt > /dev/null 2>&1; then fi #endif -#ifdef macII -Xrepair -screenrestore -#endif - #if defined(sun) kbd_mode -a #endif |