LibVNCServer


News

2003/02/09 Version 0.5 is out! Features include autoconf based configure, rpm package (YMMV), cleanup of directory structure, NEW x11vnc! ZRLE encoding! HTTP tunnelling through LibVNCServer's HTTP support! Many bug fixes!

2002/07/28 Version 0.4 is out! Biggest feature: NewFB encoding. Quite a few bugfixes also (Thanks to all!).

2001/12/14 A new version of rdesktop+vnc is available! (Includes support for other platforms keyboard mapping with plain rdesktop!)

2001/10/23 Added a link to my homepage at the end.

2001/10/18 I released the rdp2vnc extensions as well as patches for general keyboard handling, working inside Xvnc and process_text2 (the famous "font:" error) to rdesktop. Please find it on the download page.

2001/10/13 A snapshot of LibVNCServer and RDP2VNC is now available. You can also download the diff against rdesktop-1.1.0. rdp2vnc also contains the patches for keyboards other than PC keyboards, and you can specify "-k fr" again.


Introduction

If you don't know VNC, have a look at the original VNC or at Tridia VNC, who also have commercial support for it.

Now that you know what it is, maybe you want to make your own server. If this is not the case, you can ignore the rest of this page an go on surfing the internet.

Now that you want to make a VNC server, that is, a server which speaks the RFB protocol, you can download this library from sourceforge.

The simplest server looks like this:

#include "rfb.h"

int main(int argc,char** argv)
{
  rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4);
  server->frameBuffer=malloc(400*300*4);
  rfbInitServer(server);
  rfbRunEventLoop(server,-1,FALSE);
  return(0);
}

This sample creates a 400x300 frame buffer in true colour. There are 4 bytes per pixel, because 3 (which are only used instead of all 4) is such an odd number. Then the server is initialized and a blocking event loop is started.

Of course, this program only shows rubbish (whatever is in the frame buffer you malloc'd), but it proves that writing a server can be very easy.

For details (especially if you want to write a real server) look into the provided examples, pnmshow.c and example.c, and into the README. You find there documentation for much more complicated servers.

Serious comments, suggestions, pizzas, etc. go to me (delete the RuBBISH).

Here are some links:

LibVNCServer is an adapted OSXvnc-server by Dan McGuirk, which is in turn an adapted original Xvnc.

I use it to to drive a Windows Terminal Server (RDP) to RFB converter with it. Much work has been done to make rdesktop a good X client to Windows Terminal Services (both NT and 2000, see rdesktop patches). Previous work was done by Tim Edmonds who has set up such a converter named vdesktop including a single client server and a multi client server, rdp2vnc. Unfortunately he used the example code from rfbcounter, which can encode only RRE, which is not a good compression.

If you want to know about other of my projects, look at my homepage.


Project hosted on the fantastic SourceForge Logo
Last modified: Sun Feb 09 06:27:38 MESZ 2003