VNC X-Server (Xvnc) without background pixmaps

Goal

VNC protocol is much more eficient with clear pixmaps than with fancy ones. I've tried to find a way to deny my users such pixmaps in Xvnc and found this solution:

How to:

Suppose you have the Xvnc source (this was done for version 3.3.2 R3), would be better to compile it first (just to be sure itīs ok).

  • Edit the file .../Xvnc/programs/Xserver/dix/window.c
  • goto function MakeRootTile(
  • add the bzero call to clean the pixmap, in the last part of this function:
    ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
    
    from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb;
    to = back;
    
    for (i = 4; i > 0; i--, from++)
    	for (j = len; j > 0; j--)
    	    *to++ = *from;
    
       bzero((char *)back,128);          /***** this line was added *****/
    
       (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1,
    		    0, 0, 4, 4, 0, XYBitmap, (char *)back);
    
       FreeScratchGC(pGC);
    
    }
    
  • Save
  • Rebuild (and that's it)

andre@dei.isep.ipp.pt