Apple Remote Desktop

The Apple Remote Desktop (ARD) is a software mangement and weakly monitoring tool that can be used to control multiple desktops or servers at a time. It can call up a VNC like terminal, or be used to dispatch files, UNIX commands or even lock down other machines. It can also be used to shutdown other machines or wake them up.

Controlling ARD from the command line

Once in a while, ARD can run into errors such as the VNC not being able to display properly or somehow, unable to start or stop. In such cases, especially in HPC, the only method of acess, being SSH, would be the way to restart or re-configure some startup parameters of ARD.

Luckily, Apple Remote Desktop includes the “kickstart” command line utility. It allows you to install, uninstall, activate, configure, and restart components of Apple Remote Desktop without restarting the computer. You can configure all the features found in Apple Remote Desktop preferences.

The kickstart utility is located here:

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart

You need an administrator account to use the kickstart utility. To begin using the kickstart utility, use the sudo command, such as:

$ 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.

  • Activate Remote Desktop Sharing, en! able access privileges for all users, restart ARD Agent:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
      -activate -configure \
      -access -on -restart -agent
  • 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 refererence the shortname of a user of the system.

  • Activate Remote Desktop Sharing, disable access privileges for all users:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
      -activate -configure \
      -access -off
  • If you just want to stop the ARD Agent process:
$ sudo /System/Library/CoreServices/Remote! Management/ARDAgent.app/Contents/Resources/kickstart \
      -agent -stop
  • If you want to deactivate it:
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
      -deactivate -configure \
      -access -off

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