![]() I left a debugging line in the script that shows what is going to be sed'd into the t.rdp file. Here is an example that includes the console switch. ![]() Make the script executable: sudo chmod +x rdp.sh (This assumes my rdp.sh script file is in my home directory, ~/ ) alias rdp=~/rdp.sh RdpRunCommand="/Applications/Remote Desktop Connection.app/Contents/MacOS/Remote Desktop Connection" RdpTempRDP='/Users/levi/Dropbox/RDC_Connections/RDS/t.rdp' RdpTemplateFile='/Users/levi/Dropbox/RDC_Connections/RDS/template.rdp' Make the bash script executable: chmod +x rdp.sh.Modify your '~/.bash_profile' to include an alias to 'rdp.sh'.Create a bash script to copy the template.rdp to a temp.rdp, then sed the temp.rdp with the desired host name that gets passed in when invoking the script.This gets used in the 'sed' command as the string to search for and replace with a real server name. Create a Microsoft RDP template profile with all of your preferred settings.I bet that bash scripting has a more elegant solution than I use. I included a number of variations of a switch for connecting to the console because I'm old and can never remember which one I like.My bash script will not work with spaces in the paths or file names :).I can pass a host name, and I can throw a switch to connect to the console of Server 2003 hosts. I created a sed+open bash script to make it possible to pass 2 arguments to Microsoft Remote Desktop Client. I made my own CLI script for Microsoft RDP. It works, but it seems to flake out periodically. For that reason, we recommend using the open command, and rdp:// URLs to launch sessions. This overrides or decreases the effectiveness of many of CoRD strong points, including unified sessions, etc. One symptom of this is multiple Dock icons. Launching CoRD from the command line this way causes a fresh instance of CoRD to be opened. Applications/CoRD.app/Contents/MacOS/CoRD -host -port 3389 -u username Passwords with any special characters in them, :, &, etc need to be encoded according to the URL Encoding FormatĬoRD supports the following command line options: -host -port -u -d -p -a set screen depth -width set screen resolution width -height set screen resolution height Colons (:) can be used in place of ampersands for the same effect, without needing to be escaped. ![]() Open using ampersands (&) from the command line, they have to be escaped with a backslash ().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |