#!/bin/csh

#-------------------------------------------------
#will launch idlx
#syntax: launch_script host script rsh_flag 
# $1 = display
# $2 = script
# $3 = outputfile
#-------------------------------------------------
#display=$1
#script=$2
#outputfile=$3
#priority=$4
set priority = $4
if ("$4" == "" ) then
	set priority = 19
endif
setenv DISPLAY ${1}:0
set cmd = `alias idlx`
#---------------------------------------------
#Linux IDL does not like input redirection
#---------------------------------------------
nice +$priority $cmd  $2 >> $3
exit
