Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-14-2010, 01:13 PM   #1
LQ Newbie
Registered: Jul 2010
Posts: 3

Rep: Reputation: 0
Question Reverse VNC connection to :0.1 on port 6900

Hello all,

I have a RHEL5 box with dual-heads (X displays :0.0 and :0.1). I have the X11 vnc module loaded properly in xorg.conf and it's serving both displays out on port 5900 and 6900 respectively. I want to be able to "send" either screen to another machine running vncviewer -listen, but I can only manage to send the primary display.

I'm using, for example: vncconfig -connect remoteviewer:5500 to initiate the reverse connection, which (understandably) makes the primary display appear on the remote listening display. However, I would expect that vncconfig -display :0.1 -connect remoteviewer:5500 would send the secondary display, but that doesn't happen, I get the primary display again.

I don't see a way to manually specify the local port to tell the remote viewer to connect to, am I missing something? How do I tell the remote listening viewer to connect to port 6900 instead of 5900?


Last edited by S'pht'Kr; 07-14-2010 at 02:00 PM. Reason: made code snippets inline
Old 07-15-2010, 10:42 AM   #2
LQ Newbie
Registered: Jan 2010
Posts: 9

Rep: Reputation: 2
ssh tunnel?

Not a vnc pro, and if you hear from one, you should listen to him, but if you want a program on machine A that insists on using port A_1 to talk to port port B_1 on machine B, you can try using an ssh tunnel maybe?
Old 07-15-2010, 01:19 PM   #3
LQ Newbie
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks necro351--as it happens I considered that, and in doing so I realized that part of my description of the problem was a bit naive, so I'll correct it here:

I came to realize that using the "reverse" connection this way actually does all the communication over the reverse connection (e.g. over port 5500), and in fact doesn't make a connection back to 5900 or 6900 at all. So unfortunately it's more a question of convincing the VNC server to send the correct (secondary) display out over the outgoing port 5500 connection itself.

Nevertheless, I would have thought that vncconfig -display :0.1 -connect remoteviewerhost:5500 would have accomplished this, and it doesn't. So, still the same problem: how to get VNC server to send display :0.1 to the listening client?
Old 07-23-2010, 04:34 PM   #4
LQ Newbie
Registered: Jul 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Another observation--it's also not possible to do: vncconfig -display :0.1 -disconnect (well, you can, but it won't disconnect the secondary screen, it will disconnect anyone connected to the primary screen). So I don't see a way to force-disconnect a client connected to the secondary screen. Interesting.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse Tunneling / Reverse port forwarding in SSH dynamics Linux - Networking 5 02-07-2017 08:19 AM
VNC displays 'terminal window' that can't be closed after VNC connection to CentOS Hispacific Red Hat 1 10-15-2010 04:44 PM
Help with VNC - reverse connection. musther Linux - Software 0 01-20-2009 05:32 PM
How do I do a reverse connection with VNC? jeff_powell Linux - Desktop 1 08-16-2007 05:41 PM
Reverse VNC opens invisible session? Jmanfoo Linux - Networking 1 08-06-2007 12:14 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration