[CentOS] vncviewer via gateway option question

Filipe Brandenburger filbranden at gmail.com
Tue Jul 15 15:31:57 UTC 2008


On Tue, Jul 15, 2008 at 10:36, Robert Moskowitz <rgm at htt-consult.com> wrote:
>>> VNC_VIA_CMD=/usr/bin/ssh -p 7722 -f -L "$L":"$H":"$R" "$G" sleep 20
>>
>> You could actually do this a little bit easier, by defining a user ssh
>> config file in ~/.ssh
>
> This simplified my ssh commands, not having to include the -p ____

Actually that will be the default for VNC_VIA_CMD, so if you don't
need to specify the port number you don't need to include that
variable specification in your .bashrc/.bash_profile.

> vncviewer gate.foo.com:5902 -via gate.foo.com

Actually it seems to me you are specifying a port number after the
server name, when it should in fact be a *display* number.

When you start the vncserver, you specify which display you want it to
bind, or it will tell you which one it used. That is the number you
have to use on your vncviewer command.

Probably something like:

$ vncviewer gate.foo.com:2 -via gate.foo.com

The 5599 port is probably the local port chosen by the -via option, it
will probably look up a free port in that range.

Let us know how that works for you.

HTH,
Filipe



More information about the CentOS mailing list