LibVNCServer is a library that makes it easy to make a VNC server. All you do is provide a frame buffer and some I/O functions, and call a function each time the frame buffer changes. It supports all encodings known, including tight, zlib, ZRLE, and cursor encodings.
LibVNCServer also includes the HTTP server from Xvnc, so you can start a java viewer by surfing to http://my.vnc.server:5801 or similar. It includes a beta version of LibVNCClient, which makes it easy to make a VNC client. Also included is LinuxVNC, which is to the Linux console as WinVNC is to the Windows desktop.
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:
int main(int argc,char** argv)
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.
What's New in This Release: [ read full changelog ]
· It adds noVNC, an HTML5 VNC viewer as a connection option to the HTTP server.
· It adds a GTK+ VNC viewer example, support to build for Google Android, and complete IPv6 support in both LibVNCServer and LibVNCClient.