Compare commits

..

3 commits

Author SHA1 Message Date
Fedora Release Engineering
4eb77e46ad dist-git conversion 2010-07-29 18:06:27 +00:00
Adam Tkac
34b4cf5355 vnc has been retired in favor of tightvnc 2009-01-21 19:02:02 +00:00
Tomáš Mráz
4bc6843466 - rebuild with new openssl 2009-01-18 15:03:56 +00:00
47 changed files with 3 additions and 4329 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
vnc-4_1_3-unixsrc.tar.gz
vnc-4_1_2-unixsrc.tar.gz

View file

@ -1,60 +0,0 @@
LIB_DIR=$(top_srcdir)/../../common
BIN_DIR=$(top_srcdir)/..
RFB_LIBS=$(LIB_DIR)/rfb/librfb.la
noinst_LTLIBRARIES = libvnccommon.la
libvnccommon_la_SOURCES = vncExtInit.cc vncHooks.cc XserverDesktop.cc
libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \
-I$(BIN_DIR)/vncconfig -DGC_HAS_COMPOSITE_CLIP $(XVNC_CPPFLAGS) \
-I$(includedir)/pixman-1
bin_PROGRAMS = Xvnc
Xvnc_SOURCES = xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/fb/fbcmap_mi.c
nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h
Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \
-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(LIB_DIR) \
-I$(top_srcdir)/include -I$(includedir)/pixman-1
Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(RFB_LIBS) \
$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lX11
Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
libvnc_la_LTLIBRARIES = libvnc.la
libvnc_ladir = $(moduledir)/extensions
libvnc_la_SOURCES = xf86vncModule.cc
libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(LIB_DIR) \
-I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/hw/xfree86/os-support \
-I$(top_srcdir)/hw/xfree86/os-support/bus \
-DXFree86Module -DXFree86LOADER -DIN_MODULE \
-I$(includedir)/pixman-1
libvnc_la_LDFLAGS = -module -avoid-version
libvnc_la_LIBADD = libvnccommon.la $(RFB_LIBS)
# C++ hacks
BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
fb.h: $(top_srcdir)/fb/fb.h
cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fb.h
pixman.h: $(includedir)/pixman-1/pixman.h
cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h
fbrop.h: $(top_srcdir)/fb/fbrop.h
cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,' -e 's,xor,c_xor,' > $(srcdir)/fbrop.h

2
dead.package Normal file
View file

@ -0,0 +1,2 @@
RealVNC has been replaced by TightVNC. Checkout "tightvnc" module if you want
current Fedora source.

View file

@ -1 +0,0 @@
a119f3c75ad2767c0588260e2abe39be vnc-4_1_3-unixsrc.tar.gz

View file

@ -1,61 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.102434 2006-12-01 13:37:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx 2006-12-01 13:37:27.000000000 +0100
@@ -52,6 +52,7 @@
"manager decoration around a window", 24);
StringParameter passwordFile("PasswordFile",
"Password file for VNC authentication", "");
+BoolParameter passwdInput("passwdInput", "Gets password from stdin", false);
AliasParameter rfbauth("passwd", "Alias for PasswordFile", &passwordFile);
BoolParameter useLocalCursor("UseLocalCursor",
--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.102434 2006-12-01 13:37:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2006-12-01 13:37:27.000000000 +0100
@@ -108,6 +108,11 @@
"~/.vnc/passwd".
.TP
+.B \-passwdInput \fItrue, false\fP
+Force standard vnc dialog to getting password and reads password from stdin.
+Default is false(shows dialog window)
+
+.TP
.B \-Shared
When you make a connection to a VNC server, all other existing connections are
normally closed. This option requests that they be left open, allowing you to
--- vnc-4_1_2-unixsrc/unix/vncviewer/parameters.h.102434 2006-12-01 13:37:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/parameters.h 2006-12-01 13:37:27.000000000 +0100
@@ -38,6 +38,7 @@
extern rfb::BoolParameter fullScreen;
extern rfb::StringParameter geometry;
extern rfb::StringParameter embedParent;
+extern rfb::BoolParameter passwdInput;
extern char aboutText[];
extern char* programName;
--- vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx.102434 2006-12-01 13:37:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx 2006-12-01 13:41:42.000000000 +0100
@@ -37,6 +37,8 @@
#include "ServerDialog.h"
#include "PasswdDialog.h"
#include "parameters.h"
+#include <string>
+#include <iostream>
using namespace rfb;
@@ -206,6 +208,15 @@
return;
}
+ if(passwdInput)
+ {
+ std::string s;
+ std::cin >> s;
+ *password = strdup(s.c_str());
+ if(user) *user = 0;
+ return;
+ }
+
const char* secType = secTypeName(getCurrentCSecurity()->getType());
const char* titlePrefix = "VNC Authentication";
CharArray title(strlen(titlePrefix) + strlen(secType) + 4);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

View file

@ -1,42 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.24bit 2007-06-07 17:27:46.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 17:29:01.000000000 +0200
@@ -762,7 +762,7 @@ static Bool vfbScreenInit(int index, Scr
miSetPixmapDepths();
- switch (pvfb->bitsPerPixel)
+ switch (pvfb->depth)
{
case 8:
miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0);
@@ -771,6 +771,9 @@ static Bool vfbScreenInit(int index, Scr
case 16:
miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f);
break;
+ case 24:
+ miSetVisualTypesAndMasks (24, 1 << TrueColor, 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff);
+ break;
case 32:
miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00);
break;
@@ -778,15 +781,17 @@ static Bool vfbScreenInit(int index, Scr
return FALSE;
}
- if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
- return FALSE;
+ ret =fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel);
#ifdef RENDER
if (ret && Render)
fbPictureInit(pScreen, 0, 0);
#endif /* RENDER */
+ if (!ret)
+ return FALSE;
+
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
pScreen->ListInstalledColormaps = vfbListInstalledColormaps;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

View file

@ -1,39 +0,0 @@
--- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h.64bit 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/XserverDesktop.h 2005-12-06 14:31:11.000000000 +0000
@@ -29,6 +29,8 @@
#include <rfb/VNCServerST.h>
#include <rdr/SubstitutingInStream.h>
+#include "xorg-server.h"
+
extern "C" {
#define class c_class;
#include <scrnintstr.h>
--- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.64bit 2005-12-06 14:31:24.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-12-06 14:31:30.000000000 +0000
@@ -973,25 +973,6 @@
} /* end InitOutput */
-#ifdef DPMSExtension
-extern "C" {
-#if NeedFunctionPrototypes
- void DPMSSet(CARD16 level)
-#else
- void DPMSSet(level)
- CARD16 level;
-#endif
- {
- return;
- }
-
- Bool DPMSSupported()
- {
- return FALSE;
- }
-}
-#endif
-
/* this is just to get the server to link on AIX */
#ifdef AIXV3
int SelectWaitTime = 10000; /* usec */

View file

@ -1,28 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.allocate 2008-02-25 16:38:37.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-02-25 16:54:48.000000000 +0100
@@ -536,9 +536,9 @@ static void vfbInstallColormap(ColormapP
swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue);
swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries);
- ppix = (Pixel *)ALLOCATE_LOCAL(entries * sizeof(Pixel));
- prgb = (xrgb *)ALLOCATE_LOCAL(entries * sizeof(xrgb));
- defs = (xColorItem *)ALLOCATE_LOCAL(entries * sizeof(xColorItem));
+ ppix = (Pixel *)xalloc(entries * sizeof(Pixel));
+ prgb = (xrgb *)xalloc(entries * sizeof(xrgb));
+ defs = (xColorItem *)xalloc(entries * sizeof(xColorItem));
for (i = 0; i < entries; i++) ppix[i] = i;
/* XXX truecolor */
@@ -553,9 +553,9 @@ static void vfbInstallColormap(ColormapP
}
(*pmap->pScreen->StoreColors)(pmap, entries, defs);
- DEALLOCATE_LOCAL(ppix);
- DEALLOCATE_LOCAL(prgb);
- DEALLOCATE_LOCAL(defs);
+ xfree(ppix);
+ xfree(prgb);
+ xfree(defs);
}
}

View file

@ -1,210 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.always_use_fb 2007-03-05 14:03:21.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-05 14:10:57.000000000 +0100
@@ -33,27 +33,28 @@
#include <network/TcpSocket.h>
#include "vncExtInit.h"
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
extern "C" {
#define class c_class
#define public c_public
+#define new c_new
#ifdef WIN32
#include <X11/Xwinsock.h>
#endif
#include <stdio.h>
-#include "X11/X.h"
+#include <X11/X.h>
#define NEED_EVENTS
-#include "X11/Xproto.h"
-#include "X11/Xos.h"
+#include <X11/Xproto.h>
+#include <X11/Xos.h>
#include "scrnintstr.h"
#include "servermd.h"
-#ifdef VNC_USE_FB
#include "fb.h"
-#else
-#define PSZ 8
-#include "cfb.h"
-#endif
#include "mi.h"
-#include "mibstore.h"
+#include "micmap.h"
+#include "miline.h"
#include "colormapst.h"
#include "gcstruct.h"
#include "input.h"
@@ -66,24 +67,12 @@
#endif
#include <X11/XWDFile.h>
#include "dix.h"
-#include "miline.h"
#include "inputstr.h"
#include "keysym.h"
extern int defaultColorVisualClass;
+#undef new
#undef class
#undef public
-#ifndef VNC_USE_FB
- extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
- extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
- extern Bool cfb16CreateGC(GCPtr);
- extern Bool cfb32CreateGC(GCPtr);
- extern void cfb16GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
- extern void cfb32GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
- extern void cfb16GetImage(DrawablePtr, int, int, int, int, unsigned int,
- unsigned long, char*);
- extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
- unsigned long, char*);
-#endif
}
#define XVNCVERSION "Free Edition 4.1.3"
@@ -502,67 +491,6 @@
}
#endif
-#ifndef VNC_USE_FB
-static Bool vfbMultiDepthCreateGC(GCPtr pGC)
-{
- switch (vfbBitsPerPixel(pGC->depth))
- {
- case 1: return mfbCreateGC (pGC);
- case 8: return cfbCreateGC (pGC);
- case 16: return cfb16CreateGC (pGC);
- case 32: return cfb32CreateGC (pGC);
- default: return FALSE;
- }
-}
-
-static void vfbMultiDepthGetSpans(
- DrawablePtr pDrawable, /* drawable from which to get bits */
- int wMax, /* largest value of all *pwidths */
- register DDXPointPtr ppt, /* points to start copying from */
- int *pwidth, /* list of number of bits to copy */
- int nspans, /* number of scanlines to copy */
- char *pdstStart) /* where to put the bits */
-{
- switch (pDrawable->bitsPerPixel) {
- case 1:
- mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- break;
- case 8:
- cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- break;
- case 16:
- cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- break;
- case 32:
- cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- break;
- }
- return;
-}
-
-static void
-vfbMultiDepthGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
- unsigned int format, unsigned long planeMask,
- char *pdstLine)
-{
- switch (pDrawable->bitsPerPixel)
- {
- case 1:
- mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
- break;
- case 8:
- cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
- break;
- case 16:
- cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
- break;
- case 32:
- cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
- break;
- }
-}
-#endif
-
static ColormapPtr InstalledMaps[MAXSCREENS];
static int vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
@@ -832,44 +760,32 @@
defaultColorVisualClass
= (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
-#ifdef VNC_USE_FB
- if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
- return FALSE;
+ miSetPixmapDepths();
-#ifdef RENDER
- if (ret && Render)
- fbPictureInit(pScreen, 0, 0);
-#endif /* RENDER */
-#else /* VNC_USE_FB */
switch (pvfb->bitsPerPixel)
{
- case 1:
- ret = mfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth);
- break;
case 8:
- ret = cfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth);
+ miSetVisualTypesAndMasks (8, 1 << PseudoColor, 8, PseudoColor, 0, 0, 0);
+
break;
case 16:
- ret = cfb16ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth);
+ miSetVisualTypesAndMasks (16, 1 << TrueColor, 8, TrueColor, 0xf800, 0x07e0, 0x001f);
break;
case 32:
- ret = cfb32ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
- dpi, dpi, pvfb->paddedWidth);
+ miSetVisualTypesAndMasks (32, 1 << TrueColor , 8, TrueColor, 0xff000000, 0x00ff0000, 0x0000ff00);
break;
default:
return FALSE;
}
- if (!ret) return FALSE;
+ if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
+ return FALSE;
- pScreen->CreateGC = vfbMultiDepthCreateGC;
- pScreen->GetImage = vfbMultiDepthGetImage;
- pScreen->GetSpans = vfbMultiDepthGetSpans;
-#endif
+#ifdef RENDER
+ if (ret && Render)
+ fbPictureInit(pScreen, 0, 0);
+#endif /* RENDER */
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
@@ -915,18 +831,7 @@
}
}
-#ifdef VNC_USE_FB
ret = fbCreateDefColormap(pScreen);
-#else
- if (pvfb->bitsPerPixel == 1)
- {
- ret = mfbCreateDefColormap(pScreen);
- }
- else
- {
- ret = cfbCreateDefColormap(pScreen);
- }
-#endif
miSetZeroLineBias(pScreen, pvfb->lineBias);

View file

@ -1,18 +0,0 @@
--- vnc-4_1_1-unixsrc/common/rfb/SConnection.cxx.authentication 2005-03-11 16:08:41.000000000 +0100
+++ vnc-4_1_1-unixsrc/common/rfb/SConnection.cxx 2006-05-17 16:15:54.000000000 +0200
@@ -181,6 +181,15 @@
vlog.info("Client requests security type %s(%d)",
secTypeName(secType),secType);
+ // Verify that the requested security type should be offered
+ std::list<rdr::U8> secTypes;
+ std::list<rdr::U8>::iterator i;
+ securityFactory->getSecTypes(&secTypes, reverseConnection);
+ for (i=secTypes.begin(); i!=secTypes.end(); i++)
+ if (*i == secType) break;
+ if (i == secTypes.end())
+ throw Exception("Requested security type not available");
+
try {
state_ = RFBSTATE_SECURITY;
security = securityFactory->getSSecurity(secType, reverseConnection);

View file

@ -1,11 +0,0 @@
--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.autotools-compile 2007-02-15 18:56:52.000000000 +0100
+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2007-02-15 18:57:21.000000000 +0100
@@ -42,7 +42,7 @@
#include <rfb/LogWriter.h>
#ifndef VNC_SOCKLEN_T
-#define VNC_SOCKLEN_T int
+#define VNC_SOCKLEN_T socklen_t
#endif
#ifndef INADDR_NONE

View file

@ -1,418 +0,0 @@
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,5 @@
+SUBDIRS = \
+ rdr \
+ network \
+ Xregion \
+ rfb
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/rfb/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,136 @@
+lib_LTLIBRARIES = librfb.la
+
+librfb_la_SOURCES = \
+ Blacklist.cxx \
+ Blacklist.h \
+ CConnection.cxx \
+ CConnection.h \
+ CMsgHandler.cxx \
+ CMsgHandler.h \
+ CMsgReader.cxx \
+ CMsgReader.h \
+ CMsgReaderV3.cxx \
+ CMsgReaderV3.h \
+ CMsgWriter.cxx \
+ CMsgWriter.h \
+ CMsgWriterV3.cxx \
+ CMsgWriterV3.h \
+ ColourCube.h \
+ ColourMap.h \
+ ComparingUpdateTracker.cxx \
+ ComparingUpdateTracker.h \
+ Configuration.cxx \
+ Configuration.h \
+ ConnParams.cxx \
+ ConnParams.h \
+ CSecurity.h \
+ CSecurityNone.h \
+ CSecurityVncAuth.cxx \
+ CSecurityVncAuth.h \
+ Cursor.cxx \
+ Cursor.h \
+ Decoder.cxx \
+ Decoder.h \
+ d3des.c \
+ d3des.h \
+ Encoder.cxx \
+ Encoder.h \
+ encodings.cxx \
+ encodings.h \
+ Exception.h \
+ hextileConstants.h \
+ hextileDecode.h \
+ HextileDecoder.cxx \
+ HextileDecoder.h \
+ hextileEncode.h \
+ HextileEncoder.cxx \
+ HextileEncoder.h \
+ Hostname.h \
+ HTTPServer.cxx \
+ HTTPServer.h \
+ ImageGetter.h \
+ InputHandler.h \
+ KeyRemapper.cxx \
+ KeyRemapper.h \
+ keysymdef.h \
+ Logger.cxx \
+ Logger_file.cxx \
+ Logger_file.h \
+ Logger.h \
+ Logger_stdio.cxx \
+ Logger_stdio.h \
+ LogWriter.cxx \
+ LogWriter.h \
+ msgTypes.h \
+ Password.cxx \
+ Password.h \
+ PixelBuffer.cxx \
+ PixelBuffer.h \
+ PixelFormat.cxx \
+ PixelFormat.h \
+ Pixel.h \
+ RawDecoder.cxx \
+ RawDecoder.h \
+ RawEncoder.cxx \
+ RawEncoder.h \
+ Rect.h \
+ Region.cxx \
+ Region.h \
+ rreDecode.h \
+ RREDecoder.cxx \
+ RREDecoder.h \
+ rreEncode.h \
+ RREEncoder.cxx \
+ RREEncoder.h \
+ SConnection.cxx \
+ SConnection.h \
+ SDesktop.h \
+ secTypes.cxx \
+ secTypes.h \
+ ServerCore.cxx \
+ ServerCore.h \
+ SMsgHandler.cxx \
+ SMsgHandler.h \
+ SMsgReader.cxx \
+ SMsgReader.h \
+ SMsgReaderV3.cxx \
+ SMsgReaderV3.h \
+ SMsgWriter.cxx \
+ SMsgWriter.h \
+ SMsgWriterV3.cxx \
+ SMsgWriterV3.h \
+ SSecurityFactoryStandard.cxx \
+ SSecurityFactoryStandard.h \
+ SSecurity.h \
+ SSecurityNone.h \
+ SSecurityVncAuth.cxx \
+ SSecurityVncAuth.h \
+ Threading.h \
+ Timer.cxx \
+ Timer.h \
+ TransImageGetter.cxx \
+ TransImageGetter.h \
+ transInitTempl.h \
+ transTempl.h \
+ TrueColourMap.h \
+ UpdateTracker.cxx \
+ UpdateTracker.h \
+ UserPasswdGetter.h \
+ util.cxx \
+ util.h \
+ VNCSConnectionST.cxx \
+ VNCSConnectionST.h \
+ VNCServer.h \
+ VNCServerST.cxx \
+ VNCServerST.h \
+ zrleDecode.h \
+ ZRLEDecoder.cxx \
+ ZRLEDecoder.h \
+ zrleEncode.h \
+ ZRLEEncoder.cxx \
+ ZRLEEncoder.h
+
+librfb_la_LIBADD = \
+ $(top_srcdir)/network/libnetwork.la \
+ $(top_srcdir)/rdr/librdr.la \
+ $(top_srcdir)/Xregion/libXregion.la
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/rdr/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,30 @@
+noinst_LTLIBRARIES = librdr.la
+
+librdr_la_SOURCES = \
+ Exception.cxx \
+ FdInStream.h \
+ FixedMemOutStream.h \
+ HexOutStream.cxx \
+ InStream.h \
+ OutStream.h \
+ SubstitutingInStream.h \
+ ZlibInStream.h \
+ Exception.h \
+ FdOutStream.cxx \
+ HexInStream.cxx \
+ HexOutStream.h \
+ MemInStream.h \
+ RandomStream.cxx \
+ types.h \
+ ZlibOutStream.cxx \
+ FdInStream.cxx \
+ FdOutStream.h \
+ HexInStream.h \
+ InStream.cxx \
+ MemOutStream.h \
+ RandomStream.h \
+ ZlibInStream.cxx \
+ ZlibOutStream.h
+
+librdr_la_LIBADD = \
+ -lz
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/configure.ac 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,42 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT([vnc-libs], 4.1.2, [bugzilla.redhat.com])
+AC_CONFIG_HEADER([config.h])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/timeb.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_MEMCMP
+AC_FUNC_SELECT_ARGTYPES
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([ftime gethostbyname getpass gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strncasecmp])
+
+AC_CONFIG_FILES([Makefile
+ Xregion/Makefile
+ network/Makefile
+ rdr/Makefile
+ rfb/Makefile])
+AC_OUTPUT
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/Xregion/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = libXregion.la
+
+libXregion_la_SOURCES = \
+ Region.c \
+ region.h \
+ Xregion.h
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = libnetwork.la
+
+libnetwork_la_SOURCES = \
+ Socket.h \
+ TcpSocket.cxx \
+ TcpSocket.h
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,6 @@
+SUBDIRS = \
+ tx \
+ vncpasswd \
+ vncviewer \
+ vncconfig \
+ x0vncserver
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/tx/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,25 @@
+noinst_LTLIBRARIES = libtx.la
+
+libtx_la_SOURCES = \
+ TXButton.h \
+ TXDialog.h \
+ TXEntry.h \
+ TXCheckbox.h \
+ TXImage.cxx \
+ TXImage.h \
+ TXLabel.h \
+ TXMenu.cxx \
+ TXMenu.h \
+ TXMsgBox.h \
+ TXScrollbar.cxx \
+ TXScrollbar.h \
+ TXViewport.cxx \
+ TXViewport.h \
+ TXWindow.cxx \
+ TXWindow.h
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/../common/
+
+libtx_la_LIBADD = \
+ -lX11
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/vncpasswd/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,10 @@
+bin_PROGRAMS = vncpasswd
+
+vncpasswd_SOURCES = \
+ vncpasswd.cxx
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/../common
+
+vncpasswd_LDADD = \
+ $(top_srcdir)/../common/rfb/librfb.la
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/vncconfig/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,17 @@
+bin_PROGRAMS = vncconfig
+
+vncconfig_SOURCES = \
+ buildtime.c \
+ QueryConnectDialog.cxx \
+ QueryConnectDialog.h \
+ vncconfig.cxx \
+ vncExt.c \
+ vncExt.h
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/../common \
+ -I$(top_srcdir)/tx
+
+vncconfig_LDADD = \
+ $(top_srcdir)/../common/rfb/librfb.la \
+ $(top_srcdir)/tx/libtx.la
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/configure.ac 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,52 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT([vnc], 4.1.2, [bugzilla.redhat.com])
+AC_CONFIG_SRCDIR([x0vncserver/buildtime.c])
+AC_CONFIG_HEADER([config.h])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_PATH_X
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h strings.h sys/time.h termios.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_C_RESTRICT
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_LSTAT
+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_TYPE_SIGNAL
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+AC_FUNC_WAIT3
+AC_CHECK_FUNCS([memset mkdir select setenv strchr strdup strerror strspn strtol])
+
+AC_CONFIG_FILES([Makefile
+ tx/Makefile
+ vncconfig/Makefile
+ vncpasswd/Makefile
+ vncviewer/Makefile
+ x0vncserver/Makefile])
+AC_OUTPUT
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,24 @@
+bin_PROGRAMS = vncviewer
+
+vncviewer_SOURCES = \
+ AboutDialog.h \
+ buildtime.c \
+ CConn.cxx \
+ CConn.h \
+ DesktopWindow.cxx \
+ DesktopWindow.h \
+ InfoDialog.h \
+ OptionsDialog.h \
+ parameters.h \
+ PasswdDialog.h \
+ ServerDialog.h \
+ vncviewer.cxx
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/../common \
+ -I$(top_srcdir)/tx
+
+vncviewer_LDADD = \
+ $(top_srcdir)/../common/rfb/librfb.la \
+ $(top_srcdir)/tx/libtx.la \
+ -lXext
--- /dev/null 2007-02-16 09:39:42.585819347 +0100
+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Makefile.am 2007-02-16 09:51:11.000000000 +0100
@@ -0,0 +1,20 @@
+bin_PROGRAMS = x0vncserver
+
+x0vncserver_SOURCES = \
+ buildtime.c \
+ Image.cxx \
+ Image.h \
+ x0vncserver.cxx \
+ $(top_srcdir)/vncconfig/QueryConnectDialog.h \
+ $(top_srcdir)/vncconfig/QueryConnectDialog.cxx
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/../common \
+ -I$(top_srcdir)/vncconfig \
+ -I$(top_srcdir)/tx
+
+x0vncserver_LDADD = \
+ $(top_srcdir)/../common/rfb/librfb.la \
+ $(top_srcdir)/tx/libtx.la \
+ -lXext \
+ -lXtst

View file

@ -1,55 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.bounds 2008-03-17 16:46:27.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-17 16:59:11.000000000 +0100
@@ -486,32 +486,36 @@ void XserverDesktop::add_changed(RegionP
{
if (ignoreHooks_) return;
if (grabbing) return;
+
+ BoxRec screenbox;
+ RegionPtr newreg = REGION_CREATE(pScreen, 0, 0);
+
+ screenbox.x1 = screenbox.y1 = 0;
+ screenbox.x2 = pScreen->width;
+ screenbox.y2 = pScreen->height;
+
+ RegionPtr screenreg = REGION_CREATE(pScreen, &screenbox, 0);
+ REGION_INTERSECT(pScreen, newreg, reg, screenreg);
+ REGION_DESTROY (pScreen, screenreg);
+
try {
rfb::Region rfbReg;
- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, reg),
- REGION_NUM_RECTS(reg),
- (ShortRect*)REGION_RECTS(reg));
+ rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, newreg),
+ REGION_NUM_RECTS(newreg),
+ (ShortRect*)REGION_RECTS(newreg));
server->add_changed(rfbReg);
deferUpdate();
} catch (rdr::Exception& e) {
vlog.error("XserverDesktop::add_changed: %s",e.str());
}
+ REGION_DESTROY (pScreen, newreg);
}
void XserverDesktop::add_copied(RegionPtr dst, int dx, int dy)
{
- if (ignoreHooks_) return;
- if (grabbing) return;
- try {
- rfb::Region rfbReg;
- rfbReg.setExtentsAndOrderedRects((ShortRect*)REGION_EXTENTS(pScreen, dst),
- REGION_NUM_RECTS(dst),
- (ShortRect*)REGION_RECTS(dst));
- server->add_copied(rfbReg, rfb::Point(dx, dy));
- deferUpdate();
- } catch (rdr::Exception& e) {
- vlog.error("XserverDesktop::add_copied: %s",e.str());
- }
+ add_changed (dst);
+ REGION_TRANSLATE (pScreen, dst, -dx, -dy);
+ add_changed (dst);
}
void XserverDesktop::positionCursor()

View file

@ -1,18 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/vncserver.clipboard vnc-4_1_2-unixsrc/unix/vncserver
--- vnc-4_1_2-unixsrc/unix/vncserver.clipboard 2008-03-13 16:17:07.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncserver 2008-03-13 16:18:14.000000000 +0100
@@ -42,13 +42,13 @@ $xauthorityFile = "$ENV{XAUTHORITY}" ||
$defaultXStartup
= ("#!/bin/sh\n\n".
+ "vncconfig -iconic &\n".
"# Uncomment the following two lines for normal desktop:\n".
"# unset SESSION_MANAGER\n".
"# exec /etc/X11/xinit/xinitrc\n\n".
"[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
"[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
"xsetroot -solid grey\n".
- "vncconfig -iconic &\n".
"xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
"twm &\n");

View file

@ -1,18 +0,0 @@
--- vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.config 2006-10-25 12:35:00.000000000 +0200
+++ vnc-4_1_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc 2006-10-25 12:35:24.000000000 +0200
@@ -17,6 +17,7 @@
*/
#include <stdio.h>
+#include "XserverDesktop.h"
extern "C" {
#define class c_class
@@ -48,7 +49,6 @@
#undef min
#include <network/TcpSocket.h>
-#include "XserverDesktop.h"
#include "vncHooks.h"
#include "vncExtInit.h"

View file

@ -1,27 +0,0 @@
--- vnc-4_1-unixsrc/unix/vncserver.cookie 2005-02-23 12:28:18.000000000 +0000
+++ vnc-4_1-unixsrc/unix/vncserver 2005-03-03 22:04:28.000000000 +0000
@@ -116,18 +116,12 @@
$desktopLog = "$vncUserDir/$host:$displayNumber.log";
unlink($desktopLog);
-# Make an X server cookie - use as the seed the sum of the current time, our
-# PID and part of the encrypted form of the password. Ideally we'd use
-# /dev/urandom, but that's only available on Linux.
-
-srand(time+$$+unpack("L",`cat $vncUserDir/passwd`));
-$cookie = "";
-for (1..16) {
- $cookie .= sprintf("%02x", int(rand(256)) % 256);
-}
-
-system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
-system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie");
+# Make an X server cookie - use mcookie
+$cookie = `/usr/bin/mcookie`;
+open (XAUTH, "|xauth -f $xauthorityFile source -");
+print XAUTH "add $host:$displayNumber . $cookie\n";
+print XAUTH "add $host/unix:$displayNumber . $cookie\n";
+close XAUTH;
if ($opt{'-name'}) {
$desktopName = $opt{'-name'};

View file

@ -1,11 +0,0 @@
--- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc.gcc4 2005-03-04 13:52:03.000000000 +0000
+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/vncExtInit.cc 2005-03-04 13:52:24.000000000 +0000
@@ -751,7 +751,7 @@
rep.timeout = qcTimeout;
rep.addrLen = qcTimeout ? strlen(qcAddress) : 0;
rep.userLen = qcTimeout ? strlen(qcUsername) : 0;
- rep.opaqueId = (CARD32)queryConnectId;
+ rep.opaqueId = (CARD32)(long)queryConnectId;
rep.length = (rep.userLen + rep.addrLen + 3) >> 2;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);

View file

@ -1,35 +0,0 @@
diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx
--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.gcc43 2008-01-09 14:51:54.000000000 +0100
+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-01-09 14:51:54.000000000 +0100
@@ -37,6 +37,9 @@
#include <fcntl.h>
#endif
+extern "C" {
+#include <stdlib.h>
+}
#include <network/TcpSocket.h>
#include <rfb/util.h>
#include <rfb/LogWriter.h>
diff -up vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx
--- vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/tx/TXImage.cxx 2008-01-09 14:51:54.000000000 +0100
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <strings.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
diff -up vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx
--- vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx.gcc43 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/x0vncserver/Image.cxx 2008-01-09 14:51:54.000000000 +0100
@@ -21,6 +21,7 @@
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>

View file

@ -1,11 +0,0 @@
--- vnc-4_1-unixsrc/common/rfb/ServerCore.cxx.idle 2005-03-03 15:42:21.000000000 +0000
+++ vnc-4_1-unixsrc/common/rfb/ServerCore.cxx 2005-03-03 23:11:14.000000000 +0000
@@ -29,7 +29,7 @@
("IdleTimeout",
"The number of seconds after which an idle VNC connection will be dropped "
"(zero means no timeout)",
- 3600, 0);
+ 0, 0);
rfb::IntParameter rfb::Server::clientWaitTimeMillis
("ClientWaitTimeMillis",
"The number of milliseconds to wait for a client which is no longer "

View file

@ -1,41 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.includes 2008-04-04 13:54:24.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-04-04 13:54:49.000000000 +0200
@@ -22,8 +22,8 @@
extern "C" {
#define class c_class
#define NEED_EVENTS
-#include "X.h"
-#include "Xproto.h"
+#include <X11/X.h>
+#include <X11/Xproto.h>
#include "misc.h"
#include "os.h"
#include "dixstruct.h"
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.includes 2008-04-04 13:55:07.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-04-04 13:55:29.000000000 +0200
@@ -50,9 +50,9 @@ extern char *display;
#include "resource.h"
#include "cursorstr.h"
#include "windowstr.h"
-#include "mi/mi.h"
+#include "mi.h"
#define XK_CYRILLIC
-#include "keysym.h"
+#include <X11/keysym.h>
#undef public
#undef class
}
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.includes 2008-04-04 13:57:34.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-04-04 13:57:44.000000000 +0200
@@ -68,7 +68,7 @@ extern "C" {
#include <X11/XWDFile.h>
#include "dix.h"
#include "inputstr.h"
-#include "keysym.h"
+#include <X11/keysym.h>
extern int defaultColorVisualClass;
#undef new
#undef class

View file

@ -1,25 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man
--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.pedantic 2008-03-13 14:55:08.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-03-13 14:55:58.000000000 +0100
@@ -8,6 +8,10 @@ vncviewer \- VNC viewer for X
.br
.B vncviewer
.RI [ options ]
+.RI [ host ][:: port ]
+.br
+.B vncviewer
+.RI [ options ]
.B \-listen
.RI [ port ]
.SH DESCRIPTION
@@ -182,8 +186,8 @@ prefix from the entries in "/usr/include
.TP
\fB\-via\fR \fIgateway\fR
Automatically create encrypted TCP tunnel to the \fIgateway\fR machine
-before connection, connect to the \fIhost\fR through that tunnel
-(TightVNC\-specific). By default, this option invokes SSH local port
+before connection, connect to the \fIhost\fR through that tunnel. By default,
+this option invokes SSH local port
forwarding, assuming that SSH client binary can be accessed as
/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host
machine name should be specified as known to the gateway machine, e.g.

View file

@ -1,690 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc.mieq 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/XserverDesktop.cc 2008-03-05 12:25:06.000000000 +0100
@@ -50,12 +50,20 @@ extern char *display;
#include "resource.h"
#include "cursorstr.h"
#include "windowstr.h"
+#include "mi/mi.h"
#define XK_CYRILLIC
#include "keysym.h"
#undef public
#undef class
}
+static xEvent *eventq = NULL;
+static DeviceIntPtr vncKeyboard = NULL;
+static DeviceIntPtr vncMouse = NULL;
+
+static int vfbKeybdProc (DeviceIntPtr pDev, int onoff);
+static int vfbMouseProc (DeviceIntPtr pDev, int onoff);
+
using namespace rfb;
using namespace network;
@@ -202,6 +210,21 @@ XserverDesktop::XserverDesktop(ScreenPtr
if (httpListener)
httpServer = new FileHTTPServer(this);
+
+// XXX Memory leak here, eventq is not free()-d because it has to exist till server exits
+ if (!eventq)
+ eventq = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum());
+ if (!eventq)
+ FatalError("couldn't allocate room for events\n");
+
+ if (vncMouse == NULL) {
+ vncMouse = AddInputDevice(vfbMouseProc, TRUE);
+ RegisterPointerDevice (vncMouse);
+ }
+ if (vncKeyboard == NULL) {
+ vncKeyboard = AddInputDevice(vfbKeybdProc, TRUE);
+ RegisterKeyboardDevice (vncKeyboard);
+ }
}
XserverDesktop::~XserverDesktop()
@@ -495,7 +518,7 @@ void XserverDesktop::positionCursor()
{
if (!cursorPos.equals(oldCursorPos)) {
oldCursorPos = cursorPos;
- (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE);
+// (*pScreen->SetCursorPosition) (pScreen, cursorPos.x, cursorPos.y, FALSE);
server->setCursorPos(cursorPos);
server->tryUpdate();
}
@@ -660,8 +683,8 @@ void XserverDesktop::approveConnection(v
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask)
{
- xEvent ev;
- DevicePtr dev = LookupPointerDevice();
+ BYTE detail;
+ int i, j, n, valuators[2];
// SetCursorPosition seems to be very expensive (at least on XFree86 3.3.6
// for S3), so we delay calling it until positionCursor() is called at the
@@ -670,14 +693,14 @@ void XserverDesktop::pointerEvent(const
NewCurrentScreen(pScreen, pos.x, pos.y);
- ev.u.u.type = MotionNotify;
- ev.u.u.detail = 0;
- ev.u.keyButtonPointer.rootX = pos.x;
- ev.u.keyButtonPointer.rootY = pos.y;
- ev.u.keyButtonPointer.time = GetTimeInMillis();
-
- if (!pos.equals(cursorPos))
- (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1);
+ if (!pos.equals(cursorPos)) {
+ valuators[0] = pos.x;
+ valuators[1] = pos.y;
+ n = GetPointerEvents (eventq, vncMouse, MotionNotify, 0,
+ POINTER_ABSOLUTE, 0, 2, valuators);
+ for (i = 0; i < n; i++)
+ mieqEnqueue (vncMouse, eventq + i);
+ }
for (int i = 0; i < 5; i++) {
if ((buttonMask ^ oldButtonMask) & (1<<i)) {
@@ -685,12 +708,15 @@ void XserverDesktop::pointerEvent(const
// God knows why but some idiot decided to conditionally move the pointer
// mapping out of DIX, so we guess here that if XINPUT is defined we have
// to do it ourselves...
- ev.u.u.detail = ((DeviceIntPtr)dev)->button->map[i + 1];
+ detail = vncMouse->button->map[i + 1];
#else
- ev.u.u.detail = i + 1;
+ detail = i + 1;
#endif
- ev.u.u.type = (buttonMask & (1<<i)) ? ButtonPress : ButtonRelease;
- (*dev->processInputProc)(&ev, (DeviceIntPtr)dev, 1);
+ n = GetPointerEvents (eventq, vncMouse, (buttonMask & (1<<i)) ?
+ ButtonPress : ButtonRelease,
+ detail, POINTER_RELATIVE, 0, 0, NULL);
+ for (j = 0; j < n; j++)
+ mieqEnqueue (vncMouse, eventq + j);
}
}
@@ -771,8 +797,8 @@ void XserverDesktop::lookup(int index, i
class ModifierState {
public:
- ModifierState(DeviceIntPtr dev_, int modIndex_)
- : dev(dev_), modIndex(modIndex_), nKeys(0), keys(0), pressed(false)
+ ModifierState(int modIndex_)
+ : modIndex(modIndex_), nKeys(0), keys(0), pressed(false)
{
}
~ModifierState() {
@@ -781,7 +807,7 @@ public:
delete [] keys;
}
void press() {
- KeyClassPtr keyc = dev->key;
+ KeyClassPtr keyc = vncKeyboard->key;
if (!(keyc->state & (1<<modIndex))) {
tempKeyEvent(keyc->modifierKeyMap[modIndex * keyc->maxKeysPerModifier],
true);
@@ -789,7 +815,7 @@ public:
}
}
void release() {
- KeyClassPtr keyc = dev->key;
+ KeyClassPtr keyc = vncKeyboard->key;
if (keyc->state & (1<<modIndex)) {
for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
int keycode
@@ -802,20 +828,19 @@ public:
private:
void tempKeyEvent(int keycode, bool down) {
if (keycode) {
- if (!keys) keys = new int[dev->key->maxKeysPerModifier];
+ if (!keys) keys = new int[vncKeyboard->key->maxKeysPerModifier];
keys[nKeys++] = keycode;
generateXKeyEvent(keycode, down);
}
}
void generateXKeyEvent(int keycode, bool down) {
- xEvent ev;
- ev.u.u.type = down ? KeyPress : KeyRelease;
- ev.u.u.detail = keycode;
- ev.u.keyButtonPointer.time = GetTimeInMillis();
- (*dev->c_public.processInputProc)(&ev, dev, 1);
+ int i, n;
+ n = GetKeyboardEvents (eventq, vncKeyboard,
+ down ? KeyPress : KeyRelease, keycode);
+ for (i = 0; i < n; i++)
+ mieqEnqueue (vncKeyboard, eventq + i);
vlog.debug("fake keycode %d %s", keycode, down ? "down" : "up");
}
- DeviceIntPtr dev;
int modIndex;
int nKeys;
int* keys;
@@ -888,16 +913,16 @@ void XserverDesktop::keyEvent(rdr::U32 k
vlog.debug("Ignoring caps lock");
return;
}
- DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
- KeyClassPtr keyc = dev->key;
+ KeyClassPtr keyc = vncKeyboard->key;
KeySymsPtr keymap = &keyc->curKeySyms;
+ int i, j, k, n;
// find which modifier Mode_switch is on.
int modeSwitchMapIndex = 0;
- for (int i = 3; i < 8; i++) {
- for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
+ for (i = 3; i < 8; i++) {
+ for (k = 0; k < keyc->maxKeysPerModifier; k++) {
int keycode = keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k];
- for (int j = 0; j < keymap->mapWidth; j++) {
+ for (j = 0; j < keymap->mapWidth; j++) {
if (keycode != 0 &&
keymap->map[(keycode - keymap->minKeyCode)
* keymap->mapWidth + j] == XK_Mode_switch)
@@ -926,7 +951,7 @@ void XserverDesktop::keyEvent(rdr::U32 k
if (kc == 0) {
// Not a direct match in the local keyboard mapping. Check for alternative
// keysyms with the same meaning.
- for (int i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) {
+ for (i = 0; i < sizeof(altKeysym) / sizeof(altKeysym_t); i++) {
if (keysym == altKeysym[i].a)
kc = KeysymToKeycode(keymap, altKeysym[i].b, &col);
else if (keysym == altKeysym[i].b)
@@ -954,16 +979,16 @@ void XserverDesktop::keyEvent(rdr::U32 k
// See if it's a modifier key. If so, then don't do any auto-repeat, because
// the X server will translate each press into a release followed by a press.
- for (int i = 0; i < 8; i++) {
- for (int k = 0; k < keyc->maxKeysPerModifier; k++) {
+ for (i = 0; i < 8; i++) {
+ for (k = 0; k < keyc->maxKeysPerModifier; k++) {
if (kc == keyc->modifierKeyMap[i * keyc->maxKeysPerModifier + k] &&
IS_PRESSED(keyc,kc) && down)
return;
}
}
- ModifierState shift(dev, ShiftMapIndex);
- ModifierState modeSwitch(dev, modeSwitchMapIndex);
+ ModifierState shift(ShiftMapIndex);
+ ModifierState modeSwitch(modeSwitchMapIndex);
if (down) {
if (col & 1)
shift.press();
@@ -977,11 +1002,10 @@ void XserverDesktop::keyEvent(rdr::U32 k
}
}
vlog.debug("keycode %d %s", kc, down ? "down" : "up");
- xEvent ev;
- ev.u.u.type = down ? KeyPress : KeyRelease;
- ev.u.u.detail = kc;
- ev.u.keyButtonPointer.time = GetTimeInMillis();
- (*dev->c_public.processInputProc)(&ev, dev, 1);
+ n = GetKeyboardEvents (eventq, vncKeyboard, down ? KeyPress : KeyRelease,
+ kc);
+ for (i = 0; i < n; i++)
+ mieqEnqueue (vncKeyboard, eventq + i);
}
@@ -1150,3 +1174,208 @@ static KeyCode KeysymToKeycode(KeySymsPt
}
return 0;
}
+
+void vncRingBell(int percent, int pitch, int duration)
+{
+ if (percent > 0)
+ vncBell();
+}
+
+/* Fairly standard US PC Keyboard */
+
+#define VFB_MIN_KEY 8
+#define VFB_MAX_KEY 255
+#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1)
+#define KEYSYMS_PER_KEY 2
+KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = {
+ NoSymbol, NoSymbol,
+ XK_Escape, NoSymbol,
+ XK_1, XK_exclam,
+ XK_2, XK_at,
+ XK_3, XK_numbersign,
+ XK_4, XK_dollar,
+ XK_5, XK_percent,
+ XK_6, XK_asciicircum,
+ XK_7, XK_ampersand,
+ XK_8, XK_asterisk,
+ XK_9, XK_parenleft,
+ XK_0, XK_parenright,
+ XK_minus, XK_underscore,
+ XK_equal, XK_plus,
+ XK_BackSpace, NoSymbol,
+ XK_Tab, NoSymbol,
+ XK_q, XK_Q,
+ XK_w, XK_W,
+ XK_e, XK_E,
+ XK_r, XK_R,
+ XK_t, XK_T,
+ XK_y, XK_Y,
+ XK_u, XK_U,
+ XK_i, XK_I,
+ XK_o, XK_O,
+ XK_p, XK_P,
+ XK_bracketleft, XK_braceleft,
+ XK_bracketright, XK_braceright,
+ XK_Return, NoSymbol,
+ XK_Control_L, NoSymbol,
+ XK_a, XK_A,
+ XK_s, XK_S,
+ XK_d, XK_D,
+ XK_f, XK_F,
+ XK_g, XK_G,
+ XK_h, XK_H,
+ XK_j, XK_J,
+ XK_k, XK_K,
+ XK_l, XK_L,
+ XK_semicolon, XK_colon,
+ XK_apostrophe, XK_quotedbl,
+ XK_grave, XK_asciitilde,
+ XK_Shift_L, NoSymbol,
+ XK_backslash, XK_bar,
+ XK_z, XK_Z,
+ XK_x, XK_X,
+ XK_c, XK_C,
+ XK_v, XK_V,
+ XK_b, XK_B,
+ XK_n, XK_N,
+ XK_m, XK_M,
+ XK_comma, XK_less,
+ XK_period, XK_greater,
+ XK_slash, XK_question,
+ XK_Shift_R, NoSymbol,
+ XK_KP_Multiply, NoSymbol,
+ XK_Alt_L, XK_Meta_L,
+ XK_space, NoSymbol,
+ /*XK_Caps_Lock*/ NoSymbol, NoSymbol,
+ XK_F1, NoSymbol,
+ XK_F2, NoSymbol,
+ XK_F3, NoSymbol,
+ XK_F4, NoSymbol,
+ XK_F5, NoSymbol,
+ XK_F6, NoSymbol,
+ XK_F7, NoSymbol,
+ XK_F8, NoSymbol,
+ XK_F9, NoSymbol,
+ XK_F10, NoSymbol,
+ XK_Num_Lock, XK_Pointer_EnableKeys,
+ XK_Scroll_Lock, NoSymbol,
+ XK_KP_Home, XK_KP_7,
+ XK_KP_Up, XK_KP_8,
+ XK_KP_Prior, XK_KP_9,
+ XK_KP_Subtract, NoSymbol,
+ XK_KP_Left, XK_KP_4,
+ XK_KP_Begin, XK_KP_5,
+ XK_KP_Right, XK_KP_6,
+ XK_KP_Add, NoSymbol,
+ XK_KP_End, XK_KP_1,
+ XK_KP_Down, XK_KP_2,
+ XK_KP_Next, XK_KP_3,
+ XK_KP_Insert, XK_KP_0,
+ XK_KP_Delete, XK_KP_Decimal,
+ NoSymbol, NoSymbol,
+ NoSymbol, NoSymbol,
+ NoSymbol, NoSymbol,
+ XK_F11, NoSymbol,
+ XK_F12, NoSymbol,
+ XK_Home, NoSymbol,
+ XK_Up, NoSymbol,
+ XK_Prior, NoSymbol,
+ XK_Left, NoSymbol,
+ NoSymbol, NoSymbol,
+ XK_Right, NoSymbol,
+ XK_End, NoSymbol,
+ XK_Down, NoSymbol,
+ XK_Next, NoSymbol,
+ XK_Insert, NoSymbol,
+ XK_Delete, NoSymbol,
+ XK_KP_Enter, NoSymbol,
+ XK_Control_R, NoSymbol,
+ XK_Pause, XK_Break,
+ XK_Print, XK_Execute,
+ XK_KP_Divide, NoSymbol,
+ XK_Alt_R, XK_Meta_R,
+};
+
+static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
+{
+ int i;
+
+ for (i = 0; i < MAP_LENGTH; i++)
+ pModMap[i] = NoSymbol;
+
+ for (i = 0; i < VFB_MAP_LEN; i++) {
+ if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock)
+ pModMap[i + VFB_MIN_KEY] = LockMask;
+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L ||
+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R)
+ pModMap[i + VFB_MIN_KEY] = ShiftMask;
+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L ||
+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) {
+ pModMap[i + VFB_MIN_KEY] = ControlMask;
+ }
+ else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L ||
+ keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R)
+ pModMap[i + VFB_MIN_KEY] = Mod1Mask;
+ }
+
+ pKeySyms->minKeyCode = VFB_MIN_KEY;
+ pKeySyms->maxKeyCode = VFB_MAX_KEY;
+ pKeySyms->mapWidth = KEYSYMS_PER_KEY;
+ pKeySyms->map = keyboardMap;
+
+ return TRUE;
+}
+
+static int vfbKeybdProc(DeviceIntPtr pDev, int onoff)
+{
+ KeySymsRec keySyms;
+ CARD8 modMap[MAP_LENGTH];
+
+ switch (onoff)
+ {
+ case DEVICE_INIT:
+ GetMappings(&keySyms, modMap);
+ InitKeyboardDeviceStruct(&pDev->c_public, &keySyms, modMap,
+ (BellProcPtr)vncRingBell, (KbdCtrlProcPtr)NoopDDA);
+ break;
+ case DEVICE_ON:
+ pDev->c_public.on = TRUE;
+ break;
+ case DEVICE_OFF:
+ pDev->c_public.on = FALSE;
+ break;
+ case DEVICE_CLOSE:
+ break;
+ }
+ return Success;
+}
+
+static int vfbMouseProc(DeviceIntPtr pDev, int onoff)
+{
+ BYTE map[6];
+
+ switch (onoff)
+ {
+ case DEVICE_INIT:
+ map[1] = 1;
+ map[2] = 2;
+ map[3] = 3;
+ map[4] = 4;
+ map[5] = 5;
+ InitPointerDeviceStruct(&pDev->c_public, map, 5, GetMotionHistory,
+ (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), 2);
+ break;
+
+ case DEVICE_ON:
+ pDev->c_public.on = TRUE;
+ break;
+
+ case DEVICE_OFF:
+ pDev->c_public.on = FALSE;
+ break;
+
+ case DEVICE_CLOSE:
+ break;
+ }
+ return Success;
+}
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc.mieq 2008-03-04 12:08:05.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/xvnc.cc 2008-03-05 11:52:34.000000000 +0100
@@ -125,6 +125,8 @@ static bool displaySpecified = false;
static bool wellKnownSocketsCreated = false;
static char displayNumStr[16];
+extern void vncRingBell (int percent, int pitch, int duration);
+
#define swapcopy16(_dst, _src) \
if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \
else _dst = _src;
@@ -925,7 +927,7 @@ void InitOutput(ScreenInfo *screenInfo,
int SelectWaitTime = 10000; /* usec */
#endif
-Bool LegalModifier(unsigned int key, DevicePtr pDev)
+Bool LegalModifier(unsigned int key, DeviceIntPtr pDev)
{
return TRUE;
}
@@ -936,223 +938,14 @@ void ProcessInputEvents()
miPointerUpdate();
}
-/* Fairly standard US PC Keyboard */
-
-#define VFB_MIN_KEY 8
-#define VFB_MAX_KEY 255
-#define VFB_MAP_LEN (VFB_MAX_KEY - VFB_MIN_KEY + 1)
-#define KEYSYMS_PER_KEY 2
-KeySym keyboardMap[VFB_MAP_LEN * KEYSYMS_PER_KEY] = {
- NoSymbol, NoSymbol,
- XK_Escape, NoSymbol,
- XK_1, XK_exclam,
- XK_2, XK_at,
- XK_3, XK_numbersign,
- XK_4, XK_dollar,
- XK_5, XK_percent,
- XK_6, XK_asciicircum,
- XK_7, XK_ampersand,
- XK_8, XK_asterisk,
- XK_9, XK_parenleft,
- XK_0, XK_parenright,
- XK_minus, XK_underscore,
- XK_equal, XK_plus,
- XK_BackSpace, NoSymbol,
- XK_Tab, NoSymbol,
- XK_q, XK_Q,
- XK_w, XK_W,
- XK_e, XK_E,
- XK_r, XK_R,
- XK_t, XK_T,
- XK_y, XK_Y,
- XK_u, XK_U,
- XK_i, XK_I,
- XK_o, XK_O,
- XK_p, XK_P,
- XK_bracketleft, XK_braceleft,
- XK_bracketright, XK_braceright,
- XK_Return, NoSymbol,
- XK_Control_L, NoSymbol,
- XK_a, XK_A,
- XK_s, XK_S,
- XK_d, XK_D,
- XK_f, XK_F,
- XK_g, XK_G,
- XK_h, XK_H,
- XK_j, XK_J,
- XK_k, XK_K,
- XK_l, XK_L,
- XK_semicolon, XK_colon,
- XK_apostrophe, XK_quotedbl,
- XK_grave, XK_asciitilde,
- XK_Shift_L, NoSymbol,
- XK_backslash, XK_bar,
- XK_z, XK_Z,
- XK_x, XK_X,
- XK_c, XK_C,
- XK_v, XK_V,
- XK_b, XK_B,
- XK_n, XK_N,
- XK_m, XK_M,
- XK_comma, XK_less,
- XK_period, XK_greater,
- XK_slash, XK_question,
- XK_Shift_R, NoSymbol,
- XK_KP_Multiply, NoSymbol,
- XK_Alt_L, XK_Meta_L,
- XK_space, NoSymbol,
- /*XK_Caps_Lock*/ NoSymbol, NoSymbol,
- XK_F1, NoSymbol,
- XK_F2, NoSymbol,
- XK_F3, NoSymbol,
- XK_F4, NoSymbol,
- XK_F5, NoSymbol,
- XK_F6, NoSymbol,
- XK_F7, NoSymbol,
- XK_F8, NoSymbol,
- XK_F9, NoSymbol,
- XK_F10, NoSymbol,
- XK_Num_Lock, XK_Pointer_EnableKeys,
- XK_Scroll_Lock, NoSymbol,
- XK_KP_Home, XK_KP_7,
- XK_KP_Up, XK_KP_8,
- XK_KP_Prior, XK_KP_9,
- XK_KP_Subtract, NoSymbol,
- XK_KP_Left, XK_KP_4,
- XK_KP_Begin, XK_KP_5,
- XK_KP_Right, XK_KP_6,
- XK_KP_Add, NoSymbol,
- XK_KP_End, XK_KP_1,
- XK_KP_Down, XK_KP_2,
- XK_KP_Next, XK_KP_3,
- XK_KP_Insert, XK_KP_0,
- XK_KP_Delete, XK_KP_Decimal,
- NoSymbol, NoSymbol,
- NoSymbol, NoSymbol,
- NoSymbol, NoSymbol,
- XK_F11, NoSymbol,
- XK_F12, NoSymbol,
- XK_Home, NoSymbol,
- XK_Up, NoSymbol,
- XK_Prior, NoSymbol,
- XK_Left, NoSymbol,
- NoSymbol, NoSymbol,
- XK_Right, NoSymbol,
- XK_End, NoSymbol,
- XK_Down, NoSymbol,
- XK_Next, NoSymbol,
- XK_Insert, NoSymbol,
- XK_Delete, NoSymbol,
- XK_KP_Enter, NoSymbol,
- XK_Control_R, NoSymbol,
- XK_Pause, XK_Break,
- XK_Print, XK_Execute,
- XK_KP_Divide, NoSymbol,
- XK_Alt_R, XK_Meta_R,
-};
-
-static Bool GetMappings(KeySymsPtr pKeySyms, CARD8 *pModMap)
-{
- int i;
-
- for (i = 0; i < MAP_LENGTH; i++)
- pModMap[i] = NoSymbol;
-
- for (i = 0; i < VFB_MAP_LEN; i++) {
- if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Caps_Lock)
- pModMap[i + VFB_MIN_KEY] = LockMask;
- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_L ||
- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Shift_R)
- pModMap[i + VFB_MIN_KEY] = ShiftMask;
- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_L ||
- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Control_R) {
- pModMap[i + VFB_MIN_KEY] = ControlMask;
- }
- else if (keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_L ||
- keyboardMap[i * KEYSYMS_PER_KEY] == XK_Alt_R)
- pModMap[i + VFB_MIN_KEY] = Mod1Mask;
- }
-
- pKeySyms->minKeyCode = VFB_MIN_KEY;
- pKeySyms->maxKeyCode = VFB_MAX_KEY;
- pKeySyms->mapWidth = KEYSYMS_PER_KEY;
- pKeySyms->map = keyboardMap;
-
- return TRUE;
-}
-
-static void vfbBell(int percent, DeviceIntPtr device, pointer ctrl, int class_)
-{
- if (percent > 0)
- vncBell();
-}
-
-static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff)
-{
- KeySymsRec keySyms;
- CARD8 modMap[MAP_LENGTH];
- DevicePtr pDev = (DevicePtr)pDevice;
-
- switch (onoff)
- {
- case DEVICE_INIT:
- GetMappings(&keySyms, modMap);
- InitKeyboardDeviceStruct(pDev, &keySyms, modMap,
- (BellProcPtr)vfbBell, (KbdCtrlProcPtr)NoopDDA);
- break;
- case DEVICE_ON:
- pDev->on = TRUE;
- break;
- case DEVICE_OFF:
- pDev->on = FALSE;
- break;
- case DEVICE_CLOSE:
- break;
- }
- return Success;
-}
-
-static int vfbMouseProc(DeviceIntPtr pDevice, int onoff)
+void DDXRingBell(int percent, int pitch, int duration)
{
- BYTE map[6];
- DevicePtr pDev = (DevicePtr)pDevice;
-
- switch (onoff)
- {
- case DEVICE_INIT:
- map[1] = 1;
- map[2] = 2;
- map[3] = 3;
- map[4] = 4;
- map[5] = 5;
- InitPointerDeviceStruct(pDev, map, 5, miPointerGetMotionEvents,
- (PtrCtrlProcPtr)NoopDDA, miPointerGetMotionBufferSize());
- break;
-
- case DEVICE_ON:
- pDev->on = TRUE;
- break;
-
- case DEVICE_OFF:
- pDev->on = FALSE;
- break;
-
- case DEVICE_CLOSE:
- break;
- }
- return Success;
+ vncRingBell (percent, pitch, duration);
}
-
// InitInput is called after InitExtensions, so we're guaranteed that
// vncExtensionInit() has already been called.
void InitInput(int argc, char *argv[])
{
- DeviceIntPtr p, k;
- p = AddInputDevice(vfbMouseProc, TRUE);
- k = AddInputDevice(vfbKeybdProc, TRUE);
- RegisterPointerDevice(p);
- RegisterKeyboardDevice(k);
- miRegisterPointerDevice(screenInfo.screens[0], p);
- (void)mieqInit ((DevicePtr)k, (DevicePtr)p);
+ mieqInit ();
}

View file

@ -1,41 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.modular-xorg 2007-03-02 15:45:38.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-03-02 15:45:38.000000000 +0100
@@ -36,8 +36,6 @@
extern "C" {
#define class c_class
#define public c_public
-#define xor c_xor
-#define and c_and
#ifdef WIN32
#include <X11/Xwinsock.h>
#endif
@@ -72,11 +70,8 @@
#include "inputstr.h"
#include "keysym.h"
extern int defaultColorVisualClass;
- extern char buildtime[];
#undef class
#undef public
-#undef xor
-#undef and
#ifndef VNC_USE_FB
extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
@@ -221,7 +216,7 @@
void ddxUseMsg()
{
- ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
+ ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
VENDOR_STRING);
ErrorF("-screen scrn WxHxD set screen's width, height, depth\n");
@@ -927,7 +922,7 @@
void InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
{
- ErrorF("\nXvnc %s - built %s\n%s", XVNCVERSION, buildtime, XVNCCOPYRIGHT);
+ ErrorF("\nXvnc %s\n%s", XVNCVERSION, XVNCCOPYRIGHT);
ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
VENDOR_STRING);
wellKnownSocketsCreated = true;

View file

@ -1,11 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx.newfbsize 2006-07-15 12:24:08.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/vncviewer/CConn.cxx 2006-07-15 12:23:29.000000000 +0200
@@ -305,6 +305,8 @@
if (encoding != encodingCopyRect) {
lastServerEncoding = encoding;
}
+ if (encoding == pseudoEncodingDesktopSize)
+ setDesktopSize( r.width(), r.height() );
}
void CConn::endRect(const Rect& r, unsigned int encoding)

View file

@ -1,55 +0,0 @@
--- vnc-4_1_1-unixsrc/unix/vncserver.nohttpd 2005-08-08 15:51:09.000000000 +0100
+++ vnc-4_1_1-unixsrc/unix/vncserver 2005-08-11 12:13:59.000000000 +0100
@@ -58,6 +58,7 @@
# Check command line options
&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
+ "-nohttpd",0,
"-help",0,"-h",0,"--help",0);
&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
@@ -78,6 +79,12 @@
if ($opt{'-pixelformat'}) {
$pixelformat = $opt{'-pixelformat'};
}
+if ($opt{'-nohttpd'}) {
+ $nohttpd = 1;
+ }
+else {
+ $nohttpd = 0;
+}
&CheckGeometryAndDepth();
@@ -137,7 +144,7 @@
$cmd = "Xvnc :$displayNumber";
$cmd .= " -desktop " . &quotedString($desktopName);
-$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles);
+$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd);
$cmd .= " -auth $xauthorityFile";
$cmd .= " -geometry $geometry" if ($geometry);
$cmd .= " -depth $depth" if ($depth);
@@ -413,7 +420,7 @@
sub Usage
{
- die("\nusage: $prog [:<number>] [-name <desktop-name>] [-depth <depth>]\n".
+ die("\nusage: $prog [:<number>] [-nohttpd] [-name <desktop-name>] [-depth <depth>]\n".
" [-geometry <width>x<height>]\n".
" [-pixelformat rgbNNN|bgrNNN]\n".
" <Xvnc-options>...\n\n".
--- vnc-4_1_1-unixsrc/unix/vncserver.man.nohttpd 2005-08-11 12:17:46.000000000 +0100
+++ vnc-4_1_1-unixsrc/unix/vncserver.man 2005-08-11 12:19:35.000000000 +0100
@@ -77,6 +77,11 @@
must be 8 bits deep.
.TP
+.B \-nohttpd
+Do not instruct Xvnc to run a mini-httpd if the VNC Java applet is
+found.
+
+.TP
.B \-kill :\fIdisplay#\fP
This kills a VNC desktop previously started with vncserver. It does this by
killing the Xvnc process, whose process ID is stored in the file

View file

@ -1,24 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.s390 2007-09-21 11:11:58.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-09-21 11:12:46.000000000 +0200
@@ -27,19 +27,8 @@ Xvnc_SOURCES = \
$(top_srcdir)/fb/fbcmap.c
Xvnc_LDADD = $(XORG_CORE_LIBS) \
- $(XORG_LIBS) \
+ $(XVFB_LIBS) \
$(XSERVER_LIBS) \
- ../../fb/libfb.la \
- ../../mi/libminimi.la \
- ../../render/librender.la \
- ../../xkb/libxkbstubs.la \
- ../../dbe/libdbe.la \
- ../../Xext/libXext.la \
- ../../XTrap/libxtrap.la \
- ../../record/librecord.la \
- ../xfree86/os-support/libxorgos.la \
- ../../os/libos.la \
- ../xfree86/common/libcommon.la \
-lX11 \
libvnccommon.la \
../../../../common/rfb/librfb.la

View file

@ -1,109 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc.paint 2008-03-06 14:54:52.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncHooks.cc 2008-03-06 14:56:54.000000000 +0100
@@ -72,8 +72,6 @@ typedef struct {
CloseScreenProcPtr CloseScreen;
CreateGCProcPtr CreateGC;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
RestoreAreasProcPtr RestoreAreas;
@@ -106,10 +104,6 @@ static DevPrivateKey vncHooksGCPrivateKe
static Bool vncHooksCloseScreen(int i, ScreenPtr pScreen);
static Bool vncHooksCreateGC(GCPtr pGC);
-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
- int what);
-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
- int what);
static void vncHooksCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionPtr pOldRegion);
static void vncHooksClearToBackground(WindowPtr pWin, int x, int y, int w,
@@ -231,8 +225,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
vncHooksScreen->CloseScreen = pScreen->CloseScreen;
vncHooksScreen->CreateGC = pScreen->CreateGC;
- vncHooksScreen->PaintWindowBackground = pScreen->PaintWindowBackground;
- vncHooksScreen->PaintWindowBorder = pScreen->PaintWindowBorder;
vncHooksScreen->CopyWindow = pScreen->CopyWindow;
vncHooksScreen->ClearToBackground = pScreen->ClearToBackground;
vncHooksScreen->RestoreAreas = pScreen->RestoreAreas;
@@ -253,8 +245,6 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
pScreen->CloseScreen = vncHooksCloseScreen;
pScreen->CreateGC = vncHooksCreateGC;
- pScreen->PaintWindowBackground = vncHooksPaintWindowBackground;
- pScreen->PaintWindowBorder = vncHooksPaintWindowBorder;
pScreen->CopyWindow = vncHooksCopyWindow;
pScreen->ClearToBackground = vncHooksClearToBackground;
pScreen->RestoreAreas = vncHooksRestoreAreas;
@@ -297,8 +287,6 @@ static Bool vncHooksCloseScreen(int i, S
SCREEN_UNWRAP(pScreen_, CloseScreen);
pScreen->CreateGC = vncHooksScreen->CreateGC;
- pScreen->PaintWindowBackground = vncHooksScreen->PaintWindowBackground;
- pScreen->PaintWindowBorder = vncHooksScreen->PaintWindowBorder;
pScreen->CopyWindow = vncHooksScreen->CopyWindow;
pScreen->ClearToBackground = vncHooksScreen->ClearToBackground;
pScreen->RestoreAreas = vncHooksScreen->RestoreAreas;
@@ -333,38 +321,6 @@ static Bool vncHooksCreateGC(GCPtr pGC)
return ret;
}
-// PaintWindowBackground - changed region is the given region
-
-static void vncHooksPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion,
- int what)
-{
- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBackground);
-
- RegionHelper changed(pScreen, pRegion);
-
- (*pScreen->PaintWindowBackground) (pWin, pRegion, what);
-
- vncHooksScreen->desktop->add_changed(changed.reg);
-
- SCREEN_REWRAP(PaintWindowBackground);
-}
-
-// PaintWindowBorder - changed region is the given region
-
-static void vncHooksPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion,
- int what)
-{
- SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder);
-
- RegionHelper changed(pScreen, pRegion);
-
- (*pScreen->PaintWindowBorder) (pWin, pRegion, what);
-
- vncHooksScreen->desktop->add_changed(changed.reg);
-
- SCREEN_REWRAP(PaintWindowBorder);
-}
-
// CopyWindow - destination of the copy is the old region, clipped by
// borderClip, translated by the delta. This call only does the copy - it
// doesn't affect any other bits.
@@ -534,16 +490,9 @@ static void vncHooksValidateGC(GCPtr pGC
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
u.vncHooksGC->wrappedOps = 0;
- if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr)pDrawable)->viewable) {
- WindowPtr pWin = (WindowPtr)pDrawable;
- RegionPtr pRegion = &pWin->clipList;
-
- if (pGC->subWindowMode == IncludeInferiors)
- pRegion = &pWin->borderClip;
- if (REGION_NOTEMPTY(pDrawable->pScreen, pRegion)) {
- u.vncHooksGC->wrappedOps = pGC->ops;
- DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
- }
+ if (pDrawable->type == DRAWABLE_WINDOW || pDrawable->type == DRAWABLE_PIXMAP) {
+ u.vncHooksGC->wrappedOps = pGC->ops;
+ DBGPRINT((stderr,"vncHooksValidateGC: wrapped GC ops\n"));
}
}

View file

@ -1,132 +0,0 @@
--- a/bin/xorg/hw/vnc/vncHooks.cc Mon Jan 21 17:29:11 2008 +0100
+++ b/bin/xorg/hw/vnc/vncHooks.cc Thu Jan 24 09:50:48 2008 +0100
@@ -86,9 +86,15 @@ typedef struct {
GCOps *wrappedOps;
} vncHooksGCRec, *vncHooksGCPtr;
-static int vncHooksScreenIndex;
-static int vncHooksGCIndex;
+static DevPrivateKey vncHooksScrPrivateKey = &vncHooksScrPrivateKey;
+static DevPrivateKey vncHooksGCPrivateKey = &vncHooksGCPrivateKey;
+#define vncHooksScreenPrivate(scrn) \
+ (vncHooksScreenPtr) dixLookupPrivate (&(scrn)->devPrivates, \
+ vncHooksScrPrivateKey)
+#define vncHooksGCPrivate(pGC) \
+ (vncHooksGCPtr) dixLookupPrivate (&(pGC)->devPrivates, \
+ vncHooksGCPrivateKey)
// screen functions
@@ -209,26 +215,11 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
if (vncHooksGeneration != serverGeneration) {
vncHooksGeneration = serverGeneration;
- vncHooksScreenIndex = AllocateScreenPrivateIndex();
- if (vncHooksScreenIndex < 0) {
- ErrorF("vncHooksInit: AllocateScreenPrivateIndex failed\n");
- return FALSE;
- }
-
- vncHooksGCIndex = AllocateGCPrivateIndex();
- if (vncHooksGCIndex < 0) {
- ErrorF("vncHooksInit: AllocateGCPrivateIndex failed\n");
- return FALSE;
- }
- }
-
- if (!AllocateGCPrivate(pScreen, vncHooksGCIndex, sizeof(vncHooksGCRec))) {
- ErrorF("vncHooksInit: AllocateGCPrivate failed\n");
- return FALSE;
+ if (!dixRequestPrivate (vncHooksGCPrivateKey, sizeof (vncHooksGCRec)))
+ return FALSE;
}
vncHooksScreen = (vncHooksScreenPtr)xnfalloc(sizeof(vncHooksScreenRec));
- pScreen->devPrivates[vncHooksScreenIndex].ptr = (pointer)vncHooksScreen;
vncHooksScreen->desktop = desktop;
@@ -266,6 +257,8 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
pScreen->DisplayCursor = vncHooksDisplayCursor;
pScreen->BlockHandler = vncHooksBlockHandler;
+ dixSetPrivate (&pScreen->devPrivates, vncHooksScrPrivateKey, vncHooksScreen);
+
return TRUE;
}
@@ -281,11 +274,10 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
// distinct type, so it would have to use templates, and it's not worth that
// much pain.
-#define SCREEN_UNWRAP(scrn,field) \
- ScreenPtr pScreen = scrn; \
- vncHooksScreenPtr vncHooksScreen \
- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \
- pScreen->field = vncHooksScreen->field; \
+#define SCREEN_UNWRAP(scrn,field) \
+ ScreenPtr pScreen = scrn; \
+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (scrn); \
+ pScreen->field = vncHooksScreen->field; \
DBGPRINT((stderr,"vncHooks" #field " called\n"));
#define SCREEN_REWRAP(field) pScreen->field = vncHooks##field;
@@ -322,8 +314,7 @@ static Bool vncHooksCreateGC(GCPtr pGC)
{
SCREEN_UNWRAP(pGC->pScreen, CreateGC);
- vncHooksGCPtr vncHooksGC
- = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
+ vncHooksGCPtr vncHooksGC = vncHooksGCPrivate (pGC);
Bool ret = (*pScreen->CreateGC) (pGC);
@@ -507,7 +498,7 @@ class GCFuncUnwrapper {
class GCFuncUnwrapper {
public:
GCFuncUnwrapper(GCPtr pGC_) : pGC(pGC_) {
- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
+ vncHooksGC = vncHooksGCPrivate (pGC);
pGC->funcs = vncHooksGC->wrappedFuncs;
if (vncHooksGC->wrappedOps)
pGC->ops = vncHooksGC->wrappedOps;
@@ -592,7 +583,7 @@ public:
GCOpUnwrapper(DrawablePtr pDrawable, GCPtr pGC_)
: pGC(pGC_), pScreen(pDrawable->pScreen)
{
- vncHooksGC = (vncHooksGCPtr)pGC->devPrivates[vncHooksGCIndex].ptr;
+ vncHooksGC = vncHooksGCPrivate (pGC);
oldFuncs = pGC->funcs;
pGC->funcs = vncHooksGC->wrappedFuncs;
pGC->ops = vncHooksGC->wrappedOps;
@@ -611,8 +602,7 @@ public:
#define GC_OP_UNWRAPPER(pDrawable, pGC, name) \
GCOpUnwrapper u(pDrawable, pGC); \
ScreenPtr pScreen = (pDrawable)->pScreen; \
- vncHooksScreenPtr vncHooksScreen \
- = ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr); \
+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen); \
DBGPRINT((stderr,"vncHooks" #name " called\n"));
@@ -1511,8 +1501,7 @@ static void vncHooksComposite(CARD8 op,
INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
{
ScreenPtr pScreen = pDst->pDrawable->pScreen;
- vncHooksScreenPtr vncHooksScreen = \
- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen);
PictureScreenPtr ps = GetPictureScreen(pScreen);
BoxRec box;
@@ -1534,8 +1523,7 @@ static void vncHooksGlyphs(CARD8 op, Pic
GlyphListPtr list, GlyphPtr *glyphs)
{
ScreenPtr pScreen = pDst->pDrawable->pScreen;
- vncHooksScreenPtr vncHooksScreen = \
- ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
+ vncHooksScreenPtr vncHooksScreen = vncHooksScreenPrivate (pScreen);
PictureScreenPtr ps = GetPictureScreen(pScreen);
int x, y;
int n;

View file

@ -1,224 +0,0 @@
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc.render 2007-06-07 15:50:16.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/vncHooks.cc 2007-06-07 15:57:54.000000000 +0200
@@ -20,6 +20,10 @@
#include "XserverDesktop.h"
#include "vncHooks.h"
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
extern "C" {
#define class c_class
#define private c_private
@@ -29,6 +33,9 @@ extern "C" {
#include "regionstr.h"
#include "dixfontstr.h"
#include "colormapst.h"
+#ifdef RENDER
+#include "../../render/picturestr.h"
+#endif
#ifdef GC_HAS_COMPOSITE_CLIP
#define COMPOSITE_CLIP(gc) ((gc)->pCompositeClip)
@@ -74,6 +81,10 @@ typedef struct {
StoreColorsProcPtr StoreColors;
DisplayCursorProcPtr DisplayCursor;
ScreenBlockHandlerProcPtr BlockHandler;
+#ifdef RENDER
+ CompositeProcPtr Composite;
+ GlyphsProcPtr Glyphs;
+#endif
} vncHooksScreenRec, *vncHooksScreenPtr;
typedef struct {
@@ -105,6 +116,15 @@ static Bool vncHooksDisplayCursor(Screen
static void vncHooksBlockHandler(int i, pointer blockData, pointer pTimeout,
pointer pReadmask);
+// RENDER support
+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
+ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
+
+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
+ GlyphListPtr list, GlyphPtr *glyphs);
+
// GC "funcs"
static void vncHooksValidateGC(GCPtr pGC, unsigned long changes,
@@ -230,6 +250,16 @@ Bool vncHooksInit(ScreenPtr pScreen, Xse
vncHooksScreen->DisplayCursor = pScreen->DisplayCursor;
vncHooksScreen->BlockHandler = pScreen->BlockHandler;
+#ifdef RENDER
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+ if (ps) {
+ vncHooksScreen->Composite = ps->Composite;
+ vncHooksScreen->Glyphs = ps->Glyphs;
+ ps->Composite = vncHooksComposite;
+ ps->Glyphs = vncHooksGlyphs;
+ }
+#endif
+
pScreen->CloseScreen = vncHooksCloseScreen;
pScreen->CreateGC = vncHooksCreateGC;
pScreen->PaintWindowBackground = vncHooksPaintWindowBackground;
@@ -1473,3 +1503,80 @@ static void vncHooksPushPixels(GCPtr pGC
vncHooksScreen->desktop->add_changed(changed.reg);
}
+
+#ifdef RENDER
+#define RENDER_MAKE_BOX(pDrawable,X,Y,W,H) { \
+ box.x1 = X + pDrawable->x; \
+ box.x2 = X + pDrawable->x + W; \
+ box.y1 = Y + pDrawable->y; \
+ box.y2 = Y + pDrawable->y + H; \
+}
+
+static void vncHooksComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
+ INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask,
+ INT16 xDst, INT16 yDst, CARD16 width, CARD16 height)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ vncHooksScreenPtr vncHooksScreen = \
+ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+ BoxRec box;
+
+ ps->Composite = vncHooksScreen->Composite;
+ (*ps->Composite)(op, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height);
+ ps->Composite = vncHooksComposite;
+
+ if (pDst->pDrawable->type == DRAWABLE_WINDOW) {
+ RENDER_MAKE_BOX(pDst->pDrawable, xDst, yDst, width, height);
+ RegionHelper changed(pScreen, &box, 0);
+ vncHooksScreen->desktop->add_changed(changed.reg);
+ }
+}
+
+
+static void vncHooksGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
+ PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
+ GlyphListPtr list, GlyphPtr *glyphs)
+{
+ ScreenPtr pScreen = pDst->pDrawable->pScreen;
+ vncHooksScreenPtr vncHooksScreen = \
+ ((vncHooksScreenPtr)pScreen->devPrivates[vncHooksScreenIndex].ptr);
+ PictureScreenPtr ps = GetPictureScreen(pScreen);
+ int x, y;
+ int n;
+ GlyphPtr glyph;
+ BoxRec box;
+
+ ps->Glyphs = vncHooksScreen->Glyphs;
+ (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc,
+ nlist, list, glyphs);
+ ps->Glyphs = vncHooksGlyphs;
+
+ if (pDst->pDrawable->type == DRAWABLE_WINDOW)
+ {
+ x = xSrc;
+ y = ySrc;
+ while (nlist--)
+ {
+ x += list->xOff;
+ y += list->yOff;
+ n = list->len;
+ while (n--)
+ {
+ glyph = *glyphs++;
+ RENDER_MAKE_BOX(pDst->pDrawable,
+ x - glyph->info.x, y - glyph->info.y,
+ glyph->info.width, glyph->info.height);
+ RegionHelper changed(pScreen, &box, 0);
+ vncHooksScreen->desktop->add_changed(changed.reg);
+
+ x += glyph->info.xOff;
+ y += glyph->info.yOff;
+ }
+ list++;
+ }
+ }
+}
+#endif
+
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.render 2007-06-07 15:49:32.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2007-06-07 15:49:32.000000000 +0200
@@ -130,6 +130,7 @@ static vfbScreenInfo vfbScreens[MAXSCREE
static Bool vfbPixmapDepths[33];
static char needswap = 0;
static int lastScreen = -1;
+static Bool Render = TRUE;
static bool displaySpecified = false;
static bool wellKnownSocketsCreated = false;
@@ -221,6 +222,10 @@ extern "C" {
VENDOR_STRING);
ErrorF("-screen scrn WxHxD set screen's width, height, depth\n");
ErrorF("-pixdepths list-of-int support given pixmap depths\n");
+#ifdef RENDER
+ ErrorF("+/-render turn on/off RENDER extension support"
+ "(default on)\n");
+#endif
ErrorF("-linebias n adjust thin line pixelization\n");
ErrorF("-blackpixel n pixel value for black\n");
ErrorF("-whitepixel n pixel value for white\n");
@@ -317,6 +322,20 @@ int ddxProcessArgument(int argc, char *a
return ret;
}
+#ifdef RENDER
+ if (strcmp (argv[i], "+render") == 0) /* +render */
+ {
+ Render = TRUE;
+ return 1;
+ }
+
+ if (strcmp (argv[i], "-render") == 0) /* -render */
+ {
+ Render = FALSE;
+ return 1;
+ }
+#endif
+
if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */
{
Pixel pix;
@@ -817,7 +836,12 @@ static Bool vfbScreenInit(int index, Scr
if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
return FALSE;
-#else
+
+#ifdef RENDER
+ if (ret && Render)
+ fbPictureInit(pScreen, 0, 0);
+#endif /* RENDER */
+#else /* VNC_USE_FB */
switch (pvfb->bitsPerPixel)
{
case 1:
@@ -938,6 +962,19 @@ void InitOutput(ScreenInfo *screenInfo,
vfbPixmapDepths[vfbScreens[i].depth] = TRUE;
}
+#ifdef RENDER
+ /* RENDER needs a good set of pixmaps. */
+ if (Render) {
+ vfbPixmapDepths[1] = TRUE;
+ vfbPixmapDepths[4] = TRUE;
+ vfbPixmapDepths[8] = TRUE;
+/* vfbPixmapDepths[15] = TRUE; */
+ vfbPixmapDepths[16] = TRUE;
+ vfbPixmapDepths[24] = TRUE;
+ vfbPixmapDepths[32] = TRUE;
+ }
+#endif
+
for (i = 1; i <= 32; i++)
{
if (vfbPixmapDepths[i])

View file

@ -1,21 +0,0 @@
--- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.restart 2005-03-04 09:02:21.000000000 +0000
+++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx 2005-03-04 09:03:05.000000000 +0000
@@ -140,10 +140,14 @@
}
// Attempt to connect to the remote host
- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
- int e = errorNumber;
- closesocket(sock);
- throw SocketException("unable to connect to host", e);
+ for (;;) {
+ if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
+ int e = errorNumber;
+ if (e == EINTR)
+ continue;
+ closesocket(sock);
+ throw SocketException("unable to connect to host", e);
+ } else break;
}
// Disable Nagle's algorithm, to reduce latency

View file

@ -1,33 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/vncserver.rh212985 vnc-4_1_2-unixsrc/unix/vncserver
--- vnc-4_1_2-unixsrc/unix/vncserver.rh212985 2008-07-16 13:55:29.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/vncserver 2008-07-16 14:17:53.000000000 +0200
@@ -168,11 +168,25 @@ $cmd .= " >> " . &quotedString($desktopL
# Run $cmd and record the process ID.
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
-system("$cmd & echo \$! >$pidFile");
+system(
+"rm -f $pidFile
+ $cmd &
+ PID_TEMP=\$!
+ PID_NUM=\$PID_TEMP
+
+ # Give Xvnc a chance to start up
+
+ sleep 3;
+
+ if ps -p \$PID_NUM -o comm= | grep -q Xvnc; then
+ echo \$PID_NUM > $pidFile
+ fi"
+);
-# Give Xvnc a chance to start up
-
-sleep(3);
+if (!(-e "$pidFile")) {
+ warn "Unable to start Xvnc, exiting\n";
+ exit;
+}
warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n";

View file

@ -1,69 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.h
--- vnc-4_1_2-unixsrc/unix/tx/TXViewport.h.scrollbars 2008-03-14 12:44:19.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.h 2008-03-14 12:44:19.000000000 +0100
@@ -77,7 +77,8 @@ private:
int xOff, yOff;
rfb::Timer bumpScrollTimer;
bool bumpScroll;
- bool needScrollbars;
+ bool needXScrollbar;
+ bool needYScrollbar;
int bumpScrollX, bumpScrollY;
};
#endif
diff -up vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx
--- vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx.scrollbars 2008-03-14 12:44:19.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/tx/TXViewport.cxx 2008-03-14 13:08:30.000000000 +0100
@@ -25,7 +25,8 @@
TXViewport::TXViewport(Display* dpy_, int w, int h, TXWindow* parent_)
: TXWindow(dpy_, w, h, parent_), child(0), hScrollbar(0),
vScrollbar(0), scrollbarSize(15), xOff(0), yOff(0), bumpScrollTimer(this),
- bumpScroll(false), needScrollbars(false), bumpScrollX(0), bumpScrollY(0)
+ bumpScroll(false), needXScrollbar(false), needYScrollbar(false),
+ bumpScrollX(0), bumpScrollY(0)
{
clipper = new TXWindow(dpy, width()-scrollbarSize, height()-scrollbarSize,
this);
@@ -132,13 +133,23 @@ bool TXViewport::handleTimeout(rfb::Time
void TXViewport::resizeNotify()
{
- needScrollbars = (!bumpScroll &&
- (width() < child->width() || height() < child->height()) &&
- (width() > scrollbarSize && height() > scrollbarSize));
- if (needScrollbars) {
+ needXScrollbar = (!bumpScroll && width() < child->width() &&
+ height() > scrollbarSize && width() > scrollbarSize);
+ needYScrollbar = (!bumpScroll && height() < child->height() &&
+ height() > scrollbarSize && width() > scrollbarSize);
+
+ if (needXScrollbar && needYScrollbar) {
clipper->resize(width()-scrollbarSize, height()-scrollbarSize);
hScrollbar->map();
vScrollbar->map();
+ } else if (needXScrollbar) {
+ clipper->resize(width(), height()-scrollbarSize);
+ hScrollbar->map();
+ vScrollbar->unmap();
+ } else if (needYScrollbar) {
+ clipper->resize(width()-scrollbarSize, height());
+ hScrollbar->unmap();
+ vScrollbar->map();
} else {
clipper->resize(width(), height());
hScrollbar->unmap();
@@ -147,10 +158,13 @@ void TXViewport::resizeNotify()
setOffset(xOff, yOff);
- if (needScrollbars) {
+ if (needXScrollbar) {
hScrollbar->move(0, height()-scrollbarSize);
hScrollbar->resize(width()-scrollbarSize, scrollbarSize);
hScrollbar->set(child->width(), -xOff, width()-scrollbarSize);
+ }
+
+ if (needYScrollbar) {
vScrollbar->move(width()-scrollbarSize, 0);
vScrollbar->resize(scrollbarSize, height()-scrollbarSize);
vScrollbar->set(child->height(), -yOff, height()-scrollbarSize);

View file

@ -1,10 +0,0 @@
--- vnc-4_1_1-unixsrc/unix/x0vncserver/x0vncserver.cxx.select 2005-12-05 10:02:30.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/x0vncserver/x0vncserver.cxx 2005-12-05 10:02:32.000000000 +0000
@@ -302,6 +302,7 @@
fd_set rfds;
std::list<Socket*> sockets;
std::list<Socket*>::iterator i;
+ tv.tv_usec = tv.tv_sec = 0;
// Process any incoming X events
TXWindow::handleXEvents(dpy);

View file

@ -1,78 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc
--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc.selections 2008-03-10 15:34:24.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/vncExtInit.cc 2008-03-11 10:55:44.000000000 +0100
@@ -62,11 +62,9 @@ extern "C" {
static void SendSelectionChangeEvent(Atom selection);
static int ProcVncExtDispatch(ClientPtr client);
static int SProcVncExtDispatch(ClientPtr client);
+ static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args);
extern char *display;
-
- extern Selection *CurrentSelections;
- extern int NumCurrentSelections;
}
using namespace rfb;
@@ -99,7 +97,6 @@ struct VncInputSelect {
VncInputSelect* next;
};
-static int nPrevSelections = 0;
static TimeStamp* prevSelectionTimes = 0;
static int vncErrorBase = 0;
@@ -147,6 +144,10 @@ void vncExtensionInit()
FatalError("AddCallback failed\n");
}
+ if (!AddCallback(&SelectionCallback, vncSelectionCallback, 0)) {
+ FatalError("Add selection callback failed\n");
+ }
+
try {
if (!initialised) {
rfb::initStdIOLoggers();
@@ -212,6 +213,14 @@ static void vncResetProc(ExtensionEntry*
{
}
+static void vncSelectionCallback(CallbackListPtr *callbacks, pointer data, pointer args)
+{
+ SelectionInfoRec *info = (SelectionInfoRec *) args;
+ Selection *selection = info->selection;
+
+ SendSelectionChangeEvent(selection->selection);
+}
+
//
// vncBlockHandler - called just before the X server goes into select(). Call
// on to the block handler for each desktop. Then check whether any of the
@@ -227,27 +236,6 @@ static void vncBlockHandler(pointer data
desktop[scr]->blockHandler(fds);
}
}
-
- if (nPrevSelections != NumCurrentSelections) {
- prevSelectionTimes
- = (TimeStamp*)xnfrealloc(prevSelectionTimes,
- NumCurrentSelections * sizeof(TimeStamp));
- for (int i = nPrevSelections; i < NumCurrentSelections; i++) {
- prevSelectionTimes[i].months = 0;
- prevSelectionTimes[i].milliseconds = 0;
- }
- nPrevSelections = NumCurrentSelections;
- }
- for (int i = 0; i < NumCurrentSelections; i++) {
- if (CurrentSelections[i].lastTimeChanged.months
- != prevSelectionTimes[i].months ||
- CurrentSelections[i].lastTimeChanged.milliseconds
- != prevSelectionTimes[i].milliseconds)
- {
- SendSelectionChangeEvent(CurrentSelections[i].selection);
- prevSelectionTimes[i] = CurrentSelections[i].lastTimeChanged;
- }
- }
}
static void vncWakeupHandler(pointer data, int nfds, pointer readmask)

View file

@ -1,87 +0,0 @@
diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
--- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2006-05-12 18:50:32.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2008-07-16 13:28:27.000000000 +0200
@@ -48,8 +48,12 @@ extern "C" {
#include "X11/Xos.h"
#include "scrnintstr.h"
#include "servermd.h"
+#ifdef VNC_USE_FB
+#include "fb.h"
+#else
#define PSZ 8
#include "cfb.h"
+#endif
#include "mi.h"
#include "mibstore.h"
#include "colormapst.h"
@@ -73,6 +77,7 @@ extern "C" {
#undef public
#undef xor
#undef and
+#ifndef VNC_USE_FB
extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
extern Bool cfb16CreateGC(GCPtr);
@@ -83,6 +88,7 @@ extern "C" {
unsigned long, char*);
extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
unsigned long, char*);
+#endif
}
#define XVNCVERSION "Free Edition 4.1.3"
@@ -482,7 +488,7 @@ CARD32 GetTimeInMillis()
}
#endif
-
+#ifndef VNC_USE_FB
static Bool vfbMultiDepthCreateGC(GCPtr pGC)
{
switch (vfbBitsPerPixel(pGC->depth))
@@ -541,6 +547,7 @@ vfbMultiDepthGetImage(DrawablePtr pDrawa
break;
}
}
+#endif
static ColormapPtr InstalledMaps[MAXSCREENS];
@@ -811,6 +818,11 @@ static Bool vfbScreenInit(int index, Scr
defaultColorVisualClass
= (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
+#ifdef VNC_USE_FB
+ if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
+ return FALSE;
+#else
switch (pvfb->bitsPerPixel)
{
case 1:
@@ -838,6 +850,7 @@ static Bool vfbScreenInit(int index, Scr
pScreen->CreateGC = vfbMultiDepthCreateGC;
pScreen->GetImage = vfbMultiDepthGetImage;
pScreen->GetSpans = vfbMultiDepthGetSpans;
+#endif
pScreen->InstallColormap = vfbInstallColormap;
pScreen->UninstallColormap = vfbUninstallColormap;
@@ -883,6 +896,9 @@ static Bool vfbScreenInit(int index, Scr
}
}
+#ifdef VNC_USE_FB
+ ret = fbCreateDefColormap(pScreen);
+#else
if (pvfb->bitsPerPixel == 1)
{
ret = mfbCreateDefColormap(pScreen);
@@ -891,6 +907,7 @@ static Bool vfbScreenInit(int index, Scr
{
ret = cfbCreateDefColormap(pScreen);
}
+#endif
miSetZeroLineBias(pScreen, pvfb->lineBias);

View file

@ -1,190 +0,0 @@
diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx
--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.via 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-07-16 13:29:29.000000000 +0200
@@ -54,6 +54,29 @@ using namespace rdr;
static rfb::LogWriter vlog("TcpSocket");
+/* Tunnelling support. */
+int network::findFreeTcpPort (void)
+{
+ int sock, port;
+ struct sockaddr_in addr;
+ memset(&addr, 0, sizeof(addr));
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = INADDR_ANY;
+
+ if ((sock = socket (AF_INET, SOCK_STREAM, 0)) < 0)
+ throw SocketException ("unable to create socket", errorNumber);
+
+ for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) {
+ addr.sin_port = htons ((unsigned short) port);
+ if (bind (sock, (struct sockaddr *)&addr, sizeof (addr)) == 0) {
+ close (sock);
+ return port;
+ }
+ }
+ throw SocketException ("no free port in range", 0);
+ return 0;
+}
+
// -=- Socket initialisation
static bool socketsInitialised = false;
diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via vnc-4_1_2-unixsrc/common/network/TcpSocket.h
--- vnc-4_1_2-unixsrc/common/network/TcpSocket.h.via 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.h 2008-07-16 13:29:29.000000000 +0200
@@ -32,8 +32,14 @@
#include <list>
+/* Tunnelling support. */
+#define TUNNEL_PORT_OFFSET 5500
+
namespace network {
+ /* Tunnelling support. */
+ int findFreeTcpPort (void);
+
class TcpSocket : public Socket {
public:
TcpSocket(int sock, bool close=true);
diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx
--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx.via 2006-05-15 18:56:20.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.cxx 2008-07-16 13:32:28.000000000 +0200
@@ -41,6 +41,7 @@ rfb::LogWriter vlog("main");
using namespace network;
using namespace rfb;
+using namespace std;
IntParameter pointerEventInterval("PointerEventInterval",
"Time in milliseconds to rate-limit"
@@ -95,6 +96,9 @@ BoolParameter listenMode("listen", "List
StringParameter geometry("geometry", "X geometry specification", "");
StringParameter displayname("display", "The X display", "");
+/* Support for tunnelling */
+StringParameter via("via", "Gateway to tunnel via", "");
+
char aboutText[256];
char* programName;
extern char buildtime[];
@@ -157,6 +161,61 @@ static void usage()
exit(1);
}
+/* Tunnelling support. */
+static void
+interpretViaParam (char **gatewayHost, char **remoteHost,
+ int *remotePort, char **vncServerName,
+ int localPort)
+{
+ const int SERVER_PORT_OFFSET = 5900;
+ char *pos = strchr (*vncServerName, ':');
+ if (pos == NULL)
+ *remotePort = SERVER_PORT_OFFSET;
+ else {
+ int portOffset = SERVER_PORT_OFFSET;
+ size_t len;
+ *pos++ = '\0';
+ len = strlen (pos);
+ if (*pos == ':') {
+ /* Two colons is an absolute port number, not an offset. */
+ pos++;
+ len--;
+ portOffset = 0;
+ }
+ if (!len || strspn (pos, "-0123456789") != len )
+ usage ();
+ *remotePort = atoi (pos) + portOffset;
+ }
+
+ if (**vncServerName != '\0')
+ *remoteHost = *vncServerName;
+
+ *gatewayHost = strDup (via.getValueStr ());
+ *vncServerName = new char[50];
+ sprintf (*vncServerName, "localhost::%d", localPort);
+}
+
+static void
+createTunnel (const char *gatewayHost, const char *remoteHost,
+ int remotePort, int localPort)
+{
+ char *cmd = getenv ("VNC_VIA_CMD");
+ char *percent;
+ char lport[10], rport[10];
+ sprintf (lport, "%d", localPort);
+ sprintf (rport, "%d", remotePort);
+ setenv ("G", gatewayHost, 1);
+ setenv ("H", remoteHost, 1);
+ setenv ("R", rport, 1);
+ setenv ("L", lport, 1);
+ if (!cmd)
+ cmd = "/usr/bin/ssh -f -L \"$L\":\"$H\":\"$R\" \"$G\" sleep 20";
+ /* Compatibility with TightVNC's method. */
+ while ((percent = strchr (cmd, '%')) != NULL)
+ *percent = '$';
+ system (cmd);
+}
+
int main(int argc, char** argv)
{
sprintf(aboutText, "VNC Viewer Free Edition 4.1.3 for X - built %s\n"
@@ -190,8 +249,6 @@ int main(int argc, char** argv)
usage();
}
- if (vncServerName)
- usage();
vncServerName = argv[i];
}
@@ -207,6 +264,19 @@ int main(int argc, char** argv)
vlog.error("Could not create .vnc directory: environment variable $HOME not set.");
try {
+ /* Tunnelling support. */
+ if (strlen (via.getValueStr ()) > 0) {
+ char *gatewayHost = "";
+ char *remoteHost = "localhost";
+ int localPort = findFreeTcpPort ();
+ int remotePort;
+ if (!vncServerName)
+ usage();
+ interpretViaParam (&gatewayHost, &remoteHost, &remotePort,
+ &vncServerName, localPort);
+ createTunnel (gatewayHost, remoteHost, remotePort, localPort);
+ }
+
Socket* sock = 0;
if (listenMode) {
diff -up vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man
--- vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man.via 2005-03-03 14:10:40.000000000 +0100
+++ vnc-4_1_2-unixsrc/unix/vncviewer/vncviewer.man 2008-07-16 13:29:29.000000000 +0200
@@ -174,6 +174,23 @@ This option specifies the key which brin
specified as an X11 keysym name (these can be obtained by removing the XK_
prefix from the entries in "/usr/include/X11/keysymdef.h"). Default is F8.
+.TP
+\fB\-via\fR \fIgateway\fR
+Automatically create encrypted TCP tunnel to the \fIgateway\fR machine
+before connection, connect to the \fIhost\fR through that tunnel
+(TightVNC\-specific). By default, this option invokes SSH local port
+forwarding, assuming that SSH client binary can be accessed as
+/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host
+machine name should be specified as known to the gateway machine, e.g.
+"localhost" denotes the \fIgateway\fR, not the machine where vncviewer
+was launched. The environment variable \fIVNC_VIA_CMD\fR can override
+the default tunnel command of
+\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR. The tunnel
+command is executed with the environment variables \fIL\fR, \fIH\fR,
+\fIR\fR, and \fIG\fR taken the values of the local port number, the remote
+host, the port number on the remote host, and the gateway machine
+respectively.
+
.SH SEE ALSO
.BR Xvnc (1),
.BR vncpasswd (1),

View file

@ -1,115 +0,0 @@
--- vnc-4_1_1-unixsrc/unix/tx/TXWindow.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/tx/TXWindow.h 2005-12-01 17:55:38.000000000 +0000
@@ -183,6 +183,9 @@
Display* const dpy;
+ TXEventHandler* eventHandler;
+ long eventMask;
+
int xPad, yPad, bevel;
private:
@@ -195,9 +198,7 @@
TXWindow* parent;
Window win_;
int width_, height_;
- TXEventHandler* eventHandler;
TXDeleteWindowCallback* dwc;
- long eventMask;
XSizeHints sizeHints;
std::map<Atom,Time> selectionOwnTime;
std::map<Atom,bool> selectionOwner_;
--- vnc-4_1_1-unixsrc/unix/tx/TXViewport.cxx.viewer-reparent 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/tx/TXViewport.cxx 2005-12-01 17:55:38.000000000 +0000
@@ -43,6 +43,21 @@
delete vScrollbar;
}
+void TXViewport::reparent(long embed_window)
+{
+ XReparentWindow(dpy, win(), (Window)embed_window, 0, 0);
+ XSelectInput(dpy, embed_window, child->eventMask);
+ if (!eventHandler)
+ this->setEventHandler(this);
+}
+
+void TXViewport::handleEvent(TXWindow* w, XEvent* ev)
+{
+ if (child && child->eventHandler)
+ ((TXEventHandler *)child->eventHandler)->handleEvent(child, ev);
+}
+
+
void TXViewport::setChild(TXWindow* child_)
{
child = child_;
--- vnc-4_1_1-unixsrc/unix/tx/TXViewport.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/tx/TXViewport.h 2005-12-01 17:55:38.000000000 +0000
@@ -32,8 +32,8 @@
#include "TXWindow.h"
#include "TXScrollbar.h"
-class TXViewport : public TXWindow, public TXScrollbarCallback,
- public rfb::Timer::Callback {
+class TXViewport : public TXWindow, public TXScrollbarCallback,
+ public TXEventHandler, public rfb::Timer::Callback {
public:
TXViewport(Display* dpy_, int width, int height, TXWindow* parent_=0);
virtual ~TXViewport();
@@ -59,6 +59,12 @@
// normally.
bool bumpScrollEvent(XMotionEvent* ev);
+ // reparent the viewport into a new window
+ void reparent(long embed_window);
+
+ // event handler
+ void handleEvent(TXWindow* w, XEvent* ev);
+
private:
virtual void resizeNotify();
virtual void scrollbarPos(int x, int y, TXScrollbar* sb);
--- vnc-4_1_1-unixsrc/unix/vncviewer/parameters.h.viewer-reparent 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/vncviewer/parameters.h 2005-12-01 17:55:38.000000000 +0000
@@ -37,6 +37,7 @@
extern rfb::BoolParameter sendPrimary;
extern rfb::BoolParameter fullScreen;
extern rfb::StringParameter geometry;
+extern rfb::StringParameter embedParent;
extern char aboutText[];
extern char* programName;
--- vnc-4_1_1-unixsrc/unix/vncviewer/CConn.cxx.viewer-reparent 2005-03-11 15:08:41.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/vncviewer/CConn.cxx 2005-12-01 17:55:38.000000000 +0000
@@ -586,10 +586,18 @@
void CConn::reconfigureViewport()
{
+ const char * par = embedParent.getValueStr();
viewport->setMaxSize(cp.width, cp.height);
if (fullScreen) {
viewport->resize(DisplayWidth(dpy,DefaultScreen(dpy)),
DisplayHeight(dpy,DefaultScreen(dpy)));
+ } else if (strlen(par) != 0) {
+ XWindowAttributes win_attr;
+ Window w = strtol(par, (char **)NULL, 0);
+
+ XGetWindowAttributes(dpy, w, &win_attr);
+ viewport->reparent(w);
+ viewport->resize(win_attr.width, win_attr.height);
} else {
int w = cp.width;
int h = cp.height;
--- vnc-4_1_1-unixsrc/unix/vncviewer/vncviewer.cxx.viewer-reparent 2005-12-01 17:54:46.000000000 +0000
+++ vnc-4_1_1-unixsrc/unix/vncviewer/vncviewer.cxx 2005-12-01 17:55:38.000000000 +0000
@@ -99,6 +99,9 @@
/* Support for tunnelling */
StringParameter via("via", "Gateway to tunnel via", "");
+/* Support for reparenting */
+StringParameter embedParent("Parent", "X Window to use as a parent", "");
+
char aboutText[256];
char* programName;
extern char buildtime[];

View file

@ -1,192 +0,0 @@
diff -up vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 vnc-4_1_2-unixsrc/common/network/Makefile.am
--- vnc-4_1_2-unixsrc/common/network/Makefile.am.ipv6 2008-06-02 10:22:17.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/network/Makefile.am 2008-06-02 10:52:56.000000000 +0200
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libnetwork.la
+libnetwork_la_CPPFLAGS = -DHAVE_GETADDRINFO
+
libnetwork_la_SOURCES = \
Socket.h \
TcpSocket.cxx \
diff -up vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx
--- vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx.ipv6 2008-06-02 10:22:17.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/network/TcpSocket.cxx 2008-06-02 10:49:04.000000000 +0200
@@ -109,50 +109,99 @@ TcpSocket::TcpSocket(int sock, bool clos
TcpSocket::TcpSocket(const char *host, int port)
: closeFd(true)
{
- int sock;
+#define CAST_ADDR(x) (*((struct x *)&addr))
+ int sock, err, family, result = -1;
+ size_t addrlen;
+ struct sockaddr_storage addr;
+#ifdef HAVE_GETADDRINFO
+ struct addrinfo *ai, *current, hints;
+#endif
// - Create a socket
initSockets();
- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
- throw SocketException("unable to create socket", errorNumber);
-#ifndef WIN32
- // - By default, close the socket on exec()
- fcntl(sock, F_SETFD, FD_CLOEXEC);
-#endif
+#ifdef HAVE_GETADDRINFO
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_canonname = NULL;
+ hints.ai_addr = NULL;
+ hints.ai_next = NULL;
+
+ if ((result = getaddrinfo(host, NULL, &hints, &ai)) != 0) {
+ throw Exception("unable to resolve host by name: %s",
+ gai_strerror(result));
+ }
+
+ for (current = ai; current != NULL; current = current->ai_next) {
+ family = current->ai_family;
+ if (family != AF_INET && family != AF_INET6)
+ continue;
+
+ addrlen = current->ai_addrlen;
+ memcpy(&addr, current->ai_addr, addrlen);
+
+ if (family == AF_INET)
+ CAST_ADDR(sockaddr_in).sin_port = htons(port);
+ else
+ CAST_ADDR(sockaddr_in6).sin6_port = htons(port);
- // - Connect it to something
+#else
+ family = AF_INET;
+ addrlen = sizeof(struct sockaddr_in);
- // Try processing the host as an IP address
- struct sockaddr_in addr;
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = inet_addr(host);
- addr.sin_port = htons(port);
- if ((int)addr.sin_addr.s_addr == -1) {
- // Host was not an IP address - try resolving as DNS name
- struct hostent *hostinfo;
- hostinfo = gethostbyname(host);
- if (hostinfo && hostinfo->h_addr) {
- addr.sin_addr.s_addr = ((struct in_addr *)hostinfo->h_addr)->s_addr;
- } else {
- int e = errorNumber;
- closesocket(sock);
- throw SocketException("unable to resolve host by name", e);
+ // Try processing the host as an IP address
+ memset(&addr, 0, addrlen);
+ CAST_ADDR(sockaddr_in).sin_family = AF_INET;
+ CAST_ADDR(sockaddr_in).sin_addr.s_addr = inet_addr(host);
+ CAST_ADDR(sockaddr_in).sin_port = htons(port);
+ if ((int)CAST_ADDR(sockaddr_in).sin_addr.s_addr == -1) {
+ // Host was not an IP address - try resolving as DNS name
+ struct hostent *hostinfo;
+ hostinfo = gethostbyname(host);
+ if (hostinfo && hostinfo->h_addr) {
+ CAST_ADDR(sockaddr_in).sin_addr.s_addr =
+ ((struct in_addr *)hostinfo->h_addr)->s_addr;
+ } else {
+ err = errorNumber;
+ throw SocketException("unable to resolve host by name", err);
+ }
+ }
+#endif
+ sock = socket (family, SOCK_STREAM, 0);
+ if (sock == -1) {
+ err = errorNumber;
+#ifdef HAVE_GETADDRINFO
+ freeaddrinfo(ai);
+#endif
+ throw SocketException("unable to create socket", err);
}
- }
- // Attempt to connect to the remote host
- for (;;) {
- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) {
- int e = errorNumber;
- if (e == EINTR)
- continue;
+ // Attempt to connect to the remote host
+ while ((result = connect(sock, (struct sockaddr *)&addr, addrlen)) == -1) {
+ err = errorNumber;
+ if (err == EINTR)
+ continue;
closesocket(sock);
- throw SocketException("unable to connect to host", e);
- } else break;
+ break;
+ }
+#ifdef HAVE_GETADDRINFO
+ if (result == 0)
+ break;
+ else
+ continue;
}
+ freeaddrinfo(ai);
+#endif
+ if (result == -1)
+ throw SocketException("unable connect to socket", err);
+
+#ifndef WIN32
+ // - By default, close the socket on exec()
+ fcntl(sock, F_SETFD, FD_CLOEXEC);
+#endif
+
// Disable Nagle's algorithm, to reduce latency
enableNagles(sock, false);
diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.cxx
--- vnc-4_1_2-unixsrc/common/rdr/Exception.cxx.ipv6 2008-06-02 10:23:35.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/rdr/Exception.cxx 2008-06-02 10:28:51.000000000 +0200
@@ -22,8 +22,23 @@
#include <winsock2.h>
#endif
+#include <stdarg.h>
+
using namespace rdr;
+Exception::Exception(const char *format, ...) {
+ va_list ap;
+ int result;
+
+ va_start(ap, format);
+ result = vsnprintf(str_, len, format, ap);
+ va_end(ap);
+
+ /* XXX - ensure that string ends correctly */
+ if (result > len)
+ str_[len - 1] = '\0';
+}
+
SystemException::SystemException(const char* s, int err_)
: Exception(s), err(err_)
{
diff -up vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 vnc-4_1_2-unixsrc/common/rdr/Exception.h
--- vnc-4_1_2-unixsrc/common/rdr/Exception.h.ipv6 2008-06-02 10:23:05.000000000 +0200
+++ vnc-4_1_2-unixsrc/common/rdr/Exception.h 2008-06-02 10:28:41.000000000 +0200
@@ -27,13 +27,7 @@ namespace rdr {
struct Exception {
enum { len = 256 };
char str_[len];
- Exception(const char* s=0) {
- str_[0] = 0;
- if (s)
- strncat(str_, s, len-1);
- else
- strcat(str_, "Exception");
- }
+ Exception(const char *format, ...);
virtual const char* str() const { return str_; }
};

View file

@ -1,22 +0,0 @@
--- vnc-4_1_1-unixsrc/common/rfb/Password.cxx.vncpasswd 2005-06-27 15:08:30.000000000 +0100
+++ vnc-4_1_1-unixsrc/common/rfb/Password.cxx 2005-06-27 15:18:28.000000000 +0100
@@ -38,6 +38,9 @@
PlainPasswd::PlainPasswd(char* pwd) : CharArray(pwd) {
}
+PlainPasswd::PlainPasswd(int len) : CharArray(len) {
+}
+
PlainPasswd::PlainPasswd(const ObfuscatedPasswd& obfPwd) : CharArray(9) {
if (obfPwd.length < 8)
throw rdr::Exception("bad obfuscated password length");
--- vnc-4_1_1-unixsrc/common/rfb/Password.h.vncpasswd 2005-06-27 15:18:46.000000000 +0100
+++ vnc-4_1_1-unixsrc/common/rfb/Password.h 2005-06-27 15:18:56.000000000 +0100
@@ -28,6 +28,7 @@
public:
PlainPasswd();
PlainPasswd(char* pwd);
+ PlainPasswd(int l);
PlainPasswd(const ObfuscatedPasswd& obfPwd);
~PlainPasswd();
void replaceBuf(char* b);

View file

@ -1,20 +0,0 @@
--- vnc-4_1_2-unixsrc/common/rfb/Logger.cxx.vsnprintf 2007-02-26 12:29:25.000000000 +0100
+++ vnc-4_1_2-unixsrc/common/rfb/Logger.cxx 2007-02-26 12:30:03.000000000 +0100
@@ -34,7 +34,7 @@
using namespace rfb;
-#ifndef HAVE_VSNPRINTF
+/*#ifndef HAVE_VSNPRINTF
#ifdef __RFB_THREADING_IMPL
static Mutex fpLock;
#endif
@@ -63,7 +63,7 @@
return len;
}
#endif
-
+*/
Logger* Logger::loggers = 0;

View file

@ -1,13 +0,0 @@
--- vnc-4_1-unixsrc/unix/vncserver.xclients 2005-03-03 23:01:16.000000000 +0000
+++ vnc-4_1-unixsrc/unix/vncserver 2005-03-03 23:02:26.000000000 +0000
@@ -42,6 +42,10 @@
$defaultXStartup
= ("#!/bin/sh\n\n".
+ "# Uncomment the following two lines for normal desktop:\n".
+ "# unset SESSION_MANAGER\n".
+ "# exec /etc/X11/xinit/xinitrc\n\n".
+ "[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup\n".
"[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
"xsetroot -solid grey\n".
"vncconfig -iconic &\n".

View file

@ -1,66 +0,0 @@
diff -up vnc-4_1_3-unixsrc/common/javabin/index.vnc vnc-4_1_3-unixsrc/common/javabin/index
diff -up vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac
--- vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac.vnc 2009-01-26 17:52:43.000000000 +0100
+++ vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/configure.ac 2009-01-26 17:53:04.000000000 +0100
@@ -31,7 +31,6 @@ RELEASE_DATE="5 November 2008"
REMEMBER_REMEMBER="The Fifth of November"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
-AM_MAINTAINER_MODE
dnl this gets generated by autoheader, and thus contains all the defines. we
dnl don't ever actually use it, internally.
@@ -1215,6 +1214,13 @@ if test "x$XVFB" = xyes; then
AC_SUBST([XVFB_SYS_LIBS])
fi
+dnl Xvnc DDX
+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"])
+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"])
+
+dnl Xvnc DDX
+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XEXT_INC $FB_INC $MI_INC $RENDER_INC"])
+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"])
dnl Xnest DDX
@@ -2179,6 +2185,7 @@ hw/dmx/input/Makefile
hw/dmx/glxProxy/Makefile
hw/dmx/Makefile
hw/vfb/Makefile
+hw/vnc/Makefile
hw/xgl/Makefile
hw/xgl/egl/Makefile
hw/xgl/egl/module/Makefile
diff -up vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am
--- vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.vnc 2009-01-26 17:52:43.000000000 +0100
+++ vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2009-01-26 17:52:46.000000000 +0100
@@ -43,7 +43,8 @@ SUBDIRS = \
$(DMX_SUBDIRS) \
$(KDRIVE_SUBDIRS) \
$(XQUARTZ_SUBDIRS) \
- $(XPRINT_SUBDIRS)
+ $(XPRINT_SUBDIRS) \
+ vnc
DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint
diff -up vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c
--- vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.vnc 2009-01-26 17:52:43.000000000 +0100
+++ vnc-4_1_3-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2009-01-26 17:52:46.000000000 +0100
@@ -292,6 +292,7 @@ extern void BigReqExtensionInit(INITARGS
#ifdef MITMISC
extern void MITMiscExtensionInit(INITARGS);
#endif
+extern void vncExtensionInit(INITARGS);
#ifdef XIDLE
extern void XIdleExtensionInit(INITARGS);
#endif
@@ -566,6 +567,7 @@ InitExtensions(argc, argv)
#ifdef MITMISC
if (!noMITMiscExtension) MITMiscExtensionInit();
#endif
+ vncExtensionInit();
#ifdef XIDLE
if (!noXIdleExtension) XIdleExtensionInit();
#endif

872
vnc.spec
View file

@ -1,872 +0,0 @@
%define vnc_version 4_1_3
Summary: A remote display system
Name: vnc
Version: 4.1.3
Release: 1%{?dist}
URL: http://www.realvnc.com
Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz
Source1: Makefile.am
Source2: vncserver.init
Source3: vnc-16x16.png
Source4: vnc-24x24.png
Source5: vnc-48x48.png
Patch0: vnc-cookie.patch
Patch1: vnc-gcc4.patch
Patch2: vnc-use-fb.patch
Patch3: vnc-xclients.patch
Patch4: vnc-idle.patch
Patch5: vnc-via.patch
Patch8: vnc-restart.patch
Patch9: vnc-vncpasswd.patch
Patch11: vnc-modular-xorg.patch
Patch12: vnc-nohttpd.patch
Patch15: vnc-viewer-reparent.patch
Patch16: vnc-64bit.patch
Patch17: vnc-select.patch
Patch21: vnc-newfbsize.patch
Patch24: vnc-102434.patch
Patch25: vnc-config.patch
Patch28: vnc-render.patch
Patch31: vnc-autotools.patch
Patch32: vnc-autotools-compile.patch
Patch33: vnc-always_use_fb.patch
Patch34: vnc-vsnprintf.patch
Patch36: vnc-24bit.patch
Patch38: vnc-gcc43.patch
Patch40: vnc-xorg.patch
Patch41: vnc-privates.patch
Patch42: vnc-mieq.patch
Patch43: vnc-allocate.patch
Patch45: vnc-paint.patch
Patch46: vnc-selections.patch
Patch48: vnc-manminor.patch
Patch49: vnc-clipboard.patch
Patch50: vnc-scrollbars.patch
Patch51: vnc-bounds.patch
Patch52: vnc-includes.patch
Patch53: vnc-viewerIPv6.patch
Patch54: vnc-rh212985.patch
License: GPLv2
Group: User Interface/Desktops
BuildRequires: perl, openssl-devel, libpciaccess-devel
BuildRequires: zlib-devel libjpeg-devel
BuildRequires: desktop-file-utils >= 0.2.92
BuildRequires: autoconf, automake, libtool, flex, pkgconfig, patchutils
BuildRequires: expat-devel, freetype-devel
BuildRequires: libX11-devel, xorg-x11-xtrans-devel
BuildRequires: libxkbfile-devel, libXfont-devel
BuildRequires: tcp_wrappers-devel
BuildRequires: libXtst-devel, xorg-x11-util-macros
BuildRequires: libXt-devel, libXv-devel, pixman-devel
BuildRequires: libselinux-devel
BuildRequires: xorg-x11-server-source
BuildRequires: mesa-libGL-devel >= 7.1-0.36, libdrm-devel >= 2.4.0
Requires: gtk2 >= 2.6
Requires: coreutils
%description
Virtual Network Computing (VNC) is a remote display system which
allows you to view a computing 'desktop' environment not only on the
machine where it is running, but from anywhere on the Internet and
from a wide variety of machine architectures. This package contains a
client which will allow you to connect to other desktops running a VNC
server.
%package server
Summary: A VNC server
Requires: bash >= 2.0, util-linux, xorg-x11-xauth, chkconfig
Group: User Interface/X
%description server
The VNC system allows you to access the same desktop from a wide
variety of platforms. This package is a VNC server, allowing others
to access the desktop on your machine.
%package libs
Summary: VNC Remote framebuffer libraries
Group: User Interface/X
%description libs
Remote framebuffer library which is used by vncviewer and vncserver
%prep
%setup -q -n vnc-%{vnc_version}-unixsrc
cp -r %{_datadir}/xorg-x11-server-source unix
mkdir -p unix/xorg-x11-server-source/hw/vnc
cp %{SOURCE1} unix/xorg-x11-server-source/hw/vnc/
%patch0 -p1 -b .cookie
%patch1 -p1 -b .gcc4
%patch2 -p1 -b .use-fb
%patch3 -p1 -b .xclients
%patch4 -p1 -b .idle
%patch5 -p1 -b .via
%patch8 -p1 -b .restart
%patch9 -p1 -b .vncpasswd
%patch11 -p1 -b .modular-xorg
%patch40 -p1 -b .vnc
%patch12 -p1 -b .nohttpd
%patch15 -p1 -b .viewer-reparent
%patch16 -p1 -b .64bit
%patch17 -p1 -b .select
%patch21 -p1 -b .newfbsize
%patch24 -p1 -b .102434
%patch25 -p1 -b .config
%patch28 -p1 -b .render
%patch31 -p1 -b .autotools
%patch32 -p1 -b .autotools-compile
%patch33 -p1 -b .always_use_fb
%patch34 -p1 -b .vsnprintf
%patch36 -p1 -b .24bit
%patch38 -p1 -b .gcc43
cp -a unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \
unix/xc/programs/Xserver/Xvnc.man \
unix/xc/programs/Xserver/vnc/*.{h,cc} \
unix/xorg-x11-server-source/hw/vnc/
pushd unix/xorg-x11-server-source/hw/vnc
%patch41 -p5 -b .privates
popd
%patch42 -p1 -b .mieq
%patch43 -p1 -b .alloc
%patch45 -p1 -b .paint
%patch46 -p1 -b .selections
%patch48 -p1 -b .minor
%patch49 -p1 -b .clipboard
%patch50 -p1 -b .scrollbars
%patch51 -p1 -b .bounds
%patch52 -p1 -b .includes
%patch53 -p1 -b .ipv6
%patch54 -p1 -b .rh212985
%build
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
export CXXFLAGS="$CFLAGS"
pushd common
autoreconf -fiv
%configure
make %{?_smp_mflags}
popd
pushd unix
autoreconf -fiv
%configure
make %{?_smp_mflags}
popd
pushd unix/xorg-x11-server-source
autoreconf -fiv
%configure --disable-xorg \
--disable-xnest --disable-xvfb \
--disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
--with-pic \
--disable-xorgcfg \
--disable-xprint \
--disable-static \
--disable-composite \
--disable-xtrap \
--enable-xcsecurity \
--with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \
--with-fontdir=%{_datadir}/X11/fonts \
--with-os-name="Fedora 10" \
--with-os-vendor="Red Hat, Inc." \
--with-xkb-output=%{_localstatedir}/lib/xkb \
--with-rgb-path=%{_datadir}/X11/rgb \
--enable-install-libxf86config \
--disable-xevie \
--disable-dri2 \
--enable-glx \
--disable-config-dbus \
--disable-config-hal \
--with-dri-driver-path=%{_libdir}/dri
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
cd common;
make install DESTDIR=$RPM_BUILD_ROOT
cd ../unix
mandst=$RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $mandst
for f in xorg-x11-server-source/hw/vnc/Xvnc vncviewer/vncviewer vncpasswd/vncpasswd \
vncconfig/vncconfig vncserver x0vncserver/x0vncserver; do
cp -pf $f.man $mandst/`basename $f.1`
chmod 0444 $mandst/`basename $f.1`
done
make install DESTDIR=$RPM_BUILD_ROOT
cp vncserver $RPM_BUILD_ROOT/usr/bin
cd xorg-x11-server-source/hw/vnc
make install DESTDIR=$RPM_BUILD_ROOT
cd ../../../
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vncserver
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cat > $RPM_BUILD_ROOT/etc/sysconfig/vncservers << "EOF"
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
EOF
chmod 644 $RPM_BUILD_ROOT/etc/sysconfig/vncservers
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/vnc.png
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/vnc.png
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/vnc.png
mkdir -p $RPM_BUILD_ROOT/etc/X11/applnk/Applications
cat > vncviewer.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=VNC Viewer
Comment=Connect to VNC server and display remote desktop
Exec=/usr/bin/vncviewer
Icon=vnc.png
Terminal=false
Type=Application
StartupWMClass=VNC Viewer: Connection Details
EOF
# Desktop file installation.
mkdir $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor vnc --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category X-Red-Hat-Extra \
--add-category Network \
--add-category Application \
vncviewer.desktop
# remove unwanted files
rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.a
rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.la
rm -f $RPM_BUILD_ROOT%{_libdir}/librfb.so
rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libvnc.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ] && [ -f %{_datadir}/icons/hicolor/index.theme ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ] && [ -f %{_datadir}/icons/hicolor/index.theme ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
%post server
if [ "$1" = 1 ]; then
/sbin/chkconfig --add vncserver
fi
%preun server
if [ "$1" = 0 ]; then
/sbin/service vncserver stop >/dev/null 2>&1
/sbin/chkconfig --del vncserver
fi
%post libs
/sbin/ldconfig
%postun libs
/sbin/ldconfig
%files
%defattr(-,root,root)
%doc LICENCE.txt README
%{_bindir}/vncviewer
%{_datadir}/applications/*
%{_mandir}/man1/vncviewer.1*
%{_datadir}/icons/hicolor/*/*/*
%files server
%defattr(-,root,root)
%attr(0755,root,root) /etc/rc.d/init.d/vncserver
%config(noreplace) /etc/sysconfig/vncservers
%{_bindir}/Xvnc
%{_bindir}/vncpasswd
%{_bindir}/vncconfig
%{_bindir}/vncserver
%{_bindir}/x0vncserver
%{_mandir}/man1/Xvnc.1*
%{_mandir}/man1/vncpasswd.1*
%{_mandir}/man1/vncconfig.1*
%{_mandir}/man1/vncserver.1*
%{_mandir}/man1/x0vncserver.1*
%{_libdir}/xorg/modules/extensions/libvnc.so
%files libs
%defattr(-,root,root)
%{_libdir}/librfb.so.*
%changelog
* Mon Jan 26 2009 Adam Tkac <atkac redhat com> 4.1.3-1
- updated to 4.1.3 (CVE-2008-4770)
* Fri Oct 03 2008 Adam Tkac <atkac redhat com> 4.1.2-35
- updated patches due rpm 4.6 (#465099)
- build with -O2
* Mon Jul 28 2008 Adam Tkac <atkac redhat com> 4.1.2-34.2
- removed initscript %%config attribute
* Fri Jul 18 2008 Adam Tkac <atkac redhat com> 4.1.2-34.1
- removed buildroot
* Thu Jul 17 2008 Adam Tkac <atkac redhat com> 4.1.2-34
- vncserver script returns error when Xvnc fails to start
* Wed Jul 16 2008 Adam Tkac <atkac redhat com> 4.1.2-33.1
- update patches due rpm 4.6
* Thu Jul 03 2008 Adam Tkac <atkac redhat com> 4.1.2-33
- build with -rdynamic to make swrast_dri driver happy
* Tue Jul 01 2008 Adam Tkac <atkac redhat com> 4.1.2-32
- enabled XKEYBOARD extension (#450033)
- icons have correct permissions (#453495)
* Mon Jun 02 2008 Adam Tkac <atkac redhat com> 4.1.2-31.1
- minor cleanup in IPv6 patch
* Wed May 29 2008 Adam Tkac <atkac redhat com> 4.1.2-31
- substituted vnc-210617.patch with improved version - vnc-viewerIPv6.patch
(#438422)
* Fri Apr 25 2008 Adam Tkac <atkac redhat com> 4.1.2-30
- rebuild against new mesa to fix GLX under anaconda (#443635)
* Wed Apr 09 2008 Adam Tkac <atkac redhat com> 4.1.2-29
- rebuild with -O2
* Wed Mar 19 2008 Adam Tkac <atkac redhat com> 4.1.2-28
- validate framebuffer bounds before GetImage call (#430468, improved fix)
* Fri Mar 14 2008 Adam Tkac <atkac redhat com> 4.1.2-27.1
- fixed assertion failed when only one scrollbar should be used (#428117)
* Thu Mar 13 2008 Adam Tkac <atkac redhat com> 4.1.2-27
- removed obsolete vnc-ppc64.patch
- minor vncviewer manpage fixes (#427672, #427701)
- fixed overflow on heap (#430468)
- start vncconfig earlier in vncserver (#430965)
- next BuildRequires cleanup
* Tue Mar 11 2008 Adam Tkac <atkac redhat com> 4.1.2-26
- BuildRequires and Requires cleanup
- don't build java viewer (problems due new gcj)
- use xorg codebase from xorg-x11-server-source package again
- vnc-selection.patch - new xserver selection API/ABI
- vnc-xkb.patch - disable XKEYBOARD extension
- vnc-paint.patch - PaintWindow{Background,Border} hooks have been removed
- vnc-privates.patch - update devPrivates handling
- vnc-mieq.patch - use event queue to handle input events
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 4.1.2-25
- Autorebuild for GCC 4.3
* Wed Jan 09 2008 Adam Tkac <atkac redhat com> 4.1.2-24
- start use F8 xserver codebase
- compat patches and gcc 4.3 patches
- use catalogue:/etc/X11/fontpath.d,built-ins as default fontpath
(#390971)
* Tue Oct 23 2007 Adam Tkac <atkac redhat com> 4.1.2-23
- disabled Composite extension (#242280, #339811)
* Mon Sep 24 2007 Adam Tkac <atkac redhat com> 4.1.2-22
- obsoleted vnc-s390.patch
- build with --disable-xorg
* Wed Aug 22 2007 Adam Tkac <atkac redhat com> 4.1.2-21
- rebuild (BuildID feature)
- GPLv2 license
* Mon Aug 06 2007 Adam Tkac <atkac redhat com> 4.1.2-20.2
- updated vnc-s390 patch to latest xorg
* Wed Aug 01 2007 Adam Tkac <atkac redhat com> 4.1.2-20.1
- rebuild
* Tue Jul 31 2007 Adam Tkac <atkac redhat com> 4.1.2-20
- vnc service is now disabled in all runlevels by default (#250157)
* Tue Jul 17 2007 Adam Tkac <atkac redhat com> 4.1.2-19
- initscript is ready for parallel booting (#247092)
* Thu Jun 08 2007 Adam Tkac <atkac redhat com> 4.1.2-18
- added 24bit support to Xvnc
- handle RENDER extension better
(+ moved module_crash patch into render patch)
* Mon Apr 23 2007 Adam Tkac <atkac redhat com> 4.1.2-17
- removed patch to #188169 because patching this bug could do
more things bad than good
- removed int10 module from vnc (with-int10 option)
* Tue Mar 27 2007 Adam Tkac <atkac redhat com> 4.1.2-16.fc7
- fixed vnc module crashing (#234124)
- vncviewer has been moved from Utility group to Network group (#231765)
* Mon Mar 05 2007 Adam Tkac <atkac redhat com> 4.1.2-15.fc7
- improved vnc-always_use_fb patch (some screen defects on 64bits)
- removed xserver tarball from source list
* Fri Mar 02 2007 Adam Tkac <atkac redhat com> 4.1.2-14.fc7
- enabled RENDER, Composite and GLX extensions by default on all architectures
- new relation between Xvnc and xorg's source. Xvnc now uses latest xorg's sources
from xorg-x11-server-source package
- fired away obsolete patches
- vnc-mesa-6.5.2.patch
- vnc-mesa.patch
- vnc-selinux.patch
- vnc-render-sigfault.patch
- vnc-fontpath.patch
- vnc-null-interface.patch
* Mon Feb 26 2007 Adam Tkac <atkac redhat com> 4.1.2-13.fc7
- remove wild implementation of vsnprintf (this caused sigfaults on 64bits) (#229702)
- added post & postun sections to vnc-libs
- menu tooltip is HIG compliant (#229941)
- specfile has been standardized (checked by rpmlint)
* Fri Feb 23 2007 Adam Tkac <atkac redhat com> 4.1.2-12.fc7
- new colormap policy in Xvnc
- Xvnc now always use framebuffer (like Xvfb)
- obsolete patches have been removed
* Wed Feb 16 2007 Adam Tkac <atkac redhat com> 4.1.2-11.fc7
- major build-process changes in vnc
- vnc is now completely built by autotools
- new package (vnc-libs) contains remote framebuffer library
and vncviewer and server is linked against this
- specfile cleanup
* Mon Jan 15 2007 Adam Tkac <atkac redhat com> 4.1.2-10.fc7
- fixed render crashing when run in 8bpp
* Mon Jan 08 2007 Adam Tkac <atkac redhat com> 4.1.2-9.fc7
- enable render extensions by default on s390 & s390x
* Wed Dec 13 2006 Adam Tkac <atkac redhat com> 4.1.2-8.1.fc7
- changed __ppc64__ to __ppc__ in vnc-render.patch
all powerpc has render enabled by default, other archs no
* Mon Dec 11 2006 Adam Tkac <atkac redhat com> 4.1.2-8.fc7
- fixed building against mesa-6.5.2
* Tue Dec 05 2006 Adam Tkac <atkac redhat com> 4.1.2-7.2.fc7
- fixed vnc-102434.patch - potential buffer overflow error
- only ppc64 architecture has enabled render extensions
default (conflict between glx&render)
* Mon Dec 4 2006 Thomas Woerner <twoerner@redhat.com> 4.1.2-7.1.fc7
- tcp_wrappers has a new devel and libs sub package, therefore changing build
requirement for tcp_wrappers to tcp_wrappers-devel
* Thu Nov 23 2006 Adam Tkac <atkac@redhat.com> 4.1.2-7.fc7
- Xvnc now starts with render extensions. We need test it. Disable with -render option
- vncserver requires xorg-x11-xauth
* Tue Nov 14 2006 Adam Tkac <atkac@redhat.com> 4.1.2-6.fc7
- update to xorg-x11-server to version 1.1.1
- fixed OpenGL extensions (#213215)
- fixed vnc-188169.patch (#213609)
- fixed RENDER problems (#162304)
- build requires libstdc++-devel and gcc-c++, autoconf213 and libselinux-devel
* Wed Oct 25 2006 Adam Tkac <atkac@redhat.com> 4.1.2-5
- added xorg-x11-fonts-base dependency
- fixed vncconfig crash on x64 (#179635)
* Tue Oct 17 2006 Adam Tkac <atkac@redhat.com> 4.1.2-4
- IPv6 support to vncviewer has been added (#210617)
- fixed conflict between "locate pointer" option in control-center
and vncviewer (#188169)
- fixed software group of vnc (#209229)
- added support to get password from stdin (#102434)
* Mon Jul 18 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.2-3
- vncviewer now supports NewFBSize pseudoencoding (#180939)
- do not BuildRequire libdrm-devel on s390, s390x, ppc64 it is not available there
* Tue Jun 13 2006 Jeremy Katz <katzj@redhat.com> 4.1.2-2
- update xorg-x11-server to 1.1.0 to fix crashes in anaconda
* Fri May 26 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.2-1
- enable OpenGL support
* Thu May 25 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.2-0.1
- fixed building on ppc64
* Thu May 18 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.2-0
- update to version 4.1.2
* Wed May 10 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.1-38
- fixed crash of Xnvc caused by a NULL pointer in interfaces (bug #187607)
- This also fixes crash of Xvnc when vpnc is running (bug #187069)
- don't build on ppc64 due to intermittent build problems
* Fri Apr 21 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.1-37
- removed liblbxutil-devel from BuildRequires
* Tue Feb 28 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.1-36
- with default cofiguration, /etc/init.d/vncserver start will say
"no displays configured" (bug #182161)
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 4.1.1-35.1
- bump again for double-long bug on ppc(64)
* Wed Feb 08 2006 Jitka Kudrnacova <jkudrnac@redhat.com> 4.1.1-35
- Add a test for existence of index.theme before calling
gtk-update-icon-cache in post-(un)installation script,
bug #179704
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 4.1.1-34.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Tue Jan 31 2006 Tim Waugh <twaugh@redhat.com> 4.1.1-34
- Updated xorg-x11-server to 1.0.1-1.
* Tue Jan 3 2006 Tim Waugh <twaugh@redhat.com> 4.1.1-33
- Use VNC-provided Xregion (bug #176435).
- Prevent restorecon error message when not present (bug #176654).
* Fri Dec 23 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-32
- Use system libtool to fix libvnc.so build (bug #176435).
* Wed Dec 21 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-31
- Rebase on xorg-x11-server-1.0.0-2.
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Thu Dec 8 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-30
- Enable Xdmcp (bug #175298).
* Thu Dec 8 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-29
- Fix x0vncserver (bug #172410).
* Tue Dec 6 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-28
- Enable all the extensions, which were accidentally disabled.
* Tue Dec 6 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-27
- Fix 64-bit server (bug #174702).
- Build requires freetype-devel.
- Build requires libXext-devel, libXtst-devel, automake, libtool, pkgconfig,
libfontenc-devel, xorg-x11-util-macros.
* Thu Dec 1 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-26
- Apply patch to allow vncviewer window reparenting (bug #174640).
- Build again on s390/s390x (bug #174569).
* Thu Dec 1 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-25
- Actually initialise the vnc extension in Xvnc.
- Disable lbx.
* Thu Dec 1 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-24
- Build X extension module again.
- Install X extension module into modules/ directory.
- Remove xscreensaver patch, since it causes badness.
* Fri Nov 25 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-23
- ExcludeArch s390 s390x (see bug #174569).
- Re-base on modular xorg-x11 (bug #173323).
- Build requires modular X things.
* Fri Nov 18 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-22
- Extension module is not available on all architectures.
* Fri Nov 18 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-21
- Install extension module into the correct directory.
* Fri Nov 18 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-20
- Fix font path correctly (bug #173160).
* Wed Nov 16 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-19
- Remove xorg-x11-devel build requirement to see what breaks.
- Hack font paths (bug #173160).
* Tue Nov 15 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-18
- Build requires xorg-x11-devel not XFree86-devel.
* Tue Sep 6 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-17
- Make vncviewer prevent xscreensaver from blanking screen (bug #106552).
* Thu Aug 11 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-16
- Added -nohttpd option to vncserver, based on patch from bug #161288.
- Included -nohttpd, -nolisten tcp, and -localhost options in example
sysconfig file (bug #165334).
* Mon Aug 8 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-15
- Fixed xorg-x11 build (__SSP__ gets set by -fstack-protector).
- Fixed desktop file again (bug #63689).
* Wed Jul 14 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-14
- Pulled RENDER support altogether. It can cause Xvnc to get into a busy
loop somehow.
* Wed Jul 13 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-13
- RENDER clipping fix from Mark McLoughlin.
* Mon Jun 27 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-12
- Fixed vncpasswd crash (bug #160471).
* Wed Jun 22 2005 Tim Waugh <twaugh@redhat.com>
- Updated URL in vncservers file (bug #161334).
* Tue Jun 21 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-11
- Don't ship vncconfig.py any more.
- Enable render by default for further testing.
* Mon Jun 20 2005 Tim Waugh <twaugh@redhat.com>
- Build requires expat-devel (bug #160982).
* Wed Apr 27 2005 Jeremy Katz <katzj@redhat.com> - 4.1.1-10
- silence %%post
* Fri Apr 15 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-9
- Disable render by default. There are still screen artifacts from it.
* Fri Apr 1 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-8
- Further render patch fix for Peter Åstrand.
* Thu Mar 31 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-7
- Render patch fix from Peter Åstrand. Enabled render by default again.
* Mon Mar 28 2005 Christopher Aillon <caillon@redhat.com> 4.1.1-6
- rebuilt
* Fri Mar 25 2005 Christopher Aillon <caillon@redhat.com> 4.1.1-5
- Update the GTK+ theme icon cache on (un)install
* Thu Mar 24 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-4
- Upgraded base package to xorg-x11-6.8.2-13.
* Thu Mar 17 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-3
- Disable render by default (+render turns it back on).
* Fri Mar 11 2005 Tim Waugh <twaugh@redhat.com> 4.1.1-2
- 4.1.1 (with 4.1 Java viewer).
- No longer need module patch.
* Thu Mar 10 2005 Tim Waugh <twaugh@redhat.com> 4.1-0.2
- Improved render patch from Peter Åstrand.
* Thu Mar 3 2005 Tim Waugh <twaugh@redhat.com> 4.1-0.1
- 4.1 (but still 4.0 Java viewer for the moment).
- Removed sparc patch.
- Fixed VNC module link line (from upstream).
* Wed Mar 2 2005 Tim Waugh <twaugh@redhat.com> 4.0-15
- Upgraded base package to xorg-x11-6.8.2-6.
- Rebuild for new GCC.
* Wed Feb 23 2005 Tim Waugh <twaugh@redhat.com> 4.0-14
- Render support from Peter Åstrand.
* Thu Feb 3 2005 Tim Waugh <twaugh@redhat.com>
- Don't restart the vncserver service on upgrade.
* Tue Feb 1 2005 Tim Waugh <twaugh@redhat.com> 4.0-13
- Upgraded base package to xorg-x11-6.8.1.903-2.
* Fri Jan 7 2005 Tim Waugh <twaugh@redhat.com>
- Build requires patchutils (bug #144450).
* Wed Jan 5 2005 Tim Waugh <twaugh@redhat.com> 4.0-12
- Don't use initlog in the initscript.
* Fri Dec 31 2004 Tim Waugh <twaugh@redhat.com>
- Cookie generation improvement from Jon Peatfield.
* Mon Dec 13 2004 Tim Waugh <twaugh@redhat.com> 4.0-11
- Create /tmp/.X11-unix if it doesn't already exist.
* Wed Nov 24 2004 Tim Waugh <twaugh@redhat.com> 4.0-10
- Use fastjar, not jar, so that the package rebuilds (bug #140671).
* Wed Nov 17 2004 Tim Waugh <twaugh@redhat.com> 4.0-9
- Don't build hw/xfree86/etc.
- Prevent xorg-x11 build failure in rman.
- Build requires autoconf, flex, bison.
- Use correct PATH setting when started from initscript (bug #84167).
* Wed Oct 6 2004 Tim Waugh <twaugh@redhat.com> 4.0-8
- Use runuser not su in initscript (bug #134594).
* Wed Sep 29 2004 Tim Waugh <twaugh@redhat.com> 4.0-7
- Upgraded base package to xorg-x11-6.8.1-4.
* Tue Aug 31 2004 Tim Waugh <twaugh@redhat.com> 4.0-6
- Upgraded base package to xorg-x11-6.7.99.903-1.
* Fri Aug 27 2004 Tim Waugh <twaugh@redhat.com> 4.0-5
- Built for Fedora Core 2.
* Wed Aug 25 2004 Tim Waugh <twaugh@redhat.com> 4.0-4
- Apply and enable Kristian Høgsberg's --use-fb patch.
* Mon Aug 2 2004 Tim Waugh <twaugh@redhat.com>
- Fixed vnc-via patch (bug #128940).
* Thu Jun 24 2004 Tim Waugh <twaugh@redhat.com> 4.0-3
- 4.0.
- No longer need hotspot patch.
- Add sparc patch from bug #126382.
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Jun 1 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.6
- Turn ppc64 builds on again.
* Tue Jun 1 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.5
- Exclude ppc64 until the build machine is fixed.
- Undo last vnc.def change to get vnc.so back.
* Fri May 28 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.4
- Further vnc.def fix.
- Fix cursor handling for hotspots outside the bounding rectangle.
* Thu May 27 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.3
- Fix ppc64 build.
- Fix debuginfo package.
- Another fix for REGION_INIT usage.
* Wed May 26 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.2
- Switch to xorg-x11 (bug #119530).
* Thu May 20 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta5.1
- 4.0beta5.
- Removed compat, f8 and crash patches.
- Fixed via patch now that NULL is not a valid parameter default.
- Updated gcc34 patch.
* Wed Apr 14 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta4.11
- Allow parameters to be specified in the init script (bug #60176).
* Wed Mar 31 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta4.10
- Back down to XFree86 again, since the Xvnc binary in 4.0-1.beta4.9 doesn't
work at all.
* Tue Mar 23 2004 Tim Waugh <twaugh@redhat.com> 4.0-1.beta4.9
- Build against xorg-x11.
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Sun Feb 1 2004 Tim Waugh <twaugh@redhat.com>
- Build fixes for GCC 3.4.
* Fri Jan 23 2004 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.8
- Fix last fix (bug #114063).
* Thu Jan 22 2004 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.7
- Restart connect() if a signal interrupts it (bug #114063).
* Thu Nov 27 2003 Tim Waugh <twaugh@redhat.com>
- Fixed -via parsing bug in vncviewer (bug #110919).
* Fri Nov 14 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.6
- F8 fix (bug #109377).
* Mon Nov 10 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.5
- Better fix for bug #107455.
* Sat Nov 8 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.4
- Fixed zero-sized cursor problem (bug #107455).
* Thu Oct 2 2003 Tim Waugh <twaugh@redhat.com>
- Added icons (bug #105820).
* Fri Sep 19 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.3
- Avoid a potential Xvnc crash (bug #104702).
* Fri Sep 5 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta4.2
- 4.0beta4.
- No longer need compile, dotvnc, norender patches.
- Don't be so picky about which architectures to build on any more.
- Build requires XFree86-devel.
* Thu Aug 28 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.10
- Fixed SSH tunnelling support (bug #102213).
* Fri Aug 22 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.9
- Add SSH tunnelling support (bug #102213).
* Wed Aug 20 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.8
- Disable IdleTimeout by default.
* Mon Aug 18 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.7
- Ship vncconfig(1) front-end.
- In default xstartup, exec /etc/vnc/xstartup if it exists.
- Track XFree86 package.
- Fix compilation (bug #102547).
- Fix vncpasswd (bug #102435).
* Tue Aug 12 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.6
- Use patched tarball from XFree86 package.
- Build Java VNC viewer.
* Wed Aug 6 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.5.1
- Rebuilt.
* Wed Aug 6 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.5
- Make default xclients file include instructions for 'normal' desktop.
- Server subpackage doesn't require XFree86.
- desktop file: add StartupWMClass tag
- init script: set USER (bug #101674).
- init script: pause when restarting to give the server a chance to stop
(bug #84817).
- vncpasswd: create ~/.vnc if it doesn't already exist.
* Tue Aug 5 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.4
- Allow old -dontdisconnect option, and behave a bit more like Xvnc used to
if it is given (default to no password, use RFB3.3 protocol).
- Fixed DisconnectClients bug.
* Mon Aug 4 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.3
- Disable RENDER altogether for Xvnc.
* Mon Aug 4 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.2
- Reinstated init script.
- Add work-around for Xcursor bug.
* Thu Jul 31 2003 Tim Waugh <twaugh@redhat.com> 4.0-0.beta3.1
- Initial package.

View file

@ -1,125 +0,0 @@
#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops vncserver. \
# used to provide remote X administration services.
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: $network $named
# Required-Stop: $network $named
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: start|stop|restart|try-restart|status|force-reload vncserver
# Description: control vncserver which exports your desktop
### END INIT INFO
# Source function library.
. /etc/init.d/functions
[ -r /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers
prog=$"VNC server"
RETVAL=0
start() {
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
[ -x /usr/bin/vncserver ] || exit 5
[ -x /usr/bin/Xvnc ] || exit 5
echo -n $"Starting $prog: "
RETVAL=0
if [ ! -d /tmp/.X11-unix ]
then
mkdir -m 1777 /tmp/.X11-unix || :
restorecon /tmp/.X11-unix 2>/dev/null || :
fi
for display in ${VNCSERVERS}
do
SERVS=1
echo -n "${display} "
DISP="${display%%:*}"
USER="${display##*:}"
VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
runuser -l ${USER} -c "cd ~${USER} && [ -r .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
RETVAL=$?
[ "$RETVAL" -eq 0 ] || break
done
if [ -z "$SERVS" ]; then
echo -n "no displays configured "
failure
RETVAL=6
else
if [ "$RETVAL" -eq 0 ]; then
success $"vncserver startup"
touch /var/lock/subsys/vncserver
else
failure $"vncserver start"
fi
fi
echo
return "$RETVAL"
}
stop() {
echo -n $"Shutting down $prog: "
for display in ${VNCSERVERS}
do
echo -n "${display} "
export USER="${display##*:}"
runuser ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
done
RETVAL=$?
[ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \
failure $"vncserver shutdown"
echo
[ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver
return "$RETVAL"
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|force-reload)
stop
sleep 3
start
;;
condrestart)
echo "condrestart is obsolete, use try-restart instead"
if [ -e /var/lock/subsys/vncserver ]; then
stop
sleep 3
start
fi
;;
try-restart)
if [ -e /var/lock/subsys/vncserver ]; then
stop
sleep 3
start
fi
;;
status)
status Xvnc
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|try-restart|status|force-reload}"
exit 3
esac
exit "$RETVAL"