Is there any way to change the default vnc server port on a Mac. For the latest mac os version 10.7 Lion. The built in screen sharing, vnc server, is set to the default port of 5900. Would there be a plist hack for this by any chance?
Change Mac OS 10.7 Lion VNC Server listening port
9.6k Views Asked by AudioBubble At
3
There are 3 best solutions below
1

Edit the server's plist file by opening the file below /System/Library/LaunchDaemons/com.apple.screensharing.plist
in an editor.
Edit the line that reads <string>vnc-server</string>
to <string>1234</string>
where 1234
is the port number you wish to use.
After saving the file, turn Screen Sharing off and then on again .
Ok. I spent a significant amount of time on this one myself. Short answer, it's not possible to change the default listening port of the built in VNC server on OSX Lion (except by possibly modifying the /private/etc/services file to change the rfb service to listen to something other than 5900 for TCP/UDP).
If that doesn't work, you can install the beta version of the Vine VNC server (http://www.testplant.com/support/downloads/vine/), have it listen on whatever port you want, and then connect to it with whatever free VNC client you wish (most recommend Chicken of the VNC http://sourceforge.net/projects/cotvnc/).