#!/bin/bash source /etc/rdesktop.conf export DISPLAY=:0 #exit if X is not up yet netstat -nap | grep LISTEN | grep :6000 || exit 1 killall -9 xv xv -root -max -smooth /etc/splash/S/800x600.jpg -viewonly & if ! rdesktop $HOST -f -x l -P; then xmessage -center "Cannot connect to terminal server at $HOST. Press OK to try again" fi