Skip to content

Instantly share code, notes, and snippets.

@meoso
Last active March 24, 2022 16:18
Show Gist options
  • Save meoso/9b58f68736bc438c5ce00a9118891e99 to your computer and use it in GitHub Desktop.
Save meoso/9b58f68736bc438c5ce00a9118891e99 to your computer and use it in GitHub Desktop.
xfreerdp bash commandline wrapper - Simple bash script to launch xfreerdp against csv file of clients
Title Host Username Domain Resolution AdditionalParams
user@example host01 username domain.com 1920x1200 +clipboard /cert-tofu
anothermachine machine74 username domain.com 1920x1200 +clipboard /cert-tofu
admin@thatothermachineiforget examplehostname administrator domain.com 1920x1200 +clipboard /cert-tofu
#!/bin/bash
listfile="$(dirname $0)/rdpcli.csv"
if [ "$1" = "" ] ; then
echo "Usage: $0 <title>|<unique partial title>"
echo ""
while IFS="," read -r title host user domain resolution params ; do
echo "${title} -- ( ${user}@${host}.${domain} ${resolution} ${params} )"
done < "${listfile}"
exit 1
fi
host=$(grep "$1" "${listfile}")
echo $host
if ! [ -z "$host" ]; then
read -s -p "Password: " password ;
echo $host | {
IFS="," read -r title host user domain resolution params ;
eval "/usr/bin/xfreerdp /t:${title} /u:${user} /p:${password} /d:${domain} /size:${resolution} ${params} /cert-ignore /v:${host} & " ;
}
else
echo "Invalid host."
$0
fi
@meoso
Copy link
Author

meoso commented Sep 22, 2017

I was fed up with remmina (<= v1.1), so i made my own xfreerdp launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment