How do I start/restart RealVNC Enterprise Server for Mac via the command line?

6,781

Solution 1

got this feedback from RealVNC

A) Start Service-Mode VNC Server

sudo touch /etc/vnc/service/on

This will trigger the launch of the VNC Server launch daemon and user helper launch agent

B) Stop Service-Mode VNC Server

sudo rm /etc/vnc/service/on
sudo launchctl stop com.realvnc.vncserver
launchctl stop com.realvnc.vncserver_agent

C) Restart Service-Mode VNC Server

Same as A)

Reference:

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/launchctl.1.html

Solution 2

The article Start VNC from command line and connect to Mac from Windows VNC client recommends:

Step 1: -- set privs

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all

Step 2: -- Allow VNC clients

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes

Step 3: -- Set VNC password (change it at the end of the line (i.e. don't use supersecret))

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw supersecret

Step 4: -- Restart service

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console
Share:
6,781

Related videos on Youtube

Greg
Author by

Greg

Updated on September 18, 2022

Comments

  • Greg
    Greg almost 2 years

    How do I start/restart RealVNC Enterprise Server for Mac via the command line?

    Perhaps also how do I tell (via command line, whether RealVNC Enterprise Server is running or not)

  • Greg
    Greg over 12 years
    don't get a response on Mac Lion for this - I did note after posting a fall back may be to reboot remotely, but doesn't specifically address the question I posed I guess
  • janmoesen
    janmoesen over 12 years
    Isn't this about the built-in VNC server?