Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Depends on how you connect. If you just use the vncviewer, then all you need to open is 5901. If you configured VNCserver it could be 5900, and if you connect through a browser it is 5800. 5901 is usually the correct one for a linux box.
So if your vncserver is running desktop 1 tehn you need 5901. If it's desktop 2 then 5902 etc. Therefore if you have more than one VNC session running (e.g. different users) then you'll need to forward more ports.
So if your vncserver is running desktop 1 tehn you need 5901. If it's desktop 2 then 5902 etc. Therefore if you have more than one VNC session running (e.g. different users) then you'll need to forward more ports.
That is i ssh into my box, run vncserver and that command tells me the desktop number of the new session.
Since i only vnc from windows, i use the port forwarding in putty (ssh client) and hence have a secure VNC session.
Code:
[martin@*** ~]$ vncserver
New 'X' desktop is ***.net:2
Starting applications specified in /home/martin/.vnc/xstartup
Log file is /home/martin/.vnc/****.net:2.log
Above the :2 indicates display 2, hence port 5902
I'm not sure how to determine it for already running vnc sessions. sorry.
We recently started using SuSE - sles 9 and they have set up VNC as a xinetd service. It is tied to the user nobody, and will host lots of different users all on port 5900. I think I read a post on linuxmagazines web site on setting it up this way as well. We can only access port 5900 through our firewall, so this helped me bunches.
It works great, only downside, is that the session only lasts while connected. You can still start individual vnc servers if you need persistent connections.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.