Remotely enable VNC on OS 10.5 (Leopard) with SSH

Leopard Logo If you find yourself needing to get remote VNC access to your Apple computer running Leopard, you can do it remotely as long as you have an SSH connection to the machine. This is especially helpful because the default configuration for Apple’s remote desktop only allows you to connect from another Mac. You need to set a generic VNC password if you want to connect via a VNC client running in Linux or Windows. Here’s how.

  1. Connect to the remote machine via SSH.
  2. Enter the following command, as all one line:
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -activate -access -on -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw [your password] -restart -agent
  3. This will set the remote Mac to allow legacy VNC connections from non-Macs and allow you to use the password you chose with the -vncpw option (note there should be no brackets around your actual password) to connect from any VNC client.
  4. I have found that often you will also need to kill the AppleVNCServer process after running this command before you can connect. Just type killall AppleVNCServer and it should let you connect. You can also find the PID through the top command, then type kill <process #>.

I originally found this solution in an Apple forum thread that has an interesting discussion about the subject.

StackOverflow

Sponsored Links

Leave A Reply

Comments

marc (Apr 30, 2009)

works fine for me.

this saves my ass – otherwise i had to drive 80km to our company to reanable screensharing to remotly setup our mac – THANKS for this tip