#!/bin/bash servers="${HOME}/local/rdp-servers.conf" resolution="1014x758" args="-g ${resolution} -n $(hostname) -r clipboard:CLIPBOARD -a 8 -x b" host="${1}" if [ "x$host" = "x" ] then hosts=$(cat ${servers} | sort | while read s; do echo "${s} ${s}"; done) host=$(zenity --list --text "Select an RDP server" --radiolist --width 300 --height 400 --column '' --column 'Server' ${hosts}) if [ "x$host" = "x" ] then exit 1 fi fi if [ "x${2}" != "x" ] then host="${2}" args="${args} -0" fi rdesktop ${args} -T "${host}" "${host}"