krypted.com

Tiny Deathstars of Foulness

Since I already started down this path, we can also push out information for a Windows box therefore programatically allowing you to push updates to two programs and be able to manage all your boxen.  You would push something along the following (creating a file that matches your naming convention followed by .rdp):
connect to console:i:0 bitmapcachepersistenable:i:1 redirectdrives:i:0 disable wallpaper:i:1 disable full window drag:i:1 disable menu anims:i:1 disable themes:i:0 audiomode:i:0 desktopwidth:i:1024 desktopheight:i:768 session bpp:i:16 cord save password:i:0 startdisplay:i:0 cord fullscreen:i:0 cord row index:i:2 full address:s:10.10.10.10 username:s:charles domain:s: cord label:s:charles
So programatically you can change any of the settings by replacing it with a variable.  Therefore, in a script if we just wanted to push a new address and user name then you could simply echo the data into a file as follows, which would use the $1 to $4 positions (thus enabling you to send the data from another applications API into CoRD):
#!/bin/bash echo "connect to console:i:0 bitmapcachepersistenable:i:1 redirectdrives:i:0 disable wallpaper:i:1 disable full window drag:i:1 disable menu anims:i:1 disable themes:i:0 audiomode:i:0 desktopwidth:i:1024 desktopheight:i:768 session bpp:i:16 cord save password:i:0 startdisplay:i:0 cord fullscreen:i:0 cord row index:i:2 full address:s:$1 username:s:$2 domain:s: cord label:s:$3"> /Users/cedge/Library/Application Support/CoRD/Servers/$4
This could be pretty handy if, let's say, you're using the EC2 scripts from earlier to derive a username and password from Amazon and then pushing them into CoRD by calling this script.  For example, if the script is called CoRDSetup.sh then you would run:
./CoRDSetup.sh address.domain.com username machinelabel filename
I'm sure there are way better ways to go about this, but it's a quick and easy proof of concept that gets the job done.  Like with the ARD article, there are again no passwords being sent to CoRD.

May 14th, 2009

Posted In: Mac OS X, Mass Deployment

Tags: , ,