Skip to content

Instantly share code, notes, and snippets.

@marcelstoer
Last active May 15, 2021 18:27
Show Gist options
  • Save marcelstoer/e6ff90fc7f3ff991a562 to your computer and use it in GitHub Desktop.
Save marcelstoer/e6ff90fc7f3ff991a562 to your computer and use it in GitHub Desktop.
Enable OS X screen sharing from the command line, http://frightanic.com/apple-mac/enable-os-x-screen-sharing-command-line/
$ ssh <user>@<mac-without-screen>
$ sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist
/System/Library/LaunchDaemons/com.apple.screensharing.plist: Service is disabled
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
@TJRoger
Copy link

TJRoger commented Mar 30, 2021

You must change the option from system preference settings manually to restore screen sharing from the black screen.

@smitjainsj had the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment