Add rdp script

This commit is contained in:
Santiago Lo Coco 2024-10-29 22:09:31 +01:00
parent 1335e49a57
commit 35c666ba47
1 changed files with 20 additions and 0 deletions

20
dotfiles/.local/bin/rdp Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
cleanup() {
echo "Ctrl+C pressed. Killing Xquartz..."
pkill Xquartz
exit 0
}
trap cleanup INT
open -a "Xquartz"
while ! xdpyinfo -display "$DISPLAY"; do
sleep 0.1
done
xfreerdp /u:$USER /p:$PASSWORD /v:$IP /auto-reconnect-max-retries:0 /size:1920x900 +clipboard
echo "Killing Xquartz"
pkill Xquartz
exit 0