client1.cgi:
#! /bin/csh -f echo "content-type: text/plain" echo "" echo "Environment:" echo "--------------------------" echo "" echo "PWD = `pwd`" echo "" echo "Data from stdin:" echo "--------------------------" cat echo "--------------------------"
client2.cgi:
#! /bin/csh -f echo "content-type: text/html" echo "" echo "Please ignore this page, and just look at the xterm window that's" echo "trying to appear on your screen.<P>" setenv DISPLAY "$REMOTE_HOST":0 if { xterm -sb -e /bin/csh -f -c "\ echo 'Environment:' \ echo '--------------------------' \ setenv \ echo '--------------------------' \ echo '' \ echo 'PWD = `pwd`' \ echo '' \ echo 'Data from ${1}:' \ echo '--------------------------' \ cat $1 \ echo '--------------------------' \ \ echo ''; echo '[Press RETURN to continue]'; set junk "\$"< \ " } then echo "OK, I bet you've seen it." else echo "If you don't see such a window launch, note that:" echo "<UL><LI> This will only work if you're sitting at an X-windows display, and" echo " <LI> you'll need to allow the xterm process, running on the Center's" echo " web server, to connect to your display; so type<P>" echo " xhost $SERVER_NAME</UL>" endif