Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

My Adventures in Runge Land

Simple, Free, Open Source UltraVNC Wrapper Supporting Windows and Mac OSX
Post Reply
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

My Adventures in Runge Land

Post by Rat »

Recently I needed a portable VNC solution for Linux and Windows via a repeater. After a few false starts I found myself playing around with Karl Runge's X11VNC server, SSVNC client and the Perl repeater script. Like all of Karl's stuff its all very tight and stable code, (and dense!).

The X11VNC server has a large, (enormous!) number of options and runs on Linux. The SSVNC client runs on both Linux, Windows and MacOS and is completely portable. It also features a large number of options including running through an encrypted SSH connection and the Perl repeater.

My results to date are summarised below and I think that for anyone looking for a cross-platform replacement for TeamViewer or ChunkVNC then this is a pretty good approach. It should also be possible to produce a cross-platform single-click solution just like ChunkVNC using these packages.

If anyone else has some experience and information to add to this discussion it would be very welcome.


TESTING NOTES

ULTRAVNC_REPEATER.PL
Command Line: /home/user/public_html/cgi-bin/ultravnc_repeater.pl -L BG -r -C -c 5909 -s 5509 -l test -p test
References: https://forum.ultravnc.net/viewtopic.php?f=50&t=18106

X11VNC SERVER
Linux Installation:
Step 1. Install X11VNC Server by executing: "apt-get install x11vnc", (Note: this will install an older version)
Step 2. Download the latest *nix binary.
Step 3. Copy this binary over the top of the existing "/usr/bin/x11vnc" binary, (installed in Step 1).
Command Lines:
x11vnc -tightfilexfer -connect repeater=ID:123456+myrepeater.com:5509
x11vnc -tightfilexfer -loop -forever -ncache -ncache_rc -connect repeater=ID:123456+myrepeater.com:5509
x11vnc -ultrafilexfer -connect repeater=ID:123456+myrepeater.com:5509
x11vnc -ultrafilexfer -loop -forever -ncache -ncache_rc -connect repeater=ID:123456+myrepeater.com:5509
References:
http://www.karlrunge.com/x11vnc/
http://www.karlrunge.com/x11vnc/x11vnc_opts.html
http://x11vnc.sourceforge.net/dev/x11vn ... i686-Linux


SSVNC CLIENT
VNC Host:Display myrepeater.com:5909
Proxy/Gateway repeater://myrepeater.com:5909+ID:123456
References: http://www.karlrunge.com/x11vnc/ssvnc.html

ULTRAVNC CLIENT
VNC Server ID:123456
Proxy/Repeater myrepeater.com:5909
References: http://www.uvnc.com/addons/repeater.html


UNRESOLVED ISSUES
1. The X11VNC -ncache option doesn't work with the SSVNC client.
2. The X11VNC -forever option won't allow a new client connection after the first client session has disconnected. (Currently I run a background Cron job to restart the server when its not running. This is in some ways a better solution anyway.)
3. The X11VNC -ncache option produces a large visible off-screen cache which may be confusing to users with the UltraVNC client
Last edited by Rat on 2011-07-29 06:50, edited 1 time in total.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: My Adventures in Runge Land

Post by B »

Thanks for this, Rat. I had the same idea to use x11vnc in this fashion, but I hit some problems like your #2 and just stopped. x11vnc didn't seem quite as flexible as I had hoped. To me, persistently restarting the daemon seems kludgy and error prone.

My big hope had been to use its inherent repeater functionality to allow x11vnc to relay for VNC servers without UltraVNC repeater support (e.g. TightVNC, etc.).
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

Re: My Adventures in Runge Land

Post by Rat »

I've managed to get the X11VNC server running reliably supporting multiple concurrent client sessions by some fairly heroic measures... described below:

1. We run 8 concurrent instances of X11VNC on different IDs. This allows clients to choose a currently unused ID and connect.

2. Every minute we check if any of the X11VNC servers has stopped and if so we re-start it again.

3. The 8th X11VNC instance is killed and then restarted every 15 mins to ensure that at least one service is always available and not "hung" up somewhere.

4. Finally... We eventually run out of Shared Memory slots (perhaps orphaned when a client connects from an X11VNC server and it crashes, which currently happens every single time). Consequently we run the shm_clear.sh -y script every hour to restore all of the orphaned Shared memory slots back to the OS.

Like I said "Heroic Lengths !"... but at least it now runs reasonably reliably.

... Now I'd like to find a comand-line option to run the SSVNC client.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: My Adventures in Runge Land

Post by B »

That's so funny! When I was testing (struggling) with it myself, I had the thought of your Fairly Heroic Measure(TM) #1 (running multiple instances) but I dismissed it because it seemed so darned unwieldy (especially for the pseudo-repeater functionality I had in mind).

Um, what do you mean by "a command line option to run the SSVNC client"? DO you mean a command line option FOR X11VNC? Because of course SSVNC itself can be run from the command line with a Start command...
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

Re: My Adventures in Runge Land

Post by Rat »

Um, what do you mean by "a command line option to run the SSVNC client"? DO you mean a command line option FOR X11VNC? Because of course SSVNC itself can be run from the command line with a Start command...
I wanted to be able to launch the SSVNC Windows client from the commandline together with the appropriate connection arguments... Couldn't find any doco to show how to do it.

In any case we eventually gave up on X11VNC, (even after we recompiled for our target system it was still far too flakey to use... a work in progress I guess)

We've had a lot more success using FreeNX, which is damn fast and also cross-platform. I would definitely recommend it.
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: My Adventures in Runge Land

Post by B »

Oh don't make me drool. FreeNX has been at the top of my remote control wishlist forever. If there were a FreeNX server for Windows it would make ALL of our lives easier.

But as far as I know it's only available for serving X based systems. Please let me know if that's incorrect!
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

Re: My Adventures in Runge Land

Post by Rat »

No FreeNX server for Windows, (AFAIK), but FYI this is the approach we used to run it through a repeater: http://programs.rcrnet.net/ssh/ssh.html
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: My Adventures in Runge Land

Post by B »

By "it" you mean x11vnc, right? 'Cause as far as I know FreeNX already uses compressed SSH...
Rat
80
80
Posts: 182
Joined: 2004-11-01 02:11

Re: My Adventures in Runge Land

Post by Rat »

B wrote:By "it" you mean x11vnc, right? 'Cause as far as I know FreeNX already uses compressed SSH...
We used the SSH Repeater technique to connect the FreeNX client and server... Its a generally useful technique and could be used to repeat any service really...
B
800
800
Posts: 2338
Joined: 2009-09-09 14:05

Re: My Adventures in Runge Land

Post by B »

Yeah, I've been toying with the idea of doing some kind of SSH repeater as a workaround to the fact that most shared webhosts won't open any inbound ports to reach the UltraVNC repeater in Perl.

But I don't know that a free SSH account provider (and for some reason there appear to be dozens of them?) is really the best or most reliable way to do things.
Post Reply