Xvnc and Cygwin32

Vesa Harju vharju "at" sci.fi
Sun, 22 Mar 1998 14:41:32 +0000

>From: Edward Avis <EPA "at" datcon.co.uk>

> The point is, it should be possible to port Xvnc, the VNC server for X, to
> Cygwin32.  Then in combination with the VNC viewer for Windows, we would
> have a free X server for Windows.  I know I'm not the only person who
> thinks this would be a good idea - but I'm no expert on X, Cygwin32, or
> VNC.  I hope there are other people out there who would be willing to have
> a go, since many would like a free Windows-based X server.
> (Myself, I've done the opposite port - ported the
> VNC viewer for X to Cygwin32 - but I'm a bit stumped about the server.)

I have also briefly looked into building Xvnc on WinNT. My approach was to
MSVC++ as the compiler, but the issues are the same as with gcc/Cygwin32.

What I found out was that Xvnc seems to be based on an older version of X11
(perhaps R6?). R6 supports NT 3.1, R6.1 supports NT 3.5 and R6.3 supports NT
The forthcoming R6.4 will support NT 3.51 (and I guess also 4.0).
I am not sure at which point WinNT started to be supported also on the
server side --
the earlier releases only support the client side.

The Install.txt file for R6.3 says the following about WinNT:

> 2.6.7. Microsoft Windows NT
> All of the base libraries are supported, including multi-threading in
> Xlib and Xt, but some of the more complicated applications, specifically
> xterm and xdm, are not supported.
> There are also some other rough edges in the implementation, such as
> lack of support for non-socket file descriptors as Xt alternate inputs
> and not using the registry for configurable parameters like the system
> filenames and search paths.
> The Xnest server has been made to run on NT.  It requires a real X
> server for output still.

What I did was, I
- copied over all the files in R6.3 which seemed to be needed by Xvnc
- made modified versions of the R6.3 Win32 configuration files
- made vncxmkmf into an ugly vncxmkmf.bat with hardcoded path information
- added the following lines from the original Xvnc dix/property.c to the
R6.3 copy.
  (Somehow I got the idea that they were needed although dix stands for

    /* Addition for RFB X server */
    if (pWin->parent == NullWindow) {
 extern void rfbRootPropertyChange();

What still would need to be done is at least
- make Xvnc use the R6.3 portability wrappers for network I/O instead of
  the native system calls. (I did some quick and dirty
  "#ifdef WIN32" changes just to get the files through the compiler.)
- some internal function calls have changed between 6.? and 6.3. Fixing the
  calls might be the biggest problem, as it requires more detailed
  of the X server internals. I have not tried to do this.
- I probably missed some Xvnc changes in the files I copied from X11R6.3.
- I have not even looked at the server startup script, which I am sure needs

You can see where my interest waned -- when it started to look more like

I am not sure if this was the right path to take. Maybe I should have tried
to find
out exactly which version of X11 Xvnc is based on and taken that as a
starting point...

Question for the people at ORL: Have you thought of updating to a newer
version of X11? This would make the porting job much easier, especially if
also changed Xvnc to use the wrapper network functions.
Maybe you are waiting for X11R6.4 to come out before updating?