Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

According to Wikipedia:

VNC by default uses TCP port 5900+N,[5][6] where N is the display number (usually :0 for a physical display). Several implementations also start a basic HTTP server on port 5800+N to provide a VNC viewer as a Java applet, allowing easy connection through any Java-enabled web browser. Different port assignments can be used as long as both client and server are configured accordingly.

My book says when you start vncserver for the first time (versus starting multiple instances) you use vncviewer host-ip:1

It refers to connecting to display number 1 and port 5901.

What happens if you connect to 5900 (Physical display), does this cause problems? When they say physical display, do they main your monitor? If so what happens if you connect to it? I realize you can change these ports anyway, but in the context of Wikipedia with default configuration, let's say you connect to vncviewer host-ip:0?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In general that simply means that it shows the display as it is - most Windows VNC implementations seem to use port 5900, and the port can be an arbitrary number - you just have to match up the port that the VNC server is set to to the client.

There's a bit more to it though - Linux allows you to have virtual displays, and you can connect a separate X session via VNC. Since each VNC session has to have its own session, it's a convention to simplify things - you can connect port 5900 to a virtual display and it will work. It's just simpler to remember the default port + display number.

share|improve this answer
    
So if I connect to display :0 I'll se what's being displayed on my monitor versus :1 and up being a completely different x session? –  rubixibuc Feb 19 '12 at 4:38
    
if you set the vnc server to connect to display :0 on port 5900, then yes. You can however set the port to be anything at all, or connect to any arbitrary display on an arbitrary port –  Journeyman Geek Feb 19 '12 at 5:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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