FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-06-2008, 06:40 PM
"Robert P. J. Day"
 
Default vncserver, display numbers and port numbers

(i can see that i'm going to have to update my recipe for VNC real
soon now.)

playing around with invoking multiple instances of vncserver, and
i'm starting to see the relationship between port numbers and display
numbers, and how vncviewer connects.

if you start invoking multiple instances of vncserver, you'll get
the predictable sequence of display numbers and respective port
numbers:

:1 5901
:2 5902

now, say you try to start on a new display number, such as:

$ vncserver :4

what you get is the association:

:4 5904

as in, vncserver clearly tries to match the display number with the
corresponding port number, if it's still available: so let's push it
a bit further:

$ vncserver :5 -rfbport 5906 (:5 -> port 5906)

and then:

$ vncserver :6
A VNC server is already running as :6
$

hmmmm ... not really, but you can see how vncserver thinks. port 5906
is currently listening; therefore, display :6 is assumed to be
running, even though you *clearly* specified display :5 above.

finally, you can use vncviewer to connect to a particular vncserver
by either display number or port number, as in, both of the following
have the same effect based on the above (even though it's not
documented that way):

$ vncviewer <remote>:2
$ vncviewer <remote>:5902

however, if the display number doesn't "match" the port number, the
display number will always be mapped to the corresponding port number
automatically. so, based on the above:

$ vncviewer <remote>:5 [connection refused]
$ vncviewer <remote>:6 [good since it maps to port 5906]

i guess it all makes sense once you see it happening.

rday
--

================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page: http://crashcourse.ca
Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-07-2008, 02:39 PM
"William Hooper"
 
Default vncserver, display numbers and port numbers

On Jan 6, 2008 2:40 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
[snip]
> hmmmm ... not really, but you can see how vncserver thinks. port 5906
> is currently listening; therefore, display :6 is assumed to be
> running, even though you *clearly* specified display :5 above.

The vncserver command is just a perl script. If you take a look at
the script itself you will see that specifying ":5" is just used to
calculate the port number, it has no significance beyond that. Since
you manually specified a port number, the ":5" is basically ignored.

I take part of that back. It does appear to also be used for the
naming of the log file.

--
William Hooper

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 01-07-2008, 02:45 PM
"Robert P. J. Day"
 
Default vncserver, display numbers and port numbers

On Mon, 7 Jan 2008, William Hooper wrote:

> On Jan 6, 2008 2:40 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> [snip]
> > hmmmm ... not really, but you can see how vncserver thinks. port 5906
> > is currently listening; therefore, display :6 is assumed to be
> > running, even though you *clearly* specified display :5 above.
>
> The vncserver command is just a perl script. If you take a look at
> the script itself you will see that specifying ":5" is just used to
> calculate the port number, it has no significance beyond that. Since
> you manually specified a port number, the ":5" is basically ignored.
>
> I take part of that back. It does appear to also be used for the
> naming of the log file.

and (from memory), it's also used for the numbering of the associated
58xx and 60xx ports, so that the trifecta of 58xx/59xx/60xx port
numbers don't need to match in those last two digits. or so i recall.
i can verify that later.

rday
--

================================================== ======================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page: http://crashcourse.ca
Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
================================================== ======================

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org