简体   繁体   English

更改Mac OS 10.7 Lion VNC服务器侦听端口

[英]Change Mac OS 10.7 Lion VNC Server listening port

Is there any way to change the default vnc server port on a Mac. 有没有办法更改Mac上的默认vnc服务器端口。 For the latest mac os version 10.7 Lion. 对于最新的mac os版本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? 内置的屏幕共享,vnc服务器,设置为默认端口5900.任何机会都会有一个plist hack吗?

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). 简而言之,无法在OSX Lion上更改内置VNC服务器的默认侦听端口(除非可能修改/ private / etc / services文件以更改rfb服务以侦听除TCP00之外的5900以外的其他内容)。

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/ ). 如果这不起作用,您可以安装测试版的Vine VNC服务器(http://www.testplant.com/support/downloads/vine/),让它监听您想要的任何端口,然后连接到它与您希望的任何免费VNC客户端(最推荐VNC的鸡http://sourceforge.net/projects/cotvnc/ )。

Edit the server's plist file by opening the file below /System/Library/LaunchDaemons/com.apple.screensharing.plist in an editor. 通过在编辑器中打开/System/Library/LaunchDaemons/com.apple.screensharing.plist下面的文件来编辑服务器的plist文件。

Edit the line that reads <string>vnc-server</string> to <string>1234</string> where 1234 is the port number you wish to use. <string>vnc-server</string>的行编辑为<string>1234</string> ,其中1234是您要使用的端口号。

After saving the file, turn Screen Sharing off and then on again . 保存文件后,关闭屏幕共享然后再打开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM