#! /bin/sh # Start new xterm session asynchronously # Options: # 1) name of application (defaults to $SHELL) # 2) name of DISPLAY # 3 ... 9) additional parameters for xterm # search for DISPLAY variable or file containing DISPLAY name if [ x$2 = x ] then if [ x$DISPLAY != x ] then dis=$DISPLAY elif [ -f $HOME/.Xdisplay ] then dis=`cat $HOME/.Xdisplay` else echo unable to determine DISPLAY >&2 exit 1 fi else dis=$2 fi # determine remaining parameters for xterm call if [ x$1 = x ] then nam=`hostname` cmd=$SHELL else nam=$1 cmd=$1 fi # start xterm session xterm $3 $4 $5 $6 $7 $8 $9 -n $nam -T $nam -si -sl 320 -display $dis $geo -e /bin/sh -c "stty cs8 -istrip; exec $cmd" &