Tip: Activate Remote Apple Events through SSH

The checkbox for “Remote Apple Events” under the Services tab in the Sharing System Preferences pane changes the RemoteAppleEventsEnabled value between true and false in the file /Library/Preferences/com.apple.AEServer.plist.

This allows you to turn Remote Apple Events on and off from the command line by SSH’ing as a user on the remote OS X machine.

Currently I’m using Pico to change the value. Is their a way to change the value directly (like the defaults command)?

These appear to work:

defaults write /Library/Preferences/com.apple.AEServer RemoteAppleEventsEnabled Yes
defaults write /Library/Preferences/com.apple.AEServer RemoteAppleEventsEnabled No

You can grab the current setting with:

defaults read /Library/Preferences/com.apple.AEServer RemoteAppleEventsEnabled

– Rob

Are you sure that simply rewriting the preferences, remote apple events gets activated immediatelly?