wok diff dropbear/stuff/sshx @ rev 10929

Up: tazpkg to 4.7.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Aug 18 22:21:30 2011 +0000 (2011-08-18)
parents 409cb72cb3e0
children 0078fa9a46a4
line diff
     1.1 --- a/dropbear/stuff/sshx	Wed Aug 03 19:00:00 2011 +0200
     1.2 +++ b/dropbear/stuff/sshx	Thu Aug 18 22:21:30 2011 +0000
     1.3 @@ -3,12 +3,13 @@
     1.4  xdbclient()
     1.5  {
     1.6  	read host type data
     1.7 -	n=10; dpy=localhost:$n
     1.8 -	dbclient -R $((6000+$n)):localhost:6000 "$@" \
     1.9 +	svr=$(echo $DISPLAY | sed 's/.*:\([0-9]*\).*/\1/')
    1.10 +	n=$((10+$svr)); dpy=localhost:$n
    1.11 +	dbclient -R $((6000+$n)):localhost:$((6000+$svr)) "$@" \
    1.12  		"xauth add $dpy $type $data; export DISPLAY=$dpy; $TERM"
    1.13  }
    1.14  
    1.15 -case "$TERM" in
    1.16 -xterm*|rxvt*)	xauth list :0 | xdbclient "$@" ;;
    1.17 -*)		dbclient "$@" ;;
    1.18 +case "$DISPLAY" in
    1.19 +'')	dbclient "$@" ;;
    1.20 +*)	xauth list $DISPLAY | xdbclient "$@" ;;
    1.21  esac