From e9cb8fee82fe94ee08a192de3edef6231797dfdc Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 9 Oct 1996 20:42:07 +0000 Subject: [PATCH] Try to find some kind of terminal emulator for X. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@834 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/kx/rxtelnet.in | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/appl/kx/rxtelnet.in b/appl/kx/rxtelnet.in index 201b1d200..0c6c4d279 100644 --- a/appl/kx/rxtelnet.in +++ b/appl/kx/rxtelnet.in @@ -6,11 +6,30 @@ if test $# -ne 1; then fi host=$1 bindir=%bindir% -PATH=$PATH:$bindir set -- `kx $host` +PATH=$PATH:$bindir +set -- `kx $host` if test $# -ne 3; then exit 1 fi pid=$1 disp=:$2 auth=$3 -(xterm -T $host -n $host -e env DISPLAY=$disp XAUTHORITY=$auth $bindir/telnet -D $host ; kill -USR2 $pid) & +term= +oldifs=$IFS +IFS=: +set -- $PATH +IFS=$oldifs +for i in $*; do + test -n "$i" || i="." + for j in xterm aixterm dxterm hpterm; do + if test -x $i/$j; then + term=$j; break 2 + fi + done +done +if test -n "$term"; then + $term -title $host -name $host -e env DISPLAY=$disp XAUTHORITY=$auth telnet -D $host +else + env DISPLAY=$disp XAUTHORITY=$auth telnet -D $host +fi +kill -USR2 $pid