Last active
March 16, 2022 23:12
-
-
Save gswallow/259567210ca9d14b0188ad0dc9663edc to your computer and use it in GitHub Desktop.
Microsoft RDP client for mac pisses me off
This file contains 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 -e | |
host=$1; shift | |
uri="rdp://full%20address=s:$host" | |
# Redirect | |
uri="${uri}&redirectdrives=i:1" | |
uri="${uri}&redirectclipboard=i:1" | |
# Set resolution the way I want it | |
uri="${uri}&session%20bpp=i:24" | |
uri="${uri}&desktopwidth=i:1600" | |
uri="${uri}&desktopheight=i:900" | |
uri="${uri}&screen%20mode%20id=i:0" | |
# Prompt for credentials on client | |
uri="${uri}&prompt%20for%20credentials%20on%20client=i:1" | |
# Set username | |
if [ $# -ge 1 ]; then | |
uri="${uri}&username=s:$1" | |
shift | |
fi | |
# Go | |
open -Fj "$uri" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment