home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #frontend for rdesktop RDP client.
- #(c) Barry Kauler 2004 www.goosee.com/puppy
-
- . /etc/rdesktoprc
- HDRMSG="#Configuration file for rdesktop. See Network menu."
-
- while [ 1 ]
- do
-
- #RETSTR=`greq -t"rdesktop frontend" -p"rdesktop is a Remote Desktop Protocol client, invoked with the format" -p"\"rdesktop [options] server[:port]\"" -e"Options:" -e"Server:" -e"Port:" -a"HELP"`
- RETSTR=`Xdialog --wmclass "rdpshell" --title "rdesktop frontend" --stdout --left --separator "|" --help "" --3inputsbox "rdesktop is a Remote Desktop Protocol\nclient, invoked with the format:\nrdesktop [options] server[:port]" 0 0 "Options:" "$RDPOPTIONS" "Server:" "$RDPSERVER" "Port:" "$RDPPORT"`
-
- RETVAL=$?
- case $RETVAL in
- 0) #ok
- OPTIONS=`echo -n "$RETSTR" | cut -f 1 -d "|"`
- SERVER=`echo -n "$RETSTR" | cut -f 2 -d "|"`
- PORTx=`echo -n "$RETSTR" | cut -f 3 -d "|"`
- if [ $PORTx ];then
- PORTy=":${PORTx}"
- else
- PORTy=""
- fi
- echo "$HDRMSG" > /etc/rdesktoprc
- echo "RDPOPTIONS=\"${OPTIONS}\"" >> /etc/rdesktoprc
- echo "RDPSERVER=\"${SERVER}\"" >> /etc/rdesktoprc
- echo "RDPPORT=\"${PORTx}\"" >> /etc/rdesktoprc
- ERRSTR=`rdesktop ${OPTIONS} ${SERVER}${PORTy} 2>&1`
- if [ ! $? -eq 0 ];then
- #greq -t"rdesktop frontend" -p"Failed to execute:" -p"rdesktop ${OPTIONS} ${SERVER}${PORTy}" -p" " -p"rdesktop error message:" -p"${ERRSTR}" -a
- Xdialog --wmclass "rdpshell" --title "rdesktop frontend" --infobox "Failed to execute:\nrdesktop ${OPTIONS} ${SERVER}${PORTy}\n\nrdesktop error message:\n${ERRSTR}" 0 0 20000
- fi
- break
- ;;
- 1) #cancel
- break
- ;;
- 2) #help
- dillo file:///usr/share/doc/rdesktop.htm &
- ;;
- *)
- break
- ;;
- esac
-
-
-
- done
-
-