Mac – Restart Screen Sharing Service on Mac mini Server

mac-miniosx-serverscreen-sharing

I'm running Mac OS X (think it's Snow Leopard – 10.6.7) on a Mac mini. I'm trying to connect remotely from an iMac (this has been working fine in the past, for some time). When I click "Share Screen…" in finder on the iMac, I (eventually) see the server's desktop, but it appears to be frozen. However, I've managed to determine (from closing the window and sharing screen again, on repeat) that it IS actually receiving input, just not updating the display.

I can ssh into the server, but how can I restart the screen sharing service?

Best Answer

I had the same trouble, and to a headless Mini also. This is what I found that worked…

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.screensharing.plist  
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist

I had the opportunity to install an SSD in my Mini, and did a clean install of Lion at that time, and the issue persisted.

I made an alias

alias fixscreen='sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist &&  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist'