2011-08-21

Enabling Screen-Sharing on Mac OS X via ssh

Recently the Nvidia graphics card in my MacBook Pro died (the well known Nvidia hardware failure problem) and I wanted to control the (otherwise running fine) machine remotely but screen sharing was not enabled on the damaged machine. Some digging with Google brought up a very easy solution. You need ssh access to the machine for this of course.


# for <= Mac OS X 10.6.2 do:
sudo sh -c "/bin/echo -n enabled > /Library/Preferences/com.apple.ScreenSharing.launchd"
# for >= Mac OS X 10.6.3 do:
sudo sh -c "/bin/echo -n enabled > /private/etc/ScreenSharing.launchd"
# for Mac OS X Lion do: (use unload to disable)
cd /System/Library/LaunchDaemons/
sudo launchctl load -w com.apple.screensharing.plist


This post contains all these hints:
http://hints.macworld.com/article.php?story=20080318190503111

I personally just tested the second variant for 10.6.8 so this is all I can confirm. The other variants were just taken from this post above to have it all in one place.

Keine Kommentare: