vnc port forwarding
Knute Johnson
groups at knutejohnson.com
Wed Nov 3 00:08:10 UTC 2021
Make sure you only have one instance of TightVNC running. I see two
ports in your post, 5901 and 6001. In the startup for TightVNC there
should be an option to set the port -rfbport:5900 (the documentation is
fragmented and sparse). Sometimes port numbers change with the display
number on systems that have virtual displays.
I usually use x11vnc just because that is the one I usually use. It
always uses port 5900. Your client software should be able to select
the port as well.
vncviewer
Section: TightVNC (1)
Updated: August 2006
Index Return to Main Contents
NAME
vncviewer - an X viewer client for VNC
SYNOPSIS
vncviewer [options] [host][:display]
vncviewer [options] [host][::port]
vncviewer [options] -listen [display]
vncviewer -help
Read more at: https://www.commandlinux.com/man-page/man1/vncviewer.1.html
Again, I would run ps -e | grep vnc to check to see how many VNC servers
are running.
On 11/2/21 18:42, Zahid Rahman wrote:
> I can see the issue.!!!!
> Thanks for your time and patients.
> I followed the instructions here .
> https://www.smarthomebeginner.com/setup-vnc-server-on-ubuntu-linux/
> <https://www.smarthomebeginner.com/setup-vnc-server-on-ubuntu-linux/>
>
> The vnc port always defaults to 5901.
>
> How can I get it to default to 5900 ?
>
>
>
>
> On Tue, 2 Nov 2021, 10:56 pm Zahid Rahman, <zahidr1000 at gmail.com
> <mailto:zahidr1000 at gmail.com>> wrote:
>
> 192.168.0.20:1 <http://192.168.0.20:1> this works local
>
> vnc viewer
>
> 51.77.xx.xx:1 this doesn't work. external ip
>
> On Tue, 2 Nov 2021, 10:48 pm Zahid Rahman, <zahidr1000 at gmail.com
> <mailto:zahidr1000 at gmail.com>> wrote:
>
> sudo lsof -i:5901
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> Xtightvnc 2686 ubuntu 3u IPv4 42834 0t0 TCP *:5901
> (LISTEN)
> Xtightvnc 2686 ubuntu 22u IPv4 275574 0t0 TCP
> ubuntu:5901->192.168.0.27:53498 <http://192.168.0.27:53498>
> (ESTABLISHED)
> ubuntu at ubuntu:~$
>
> On Tue, 2 Nov 2021, 10:35 pm Zahid Rahman, <zahidr1000 at gmail.com
> <mailto:zahidr1000 at gmail.com>> wrote:
>
> ubuntu at ubuntu:~$ ps -e | grep vnc
> 2686 ? 00:01:21 Xtightvnc
> ubuntu at ubuntu:~$ netstat -tulpn | grep LISTEN
> (Not all processes could be identified, non-owned process info
> will not be shown, you would have to be root to see it all.)
> tcp 0 0 127.0.0.1:8009 <http://127.0.0.1:8009>
> 0.0.0.0:* LISTEN 2813/java
> tcp 0 0 0.0.0.0:139 <http://0.0.0.0:139>
> 0.0.0.0:* LISTEN -
> tcp 0 0 0.0.0.0:5901 <http://0.0.0.0:5901>
> 0.0.0.0:* LISTEN 2686/Xtightvnc
> tcp 0 0 127.0.0.1:8080 <http://127.0.0.1:8080>
> 0.0.0.0:* LISTEN 2813/java
> tcp 0 0 0.0.0.0:6001 <http://0.0.0.0:6001>
> 0.0.0.0:* LISTEN 2686/Xtightvnc
> tcp 0 0 127.0.0.53:53 <http://127.0.0.53:53>
> 0.0.0.0:* LISTEN -
> tcp 0 0 0.0.0.0:22 <http://0.0.0.0:22>
> 0.0.0.0:* LISTEN -
> tcp 0 0 127.0.0.1:631 <http://127.0.0.1:631>
> 0.0.0.0:* LISTEN -
> tcp 0 0 127.0.0.1:54200
> <http://127.0.0.1:54200> 0.0.0.0:*
> LISTEN 2813/java
> tcp 0 0 127.0.0.1:5432 <http://127.0.0.1:5432>
> 0.0.0.0:* LISTEN -
> tcp 0 0 127.0.0.1:8443 <http://127.0.0.1:8443>
> 0.0.0.0:* LISTEN 2813/java
> tcp 0 0 0.0.0.0:445 <http://0.0.0.0:445>
> 0.0.0.0:* LISTEN -
> tcp 0 0 127.0.0.1:9990 <http://127.0.0.1:9990>
> 0.0.0.0:* LISTEN 2813/java
> tcp6 0 0 :::139 :::*
> LISTEN -
> tcp6 0 0 :::80 :::*
> LISTEN -
> tcp6 0 0 :::22 :::*
> LISTEN -
> tcp6 0 0 ::1:631 :::*
> LISTEN -
> tcp6 0 0 :::443 :::*
> LISTEN -
> tcp6 0 0 :::445 :::*
> LISTEN -
>
> On Tue, 2 Nov 2021, 9:53 pm Knute Johnson,
> <groups at knutejohnson.com <mailto:groups at knutejohnson.com>>
> wrote:
>
> On 11/2/21 12:10, Colin Law wrote:
>
> > Also *please* do as I asked earlier, and on the
> machine running vnc run
> > sudo lsof -i:5900
> >
> > Colin
> >
>
> Just so you don't think you are the only one, I don't
> think there is any
> VNC server running on his computer either .
>
> Zahid, this is what you should get:
>
> knute at knute-XPS-8700:~$ ps -e | grep vnc
> 2566 ? 00:00:00 x11vnc
>
> knute at knute-XPS-8700:~$ netstat -tulpn | grep LISTEN
> (Not all processes could be identified, non-owned
> process info
> will not be shown, you would have to be root to see
> it all.)
> tcp 0 0 127.0.0.53:53
> <http://127.0.0.53:53> 0.0.0.0:* LISTEN -
> tcp 0 0 0.0.0.0:22 <http://0.0.0.0:22>
> 0.0.0.0:* LISTEN -
> tcp 0 0 127.0.0.1:631
> <http://127.0.0.1:631> 0.0.0.0:* LISTEN -
> tcp 0 0 0.0.0.0:5900 <http://0.0.0.0:5900>
> 0.0.0.0:* LISTEN
> 2566/x11vnc
> tcp6 0 0 :::22 :::* LISTEN
> -
> tcp6 0 0 ::1:631 :::* LISTEN
> -
> tcp6 0 0 :::5900 :::* LISTEN
> 2566/x11vnc
>
> knute at knute-XPS-8700:~$ sudo lsof -i:5900
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> x11vnc 2566 knute 8u IPv4 34352 0t0 TCP
> *:5900 (LISTEN)
> x11vnc 2566 knute 9u IPv6 34353 0t0 TCP
> *:5900 (LISTEN)
>
>
> --
>
> Knute Johnson
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> <mailto:ubuntu-users at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>
>
>
--
Knute Johnson
More information about the ubuntu-users
mailing list