Connecting to Mac OS X via VNC
In the entirety of my house, I happen to be the only Windows user (and an Avid one at that! Macintosh can suck my Windows 7 Orb!), but for some occasions I too wish I could use the Macintosh. For such things as the local web server, and in the future possibly making iPhone applications.
Now, I don’t like going downstairs to use the best non-laptop Macintosh. Its hooked up to a High Definition Projector system, and it is simply a burden to try to get anything code-wise with it done, without either sitting up close to the screen, or using Apple+ to make it larger, so, I did what any geek would attempt to do. Get Apple’s Screen Sharing system working with my Windows Box.
I have to be honest with you. It was a hassle and it was definitely NOT worth it. Regardless of client side settings, VNC was incredibly slow over the Local Network.
However, as some of you may wish to try this yourself, I’ve included the instructions after the break.
Hi all,
I actually registered on this forum just to post this solution. I hope it will make many others happy!
Motivation for going through these hoops:
I needed to access the desktop of an old OSX machine every now and then from a windows VNC client. Details of that machine are:
Dual G5 OSX 10.4 without monitor/keyboard.Important:
- Remote Desktop had never been enabled before on that machine.
- SSH access however was available.So how do you turn on Apple Remote Desktop / VNC Server on a machine where it never ran before? That part was easy to find on the net: SSH as an admin user onto the OSX machine. Then execute this command:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agent
Try to connect with your VNC client now. If it works, good, you're done. The above command takes care even of restarting the Remote Desktop Service when the computer is rebooted.
But if you're not so lucky (like I was) and the connection fails with a message like:
- "Server did not offer supported security type" (tightVNC)
- "No matching security types" (realVNC)
- "Incompatible Version" (UltraVNC)you're stuck. What happened in this case is that the VNC password has never been setup properly. Follow these simple steps while still logged in as admin user to set up a default password ("pass" in our case):
- Switch off RDP:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -stop- Go to the Preferences directory:
cd /Library/Preferences- edit the following files using vi (if you're not familiar with vi, be very careful to follow the instructions to the iota!):
sudo vi com.apple.RemoteManagement.plistPut the following lines into this file (hint: copy them from here rather than typing them). Instruction for vi newbies:
- copy the text below into your clipboard
- set focus to the ssh window
- press the 'i' key. This puts vi into text insert mode
- paste the text. If you're on windows/cygwin, click to top left of the cygwin ssh window -> Edit -> Paste
- press the 'Esc' key
- enter the keystrokes ':wq', colon tells vi you are about to enter a command, w is the command for write, q for quit.ARD_AllLocalUsers
LoadRemoteManagementMenuExtra
ScreenSharingReqPermEnabled
VNCLegacyConnectionsEnabled
- edit the file sudo vi com.apple.ScreenSharing.launchd
press the 'i' key and type enabled, hit return, 'Esc' and ':wq'- set the default VNC password to 'pass' by editing this file:
sudo vi com.apple.VNCSettings.txt
and copy/paste this string (the encoded password) into that file: 6755221D8BA8C5E2FF1C39567390ADCA- Now the files need to have their ownerships and access rights configured properly. Do this by executing the following commands after each other:
sudo chmod 644 com.apple.RemoteManagement.plist
sudo chown root:admin com.apple.RemoteManagement.plistsudo chmod 644 com.apple.ScreenSharing.launchd
sudo chown root:admin com.apple.ScreenSharing.launchdsudo chmod 400 com.apple.VNCSettings.txt
sudo chown root:wheel com.apple.VNCSettings.txtNow stop and start the Remote Desktop Server, or reboot the machine:
To just restart the Remote Desktop first stop it:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -stopThen restart it:
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users admin -privs -all -restart -agentor, alternatively, reboot the server:
sudo shutdown -r now
Connect to the server and enter your password we set to "pass" above. Set the password to something else by opening the System Preferences -> Sharing -> Apple Remote Desktop -> Access Privileges and set the password in the "VNC viewers may control the screen with password:" to something else.
:apple:ED
Hope this helped!
Cheers
Balt Indermuehle
(taken from: http://forums.macrumors.com/archive/index.php/t-380251.html )
Calendar
Archive
- July 2010 (1)
- June 2010 (1)
- May 2010 (3)
- April 2010 (9)
- March 2010 (10)
- February 2010 (7)
- January 2010 (9)
- December 2009 (9)
- November 2009 (22)
- October 2009 (8)
- September 2009 (11)
- August 2009 (1)
- July 2009 (2)
- May 2009 (1)
- March 2009 (5)
- February 2009 (9)
- January 2009 (2)
- November 2008 (4)
- October 2008 (4)
- September 2008 (2)
- August 2008 (1)
- June 2008 (1)
- May 2008 (5)
- April 2008 (2)
- March 2008 (3)
- February 2008 (12)
- January 2008 (16)
