-
-
Save eugrus/4c7c167459a9555359eec7c02a5759e2 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env bash | |
| # Prompt for inputs | |
| read -rp "Server: " server | |
| read -rp "Domain (leave empty if none): " domain | |
| read -rp "Username: " user | |
| read -rsp "Password: " password | |
| echo | |
| # Base command | |
| cmd=(xfreerdp3 /f /dynamic-resolution) | |
| # Add arguments | |
| cmd+=("/v:$server") | |
| cmd+=("/u:$user") | |
| cmd+=("/p:$password") | |
| cmd+=("/clipboard") | |
| # Add domain only if provided | |
| if [[ -n "$domain" ]]; then | |
| cmd+=("/d:$domain") | |
| fi | |
| # Execute command | |
| "${cmd[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment