Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Remotely Turning on Screen Sharing - Workaround

So I have been sandboxing my new Xserve and am trying to get my routines down for remote administration, backup and disaster recover, when I noticed the wonderful VNC connection provided by the Leopard Server installer disc completely drops out after initial setup. At least for me. I could be missing something, but I found a simple remote workaround for turning on Screen Sharing and getting back in with VNC. This may also help folks having problems with lack of ARD remote access after a recent debilitating update.

First you need to be able to log in via Terminal (SSH remains on and the port open after install). After log in, I tried to set VNC up through Apple Remote Desktop command line configurations, but it did not work well, and I think the two services are now separate. There appears to be no command line utility to work directly with the new Screen Sharing preferences. So I basically copied the Screen Sharing prefs from another machine running Leopard that already had it configured.

After turning ON Screen Sharing (and turning OFF Remote Management) in Leopard client, the following files were updated in /Library/Preferences:

-rw-r--r-- 1 root admin com.apple.RemoteManagement.plist
-rw-r--r-- 1 root admin com.apple.ScreenSharing.launchd
-r-------- 1 root wheel com.apple.VNCSettings.txt

com.apple.RemoteManagement.plist is just a couple of prefs:
<key>ScreenSharingReqPermEnabled</key>
<false/>
<key>VNCLegacyConnectionsEnabled</key>
<true/>
(may contain other prefs if ARD has been configured already)

com.apple.ScreenSharing.launchd just tells the AppleVNCServer daemon to launch at login. Should just contain word 'enabled'.

com.apple.VNCSettings.txt is the encrypted password for controlling the GUI through VNC.


Copy these 3 files over to /Library/Preferences on the server. I used Transmit through SFTP (SSH) and had to make the VNCSettings file readable by all first, but you can use 'scp' too. Make sure to set the permissions and ownership the same as above for the copied files. 'scp' handles these things on transfer, too.

I rebooted the server with 'sudo reboot' however you could probably just load the com.apple.RFBRegisterMDNS_ScreenSharing.plist file from /System/Library/LaunchDaemons and launch the VNCServer directly via 'launchctl'. After reboot I used Server Admin to set port 5900 (VNC) open on the firewall, but you can also just ssh 'forward tunnel' the 5900 port to your local machine and not mess with the firewall.

Anyhow, it worked for me. Screen Sharing was enabled and the copied password even worked - identical to the Leopard client.


Larry

Xserve 2x2GHz Dual-Core Intel Xeon 5100, Mac OS X (10.5.1)

Posted on Dec 28, 2007 7:06 AM

Reply
4 replies

Dec 28, 2007 7:32 AM in response to Larry_S

Also, before copying files to server make sure ARD is turned off and will not start at boot:

(From running '/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ kickstart -help')

- Stop the Remote Management service and deactivate it so it will not start after the next computer restart.

*/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -deactivate -stop*

More info on ARD command line options in http://images.apple.com/server/docs/ARD3.2_AdminGuide.pdf

Jan 22, 2008 11:09 AM in response to Larry_S

I have just run into this problem as well, except I am simply trying to turn on Screen Sharing remotely so I can access the server through Server Admin. There is no way to access the System Preferences of a machine remotely, which is a huge oversight in my mind. However, even after downloading the Command Line Admin PDF, it appears that there is no way to change sharing settings with the sudo systemsetup commands. An inspection of the MAN file confirms there seems to be absolutely no way to turn on screen sharing without a hack or physical access to the server.

I'm heading down to the ISP in a bit...

Apple, you need to fix this.

Remotely Turning on Screen Sharing - Workaround

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