Screen sharing sharing is an excellent tool to allow remote use of your Mac OS X server. The issue is you may occasionally run into the situation where you receive “The Black Screen”, a white screen, or screen sharing just locks up all together. After struggling with this issue for a while I have finally discovered the solution!
We are going to kill the window UI that is currently logged in (or not). This will NOT affect any applications that your currently have running on your server. You will need to be sure that your server has SSH enabled.
On your client open up Terminal (OS X or Linux) or use PuTTy (Windows), login to your server and perform the following commands:
ps auxwww|grep loginwindow
This should give you an an output like this:
root 777 0.0 0.1 2503556 5580 ?? Us 3:15AM 0:00.08 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console jc 953 0.0 0.0 2425708 276 s000 R+ 3:15AM 0:00.00 grep loginwindow
You may have a few different lines, but essentially you’re looking for the root line, the process id in my case is 777. Now that we have the process ID we will want to issue the kill -9 command and it would look like this:
sudo kill -9 777
After killing the process your server will automatically restart the login. You should now be able to start screen sharing and login!