#!/bin/bash
password="$1"
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate \
    -configure -access -on \
    -clientopts -setvnclegacy -vnclegacy yes \
    -clientopts -setvncpw -vncpw "$password" \
    -restart -agent -privs -all

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