Last active
March 24, 2022 16:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was fed up with remmina (<= v1.1), so i made my own xfreerdp launcher.