2 # $XConsortium: xon.sh /main/2 1995/07/19 18:06:13 drk $
3 # start up xterm (or any other X command) on the specified host
4 # Usage: xon host [arguments] [command]
7 echo "Usage: $0 <hostname> [-user user] [-name window-name] [-debug]"
8 echo "[-screen screen-number] [command ...]"
19 DISPLAY=`echo $DISPLAY | sed 's/unix//'`
25 hostname=`echo $fullname | sed 's/\..*$//'`
26 if [ $hostname = $target -o $fullname = $target ]; then
30 DISPLAY=$fullname$DISPLAY
36 case x$XUSERFILESEARCHPATH in
38 xpath='HOME=${HOME-`pwd`} '
41 xpath='HOME=${HOME-`pwd`} XUSERFILESEARCHPATH=${XUSERFILESEARCHPATH-"'"$XUSERFILESEARCHPATH"'"} '
44 redirect=" < /dev/null > /dev/null 2>&1 &"
54 rcmd="rsh $target $username"
58 XAUTHORITY="$HOME/.Xauthority"
61 case x$XUSERFILESEARCHPATH in
65 xpath="XUSERFILESEARCHPATH=$XUSERFILESEARCHPATH "
89 DISPLAY=`echo $DISPLAY | sed 's/:\\([0-9][0-9]*\\)\\.[0-9]/:\1/'`.$1
101 xauth="XAUTHORITY=$XAUTHORITY "
104 vars="$xpath$xauth"DISPLAY="$DISPLAY"
107 $rcmd 'sh -c '"'$vars"' xterm '$ls' -name "'"$resource"'" -T "'"$label"'" -n "'"$label"'" '"$redirect'"
110 $rcmd 'sh -c '"'$vars"' '"$*$redirect'"