Enabling Screen Sharing via SSH on Mac OS X
Problem: You are working on a OS X machine via ssh and run into a situation where a VNC display of the remote host would be helpful. The only problem is that it has Screen Sharing disabled.
Solution: Just use the following command on the terminal:
sudo sh -c "/bin/echo -n enabled > /Library/Preferences/com.apple.ScreenSharing.launchd"
(I found this ...