[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rxtelnet when kx fails (but we have still telnet)
When using rxtelnet, I'd like this patch making an xterm with a telnet come
up even if the kx does not succeed. A warning is displayed.
Harald.
*** appl/kx/rxtelnet.in.orig Mon Mar 18 18:37:34 2002
--- appl/kx/rxtelnet.in Wed Jan 28 20:18:28 2004
***************
*** 38,49 ****
export PATH
set -- `kx $kx_args $host`
if test $# -ne 3; then
! exit 1
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
--- 38,53 ----
export PATH
set -- `kx $kx_args $host`
if test $# -ne 3; then
! echo "Warning: Cound not set up X connection, starting without"
! 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
oldifs=$IFS
IFS=:
set -- $PATH
***************
*** 60,67 ****
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=$aut
h $binary -D $telnet_args $host $port; kill -USR2 $pid) &
else
env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port
! kill -USR2 $pid
fi
--- 64,71 ----
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=$aut
h $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
! test x"$pid" != xNO && kill -USR2 $pid
fi