Restart VNC service REMOTELY!

Discussion in 'Mac OS X Server' started by RoadKingRick, Jul 31, 2009.

  1. RoadKingRick

    RoadKingRick
    uix_expand uix_collapse
    Registered

    Joined:
    May 26, 2009
    Messages:
    12
    Likes Received:
    0
    You may never need this, but if you do, it is the best trick ever.
    I administer my XSERVER remotely via the built in Apple VNC. However, the VNC service occasionally crashes, and locks my session. It also refuses any more VNC logins. This is particularly frustrating when I am off site! Apple has analyzed this and has no explanation or fix.
    BUT!!
    One talented and determined technician came up with this magic workaround. If SSH access is enabled on the server, you can connect to the server via an SSH client (PUTTY is great for Windows clients), and run this command:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

    You must log in with admin rights, and must enter the admin password again to run the command. It can take a minute to run. After it finishes, VOILA! you can login again via VNC.
    Believe me, this is a Godsend if you need it!
     
    dscalfan and atkinsonde like this.
  2. Giaguara

    Giaguara
    uix_expand uix_collapse
    Chmod 760
    Staff Member Mod

    Joined:
    Nov 29, 2002
    Messages:
    9,535
    Likes Received:
    13
    dscalfan likes this.
  3. atkinsonde

    atkinsonde
    uix_expand uix_collapse
    Registered

    Joined:
    Nov 12, 2010
    Messages:
    1
    Likes Received:
    0
    RoadKingRick - This is a neat trick. Every once in a while the VNC server goes down, just as you say, and I am permanently off site (I run daily display monitor updates for the place I used to work) and so would have to call the teck to go and reboot!! I appreciate you taking the time to post this.
    - David
     
  4. Giaguara

    Giaguara
    uix_expand uix_collapse
    Chmod 760
    Staff Member Mod

    Joined:
    Nov 29, 2002
    Messages:
    9,535
    Likes Received:
    13
    And that Apple KB is worth bookmarking for everyone who needs to remote control a server or wants to remote log in or control their (client) system remotely.

    The use of kickstart to restart ARD or VNC services on the remote Mac system isn't limited to Mac OS X Server, it also works with the clients, as long as remote login is enabled. It has saved me countless steps...
     
  5. eli5

    eli5
    uix_expand uix_collapse
    Registered

    Joined:
    Mar 28, 2018
    Messages:
    1
    Likes Received:
    0
    Almost 9yrs later and this thread is still giving!

    Just registered to say a massive thank you.
     

Share This Page