Linux - SoftwareThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Thanks!
Last edited by S'pht'Kr; 07-14-2010 at 01:00 PM.
Reason: made code snippets inline
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?
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.