From 7a0e97dd31409762b192c4ec3a8d65ed32a0d080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 7 Mar 2004 17:22:06 +0000 Subject: [PATCH] even if kx failes, start anyway From: Harald Barth git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13457 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/kx/rxtelnet.in | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/appl/kx/rxtelnet.in b/appl/kx/rxtelnet.in index d2877c425..d5cf010f2 100644 --- a/appl/kx/rxtelnet.in +++ b/appl/kx/rxtelnet.in @@ -39,12 +39,16 @@ PATH=$pdc_trams:$bindir:$PATH export PATH set -- `kx $kx_args $host` if test $# -ne 3; then - exit 1 + echo "Warning: Cound not setup X forwarding" + pid=NO + disp="" + auth="" +else + screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'` + pid=$1 + disp=${2}${screen} + auth=$3 fi -screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'` -pid=$1 -disp=${2}${screen} -auth=$3 oldifs=$IFS IFS=: set -- $PATH @@ -61,8 +65,8 @@ if test -z "$term"; then fi test "$verb" && echo "Telnet command used is `type $binary`." if test -n "$term" -a "$term" != "none"; then - ($term -title $title -n $title $xterm_args -e env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port; kill -USR2 $pid) & + ($term -title $title -n $title $xterm_args -e env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port; test x"$pid" != xNO && kill -USR2 $pid) & else env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port - kill -USR2 $pid + test x"$pid" != xNO && kill -USR2 $pid fi