wok-stable annotate dropbear/stuff/sshx @ rev 10919
dropbear: not only server :0
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 04 09:44:39 2011 +0200 (2011-08-04) |
parents | 409cb72cb3e0 |
children | 0078fa9a46a4 |
rev | line source |
---|---|
pascal@10917 | 1 #!/bin/sh |
pascal@10917 | 2 |
pascal@10917 | 3 xdbclient() |
pascal@10917 | 4 { |
pascal@10917 | 5 read host type data |
pascal@10919 | 6 svr=$(echo $DISPLAY | sed 's/.*:\([0-9]*\).*/\1/') |
pascal@10919 | 7 n=$((10+$svr)); dpy=localhost:$n |
pascal@10919 | 8 dbclient -R $((6000+$n)):localhost:$((6000+$svr)) "$@" \ |
pascal@10917 | 9 "xauth add $dpy $type $data; export DISPLAY=$dpy; $TERM" |
pascal@10917 | 10 } |
pascal@10917 | 11 |
pascal@10919 | 12 case "$DISPLAY" in |
pascal@10919 | 13 '') dbclient "$@" ;; |
pascal@10919 | 14 *) xauth list $DISPLAY | xdbclient "$@" ;; |
pascal@10917 | 15 esac |