Skip to content

Instantly share code, notes, and snippets.

@pcolunga
Last active October 9, 2023 07:48
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pcolunga/2996640 to your computer and use it in GitHub Desktop.
Save pcolunga/2996640 to your computer and use it in GitHub Desktop.
Enable screen-sharing on Mac OS X via SSH
#Log and type
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
# To enable screen sharing
cd /Library/Preferences
echo -n enabled > com.apple.ScreenSharing.launchd
# To disable screen sharing
cd /Library/Preferences
rm com.apple.ScreenSharing.launchd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment