Enabling VNC

I have an OS X Server (10.4) That i have access to via the server admin tools and ssh. I want to enable VNC on it, but I am not on location with the machine. Is there a way to do it remotely?

thanks
shannon

Posted on Aug 13, 2005 12:31 PM

Reply
9 replies

Aug 13, 2005 4:11 PM in response to Shannon McMahon

You can do it via kickstart, the command line agent to control ARD.

Something like this (believe it or not) should get you started (note is this one long line):

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart -configure -activate -access -on -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw <your VNC Password> - restart -agent



That should configure ARD to activate, allowing access and enabling VNC access using <your VNC Password>.

There are a myriad of other options, but they're probably best set via the GUi once you get past the initial login.

Oct 21, 2005 6:12 AM in response to Gerald Buckley

Doesnt work here with Chicken of the VNC and VNCThing. I tried it on different machines (Mac OS X Client and Server, latest versions.) I get an 'incorrect password' each time i try it. Works fine when I enable it manually in the prefspane though.

After inspection of /Library/Preferences/com.apple.VNCSettings.txt, i noticed that whenever I use the kickstart command to enable it, the password is stored in clear text, whereas when I use the GUI, the password is stored encrypted. Maybe this has something to do with it?

Oct 21, 2005 7:20 AM in response to Frederik Vande Rieviere

I found a workaround for this problem. It involves making a local VNC Settings using the gui (all it stores is the VNC password anyway) and copying this over to the server.

First of all enable apple remote desktop and vnc on your local machine and choose the vnc password. Save changes.

then, in the terminal :

local machine :

scp /Library/Preferences/com.apple.VNCSettings.txt root@yourserverip:/Library/Preferences/com.apple.VNCSettings.txt

(all in one line - you will be prompted for the servers root password)

remote machine :

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

(run as sudo or root - all in one line)

thought you'd like to know.

Oct 23, 2005 1:44 PM in response to Camelot

Hi There, This is what i have been looking for as well... but i think the server is running 10.3 (how do i find out by the way)... and this command gives me this back:

Unknown option: clientopts
Unknown option: setvnclegacy
Unknown option: vnclegacy
Unknown option: setvncpw
Unknown option: vncpw

How do i set up remote access to the box in 10.3?

Thanks

Dec 1, 2005 4:22 AM in response to Frederik Vande Rieviere

I found an answer to this today thanks to the Google Cache of this page

https://www.fmrib.ox.ac.uk/phpwiki/index.php?pagename=Mac%20Server%20FAQ

For example, using the supplied perl code, "password" encodes as "6755221DFCC7B786FF1C39567390ADCA".

Since "kickstart" itself is written in perl, it would be nice if this encoding was done automatically.

-chuck


What about VNC connections to ARD?
sudo ./kickstart -configure -users admin -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw password
Will configure vnc access for user admin with password password. As pointed out by Ben Low, the password you give here has to be 'encrypted' by truncation and XORing with a fixed key (1734516E8BA8C5E2FF1C39567390ADCA). This can be generated with the following:
perl -nwe 'BEGIN { @k = unpack "C*", pack "H*", "1734516E8BA8C5E2FF1C39567390ADCA"}; \
chomp; s/^(.{8}).*/$1/; @p = unpack "C*", $_; foreach (@k) { printf "%02X", $_ ^ (shift @p || 0) }; print "\n"'

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Enabling VNC

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.