Hi Guys, I'm trying to improve my Shell script a little.
Basically it's a simple script that uses Zenity to display a form that I can use to RDP to other computers using rdesktop.
What I'd like to achieve is the following... Save previous servers I've visited into a file that Zenity can read from and later on display as a drop down list on the Hostname\IP field (While still accepting manual imput of course)
and I'd like to add a field called Resolution in which I can select from a drop-down list of resolutions in which to run rdesktop.
Original script follows:
ans=`zenity --width=400 --height=200 --forms --title="Remote desktop client (Windows)" --text="Remote desktop computer" --add-entry="Hostname\IP" --add-entry="Username" --add-entry="Domain" --add-password="Password"`
ip_s=`echo $ans | cut -f1 -d"|"`
user=`echo $ans | cut -f2 -d"|"`
doma=`echo $ans | cut -f3 -d"|"`
pass=`echo $ans | cut -f4 -d"|"`
if [ -z $user ]; then
if [ ! $doma ]; then
#echo $user $doma $pass
rdesktop -g1920x1040 -z -u $user -p $pass $ip_s -0 -5 -K -r clipboard:CLIPBOARD
rdesktop -g19201040 -z -d $doma -u $user -p $pass $ip_s -0 -5 -K -r clipboard:CLIPBOARD
if [ $? == "76" ]; then
zenity --error --text "Unable to connect !!!"