2

I have multiple computers in my house and like to change the VNC listening ports on each to unique numbers as an added layer of protection.

In the past, when changing the VNC listening port on my two Macs, I've followed the following prior article:

 http://superuser.com/questions/148095/how-to-change-the-default-screen-sharing-vnc-port-number-on-mac-os-x

However, when I tried to following this article (after upgrading to El Capitan), SUDO will not permit me to Write / Save the file after making the requisite changes. It just says "ERROR WRITING".

I never had this problem before with Mountain Lion or Yosemite.

Your suggestions are greatly appreciate (please note that I am only a novice so please provide step by step instructions).

Thanks!

2
  • What were you doing with sudo when the error occurred? Sudo doesn't really do anything except for run another command, so it would be helpful to know what command "sudo" was trying to run. The text editor (vim / nano) or launchctl? (The "sudo" command helps with some permissions.) Also, the title of your question has a spelling error (s/Chance/Change/)
    – TOOGAM
    Oct 3 '15 at 13:10
  • This is entirely down to the new 'rootless' feature of El Capitan. su/sudo now no longer gives you permission to write files in the system directory. One option is to disable this feature; but this is not recommended. Oct 5 '15 at 12:40
4

The best way I've found so far for El Capitan is: https://superuser.com/a/714931/135611 whereby you change the port number for the vnc-server service by editing /etc/services (which is still allowed with rootless).

So: sudo nano /etc/services and change the vnc-server ports. Then restart vnc-server with:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.