Fix “Black Screen” on VNC

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!

– Back to FAQ Section –

Share

5 thoughts on “Fix “Black Screen” on VNC

  1. Hello,
    Your process ID ‘925’ is nowhere to be found on the ‘ps’ output :
    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

  2. “the process id in my case is 925″ is incorrect. The process ID as shown is 777. This is confusing. You should also add that this requires one to SSH into their remote machine to issue the command. You mention SSH being enabled but not the process of connecting to their remote machine and issuing these commands to it, from their local machine.

    Local Machine > Remote Machine (locked out), so you use Local machine to SSH into Remote Machine (SSH username@machine.name via Local Machine Terminal) and then issue the commands. I looked for “console” at the end of my user string and it worked.

    With those caveats, this worked well for me.

    • MiniGuy,

      Thank you for contributing. We’ve updated the page to make this less confusing.

      If you decide to sign up for our service we’ll give you a month free.

  3. Thank you, for that trick. After all that one helped me out. I am curious if I need to perform that tasks every time, when I need to VNC to my server.

    Anyway. Thank you for that brillant help.

    • You won’t run this command to recover VNC when something has failed. It should stay working and only be required when there is a problem.

      Dustin

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>