Friday, April 11, 2008

ARD Kickstarting

All the wonderful commands to kickstart ARD when it's being stubborn:

$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent
Note: All commands presented in this document should be typed as one line of text. It's OK if the text wraps as you enter it, just be sure not to enter hard carriage returns.
Following are some examples of other things you could do.

1. Activate Remote Desktop Sharing, enable access privileges for all users, restart ARD Agent:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all

2. Activate Remote Desktop Sharing, enable access privileges for the users "admin", grant full privileges for the users "admin", restart ARD Agent and Menu extra:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent -menu

Note: The -users flag should reference the shortname of a user of the system.

3. Activate Remote Desktop Sharing, disable access privileges for all users:

$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off

4. If you just want to stop the ARD Agent process:

# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -agent -stop

5. If you want to deactivate it:


# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off

6. ARD 3.2 or later only: Allow access for only these users (the users must be specified in a separate command)

$ ./kickstart -configure -allowAccessFor -specifiedUsers

7. ARD 3.2 or later only: Allow access for all users and give all users full access

$ ./kickstart -configure -allowAccessFor -allUsers -privs -all

Note: Unlike other kickstart options, you CANNOT combine the allowAccessFor options with other kickstart options. You must use it like one of the examples above (items 6 and 7 above). This means you may have to call kickstart more than one time to completely configure a computer.

Tip: For more information about using the kickstart command, add the -help flag. For example:

# sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help

How to suspend cgsession

A handy little script for your server to force CGsession to suspend (force a logout) after a given period of time - in this case 300 seconds or 5 minutes.

cd system/library/coresvcs/menu extras/user.menu/contents/resources
while [i]; do
./cgsession -suspend
sleep 300

Thursday, April 10, 2008

Are you a Macintosh computer user?

I'm a Macintosh network person. I used to say that I don't have a religion - well, I still don't - whether it's Mac OS, Windows, Linux, Unix, CP-M, MS-Dos, or RPG-III. Wait, I never used RPG-III. CP-M was made for an earlier species of humans. MSDos was okay for while, then Mac OS arrived in the early 1980's and many of us looked and said, wha? But over time it sure has changed, grown, matured, expanded, exceeded, and soared to the top the list as one of the most advanced, stable operating systems around.

I love my Mac. I love OS X Server. It comes with magic pixie dust that it sprinkles on itself when there's a problem. Less than 1 percent of the time the pixie dust misses and there is an actual crash, but for the most part they're robust and reliable.

An that's why I like my Macintosh. It also runs Windows XP faster than my PC does, and that's on a Parallels virtual machine. If only I could run OS 9 virtually on the Intel hardware. Wait, what am I saying????? Ah, back to the grind.