2 # $Id: rxterm.in,v 1.23 2002/03/18 17:37:34 joda Exp $
4 usage="Usage: $0 [-l username] [-k] [-f] [-r rsh_args] [-x xterm_args] [-K kx_args] [-w term_emulator] [-b rsh_binary][-v] [-h | --help] [--version] host"
10 -l) rsh_args="${rsh_args} -l $2 "; kx_args="${kx_args} -l $2"; title="${2}@"; shift 2;;
11 -r) rsh_args="${rsh_args} $2 "; shift 2;;
12 -x) xterm_args="${xterm_args} $2 "; shift 2;;
13 -f) rsh_args="${rsh_args} -f"; shift;;
14 -k) kx_args="${kx_args} -k"; shift;;
15 -K) kx_args="${kx_args} $2 "; shift 2;;
16 -w) term=$2; shift 2;;
17 -b) binary=$2; shift 2;;
18 --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;;
19 -h) echo $usage; exit 0;;
20 --help) echo $usage; exit 0;;
22 -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
26 if test $# -lt 1; then
27 echo "Usage: $0 host [arguments to $term]"
31 title="${title}${host}"
33 pdc_trams=`dirname $0`
34 PATH=$pdc_trams:$bindir:$PATH
36 set -- `kx $kx_args $host`
37 if test $# -ne 3; then
40 screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'`
45 $binary -n $rsh_args $host "/bin/sh -c 'DISPLAY=$disp XAUTHORITY=$auth $term -T $title -n $title $xterm_args </dev/null >/dev/null 2>/dev/null &'"