2 # $Heimdal: rxterm.in 10887 2002-03-18 17:37:34Z joda $
5 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"
11 -l) rsh_args
="${rsh_args} -l $2 "; kx_args="${kx_args} -l $2"; title="${2}@"; shift 2;;
12 -r) rsh_args
="${rsh_args} $2 "; shift 2;;
13 -x) xterm_args
="${xterm_args} $2 "; shift 2;;
14 -f) rsh_args
="${rsh_args} -f"; shift;;
15 -k) kx_args
="${kx_args} -k"; shift;;
16 -K) kx_args
="${kx_args} $2 "; shift 2;;
17 -w) term
=$2; shift 2;;
18 -b) binary
=$2; shift 2;;
19 --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;;
20 -h) echo $usage; exit 0;;
21 --help) echo $usage; exit 0;;
23 -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
27 if test $# -lt 1; then
28 echo "Usage: $0 host [arguments to $term]"
32 title
="${title}${host}"
34 pdc_trams
=`dirname $0`
35 PATH
=$pdc_trams:$bindir:$PATH
37 set -- `kx $kx_args $host`
38 if test $# -ne 3; then
41 screen
=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'`
46 $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 &'"