Change default port for remote desktop sharing 12.04 LTS

15,171

Solution 1

The comment I left above for configuration editor does not work with 12.04. After some more research I found that you can do this with gsettings instead with the following commands:

gsettings set org.gnome.Vino alternative-port 1234
gsettings set org.gnome.Vino use-alternative-port true

where 1234 is the new port you wish to use (typically 5901+).

Remember to setup port forwarding on the wireless router as well. credit goes to: How can I change the port of Remote Desktop?

Solution 2

Actually you can port-forward the external port 5901 into the internal port 5900 > IP: x and external port 5902 into the internal port 5900 > IP: y, and so on.

It is much simpler because you must only configure one thing -- your router -- and you won't have to remember different TCP ports when you want to reach the various PCs from inside your LAN.

Share:
15,171

Related videos on Youtube

Fobos13
Author by

Fobos13

Updated on September 18, 2022

Comments

  • Fobos13
    Fobos13 over 1 year

    Basically I want to be able to access different computers remotely (all on Ubuntu 12.04 LTS) that are on the same wireless network. I've gotten this to work for one computer by forwarding port 5900 on my router, so I was thinking I could use forward port 5901 for my second computer. The problem is that I need to change the port that the second computer is listening on for remote desktop sharing (change default 5900 to 5901). Any ideas on how to do this? I am new to Ubuntu btw. Thanks.

    • Fobos13
      Fobos13 over 10 years
      I've found that if you go to the configuration editor (or you can use dconf editor), then you can use desktop -> gnome -> remote_access, and change alternative_port parameter to 5901 (or whatever you want). Now I'm seeing the problem when I use my VNC viewer "connection refused"