[svlug] SuSE-9.1 and vnc
Scott.Hess at gmail.com
Tue Sep 28 12:21:11 PDT 2004
On Tue, 28 Sep 2004 12:06:27 -0700 (PDT), Roland Krause
<rokrau at yahoo.com> wrote:
> Who started the vncserver on port 5900, the X-server?
I doubt there is a vncserver on VNC port :0 (TCP port 5900). I think
there is an X11 server on port :0 (TCP port 6000), which means that
the vncserver can't start another X11 server on port :0. So you need
to start your vnc server on port :1, which won't conflict with the
existing X11 server.
Hmm. In the interests of saving an email round-trip, I'll go deeper...
X servers provide a port for clients to connect to them on. When
local to the machine, these ports are referred to like :0, :1, etc
(remotely you would use hostname:0, hostname:1, etc). You can only
run a single X server on a given X port (though you could have
multiple X ports mapping to the same X server).
vncserver starts up Xvnc, which is an X server which also listens for
VNC clients on a VNC port. It uses a similar naming scheme to X for
the VNC ports, and expects the X port to be the same as the VNC port.
So you can run a VNC server which accepts X clients on X port :1, and
VNC clients on VNC port :1.
So, if you have a standard X server running on your computer's console
(on the monitor, if there is one connected), it will probably be at X
port :0. If you try to start a VNC server at :0, while VNC port :0 is
open, X port :0 is already in use, so it cannot start up. You simply
need to use a different port, like :1. There's no particular
advantage or disadvantage to using :1, or :2, or :17. You just tell
your VNC client to connect to hostname:17 (or enter 17 in the relevant
field). I've never seen a VNC client which didn't accept alternate
To verify this, do something like "ps awwwx | egrep X". I see a line like:
3777 ? SL 143:58 /usr/X11R6/bin/X :0 -auth /var/gdm/:0.Xauth vt7
so there's an X server running on port :0 on my box.
> Actually I want a vncserver running by default so I'd be happy to use
> the one that's started by default.
I don't believe most distributions startup VNC servers by default,
though it's certainly something that you could do. I think the VNC
distribution includes a sample rc script. But I think you should
probably get more comfortable with the manual process before embarking
down that road :-).
More information about the svlug