x11vnc recompiled to be as widely compatible as possible…



As I said in the earlier posts, I was essentially looking for a “Single click” solution for linux VNC remote desktop support. A solution that doesn’t require the remote support client to change firewall settings, install software, etc. What I’ve settled on is closer to a single cut and paste solution, which is fairly simple. The next problem I had was compatibility of the x11vnc binary. The first problem was the xfixes library not being a part of Mandrake 10.0, then xdamage, xrender, xrandr – none of those libraries were found… so, I started looking at the compile options for x11vnc (and the optimization, because I wanted a smaller file size.)


The first binary I got was about 2 Mb, which was a bit large (the windows version of UltraVNC single click is about 160 kb..) Finally, I stripped out a bit and have managed to get it down to a still large 1.3 Mb…. admittedly, I don’t plan on suggesting this to anyone on dial up, it’s about a 3-5 second download on our cable connection, and I figure maybe as much as 10 seconds or so on some slower DSL lines. (Still I’d like to optimize further if possible.)

Anyway, here are the options I’ve passed to it.


env CPPFLAGS="-DWIREFRAME=1 -DNOPW=1 -DSCROLL_COPYRECT=1 -DXDAMAGE=0 -DREMOTE_CONTROL=0 -DFILEXFER=0 -DSMALL_FOOTPRINT=3" ./configure --without-xrandr --without-xfixes --without-xinerama --without-xdamage --without-pthread --without-filetransfer --without-xtrap --without-xrecord && make

If I took out the gui entirely, I lost the little “accept” box that pops up when the connection is made, which I really wanted to keep. ultimately, I quit using the _other_ gui because it required wish which was not reliably installed on the systems I tested. (If you look at the switches for x11vnc one is -gui which I set to icon,ez in my initial testing which gave a little icon sized window hovering over the desktop showing that it was active. However, as I noted, it required wish, and that didn’t appear on a few systems I tested, and it was a bit buggy and crashed out without crashing out the vnc session.)

Anyway, if there are any suggestions for how to squeeze the binary even smaller without giving up compression algorithms… that would be helpful. What would really be nice is to be able to “hard code” the machine to connect to, as well as the timeout, so you wouldn’t have to pass those in the download script.

Anyway, with the build options above, I’ve tested on a pretty good variety of livecds that I’ve got as well as linux installs. I’ve tested successfully on a few different Knoppix versions (4 being the most recent), knoppix std 0.1, dsl, kubuntu dapper (and ubuntu/xubuntu dapper), Mandriva 2006, Mandrake 10.0, livecd based on Mandrake 9.1 (which had to use curl and prompted that script modification (I think that was the one lacking wish for the ez gui…), linspire 5, pclinuxos preview 8 (I doubt that’s the most current, haven’t looked though.), MEPISLite-3.3.1, morphix .35….

The only unsuccessful so far was a Mepis cd from June 2003 and that seemed to be more a firewalling issue with that machine (because I couldn’t get several other things to work like sshd)…. so it seems to be fairly reliably able to run on x86 linuxes from at least the last 3 years. That’s about as wide compatibility as I probably could hope for.

Of course, the obvious note is that it would have to be an x86 based system, not x86_64, or ppc…. (unless you specially compiled the binary for those architectures. Which currently I don’t have a good way to do unless I boot up kubuntu x86_64 in qemu and then build it there?) I really like the fact that it seems as effective with a live cd as it does with a desktop, so if I want to test out a live cd on a box in the back room, just wget and sh the script and I can sit at my usual desk and take a look at the livecd without disrupting the desktop pc. (Of course, there’s qemu for that too, but that’s another story.)

   Send article as PDF   

Similar Posts