Ubuntu – How to change the default port of Remote Desktop (VNC)

remote desktopvnc

Let's say I went to:

 System > Preferences > Remote Desktop

And enable Remote Desktop. Now let's say I have another machine on the network that is also running a VNC server. I want to VNC into my network from the outside, but I need each VNC server to be running on different ports.

How can I change Ubuntu's default port for Remote Desktop/VNC?

Best Answer

Using a little information from the (now dead) Dave's Tech Blog, you can adjust the port setting by going into gconf-editor.

Under desktop > gnome > remote access there is a key that says alternative_port and is set to 5900. Just change the value to what you need. Then enable the key use_alternative_port.

The other option is if your router/firewall support uPnp you can adjust Vino to make the adjustment in the same section of gconf-editor.

Related Question