Skip to content

Instantly share code, notes, and snippets.

@RandyMcMillan
Forked from pcolunga/screen-sharing-osx.sh
Created July 13, 2023 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RandyMcMillan/7d7abc59af6dadb1c18f14ed9d71c545 to your computer and use it in GitHub Desktop.
Save RandyMcMillan/7d7abc59af6dadb1c18f14ed9d71c545 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