wok rev 10917

dropbear: add sshx (ssh -X fake)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 03 19:00:00 2011 +0200 (2011-08-03)
parents 003018236fb9
children 94fce58dc778
files dropbear/receipt dropbear/stuff/sshx
line diff
     1.1 --- a/dropbear/receipt	Tue Aug 02 10:24:00 2011 +0200
     1.2 +++ b/dropbear/receipt	Wed Aug 03 19:00:00 2011 +0200
     1.3 @@ -47,6 +47,7 @@
     1.4  	mkdir -p $fs/etc
     1.5  	cp -a stuff/dropbear $fs/etc
     1.6  	cp -a stuff/init.d $fs/etc
     1.7 +	cp -a stuff/sshx $fs/usr/bin
     1.8  	touch   $fs/etc/dropbear/dropbear_dss_host_key \
     1.9  		$fs/etc/dropbear/dropbear_rsa_host_key
    1.10  	
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/dropbear/stuff/sshx	Wed Aug 03 19:00:00 2011 +0200
     2.3 @@ -0,0 +1,14 @@
     2.4 +#!/bin/sh
     2.5 +
     2.6 +xdbclient()
     2.7 +{
     2.8 +	read host type data
     2.9 +	n=10; dpy=localhost:$n
    2.10 +	dbclient -R $((6000+$n)):localhost:6000 "$@" \
    2.11 +		"xauth add $dpy $type $data; export DISPLAY=$dpy; $TERM"
    2.12 +}
    2.13 +
    2.14 +case "$TERM" in
    2.15 +xterm*|rxvt*)	xauth list :0 | xdbclient "$@" ;;
    2.16 +*)		dbclient "$@" ;;
    2.17 +esac