wok diff dropbear/stuff/sshx @ rev 13052
Up: php (5.4.4)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Mon Jun 18 22:09:11 2012 +0200 (2012-06-18) |
parents | 32688e8c97a2 |
children | caf768bb46f9 |
line diff
1.1 --- a/dropbear/stuff/sshx Fri Jan 13 22:30:26 2012 +0100 1.2 +++ b/dropbear/stuff/sshx Mon Jun 18 22:09:11 2012 +0200 1.3 @@ -4,6 +4,7 @@ 1.4 { 1.5 read host type data 1.6 svr=$(echo $DISPLAY | sed 's/.*:\([0-9]*\).*/\1/') 1.7 + scr=${DISPLAY/*./.}; [ "$scr" == "$DISPLAY" ] && scr="" 1.8 n=$((10+($RANDOM % 90))); dpy=localhost:$n 1.9 remote="" 1.10 while true; do 1.11 @@ -17,8 +18,8 @@ 1.12 done 1.13 [ -n "$1" ] || set -- "$TERM || xterm" 1.14 exec dbclient -f -R $((6000+$n)):localhost:$((6000+$svr)) $remote \ 1.15 - "xauth add $dpy $type $data; export DISPLAY=$dpy; $@" \ 1.16 - < /dev/null > /dev/null 2>&1 1.17 + "xauth add $dpy $type $data; export DISPLAY=$dpy$scr; $@ ; xauth remove $dpy" \ 1.18 + < /dev/null > /dev/null 1.19 } 1.20 1.21 case "$DISPLAY" in