diff --git a/.gitignore b/.gitignore index 43f5d82..6e2b3b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ vnc-4_1_2-unixsrc.tar.gz +vnc-4_1-javasrc.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index aaf29be..0000000 --- a/dead.package +++ /dev/null @@ -1,2 +0,0 @@ -RealVNC has been replaced by TightVNC. Checkout "tightvnc" module if you want -current Fedora source. diff --git a/sources b/sources new file mode 100644 index 0000000..741660b --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +cf9a6fe8f592286b5e0fdde686504ffb vnc-4_1_2-unixsrc.tar.gz +9407ce1f215aefca77bef12670745280 vnc-4_1-javasrc.tar.gz diff --git a/vnc-102434.patch b/vnc-102434.patch new file mode 100644 index 0000000..0272ac2 --- /dev/null +++ b/vnc-102434.patch @@ -0,0 +1,61 @@ +--- 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 ++#include + + 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); diff --git a/vnc-16x16.png b/vnc-16x16.png new file mode 100644 index 0000000..37efe6d Binary files /dev/null and b/vnc-16x16.png differ diff --git a/vnc-24bit.patch b/vnc-24bit.patch new file mode 100644 index 0000000..549cf25 --- /dev/null +++ b/vnc-24bit.patch @@ -0,0 +1,42 @@ +--- 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; diff --git a/vnc-24x24.png b/vnc-24x24.png new file mode 100644 index 0000000..dadbb79 Binary files /dev/null and b/vnc-24x24.png differ diff --git a/vnc-48x48.png b/vnc-48x48.png new file mode 100644 index 0000000..1e9ef45 Binary files /dev/null and b/vnc-48x48.png differ diff --git a/vnc-64bit.patch b/vnc-64bit.patch new file mode 100644 index 0000000..34b2d6d --- /dev/null +++ b/vnc-64bit.patch @@ -0,0 +1,39 @@ +--- 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 + #include + ++#include "xorg-server.h" ++ + extern "C" { + #define class c_class; + #include +--- 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 */ diff --git a/vnc-always_use_fb.patch b/vnc-always_use_fb.patch new file mode 100644 index 0000000..b9e49d0 --- /dev/null +++ b/vnc-always_use_fb.patch @@ -0,0 +1,210 @@ +--- 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 + #include "vncExtInit.h" + ++#ifdef HAVE_DIX_CONFIG_H ++#include ++#endif ++ + extern "C" { + #define class c_class + #define public c_public ++#define new c_new + #ifdef WIN32 + #include + #endif + #include +-#include "X11/X.h" ++#include + #define NEED_EVENTS +-#include "X11/Xproto.h" +-#include "X11/Xos.h" ++#include ++#include + #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 + #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.2" +@@ -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); + diff --git a/vnc-authentication.patch b/vnc-authentication.patch new file mode 100644 index 0000000..2bbaf3d --- /dev/null +++ b/vnc-authentication.patch @@ -0,0 +1,18 @@ +--- 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 secTypes; ++ std::list::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); diff --git a/vnc-autotools-compile.patch b/vnc-autotools-compile.patch new file mode 100644 index 0000000..523d878 --- /dev/null +++ b/vnc-autotools-compile.patch @@ -0,0 +1,11 @@ +--- 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 + + #ifndef VNC_SOCKLEN_T +-#define VNC_SOCKLEN_T int ++#define VNC_SOCKLEN_T socklen_t + #endif + + #ifndef INADDR_NONE diff --git a/vnc-autotools.patch b/vnc-autotools.patch new file mode 100644 index 0000000..ff1c42c --- /dev/null +++ b/vnc-autotools.patch @@ -0,0 +1,444 @@ +--- /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 +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am.autotools 2007-02-16 09:52:43.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-02-16 09:53:24.000000000 +0100 +@@ -42,10 +42,7 @@ + ../xfree86/common/libcommon.la \ + -lX11 \ + libvnccommon.la \ +- ../../../../common/rfb/librfb.a \ +- ../../../../common/rdr/librdr.a \ +- ../../../../common/network/libnetwork.a \ +- ../../../../common/Xregion/libXregion.a ++ ../../../../common/rfb/librfb.la + + Xvnc_CFLAGS = -DHAVE_DIX_CONFIG_H \ + -DNO_HW_ONLY_EXTS \ +@@ -68,10 +65,7 @@ + libvnc_la_SOURCES = xf86vncModule.cc + libvnc_la_LIBADD = \ + libvnccommon.la \ +- ../../../../common/rfb/librfb.a \ +- ../../../../common/rdr/librdr.a \ +- ../../../../common/network/libnetwork.a \ +- ../../../../common/Xregion/libXregion.a ++ ../../../../common/rfb/librfb.la + libvnc_la_CXXFLAGS = \ + -I../../../../common \ + -I$(top_srcdir)/hw/xfree86/common \ +--- /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 diff --git a/vnc-bounds.patch b/vnc-bounds.patch new file mode 100644 index 0000000..93a81c5 --- /dev/null +++ b/vnc-bounds.patch @@ -0,0 +1,55 @@ +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() diff --git a/vnc-config.patch b/vnc-config.patch new file mode 100644 index 0000000..026b2ba --- /dev/null +++ b/vnc-config.patch @@ -0,0 +1,18 @@ +--- 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 ++#include "XserverDesktop.h" + + extern "C" { + #define class c_class +@@ -48,7 +49,6 @@ + #undef min + #include + +-#include "XserverDesktop.h" + #include "vncHooks.h" + #include "vncExtInit.h" + diff --git a/vnc-cookie.patch b/vnc-cookie.patch new file mode 100644 index 0000000..d653f3a --- /dev/null +++ b/vnc-cookie.patch @@ -0,0 +1,27 @@ +--- 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'}; diff --git a/vnc-gcc4.patch b/vnc-gcc4.patch new file mode 100644 index 0000000..5228b8c --- /dev/null +++ b/vnc-gcc4.patch @@ -0,0 +1,11 @@ +--- 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); diff --git a/vnc-idle.patch b/vnc-idle.patch new file mode 100644 index 0000000..411672f --- /dev/null +++ b/vnc-idle.patch @@ -0,0 +1,11 @@ +--- 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 " diff --git a/vnc-manminor.patch b/vnc-manminor.patch new file mode 100644 index 0000000..aadbd9d --- /dev/null +++ b/vnc-manminor.patch @@ -0,0 +1,25 @@ +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. diff --git a/vnc-modular-xorg.patch b/vnc-modular-xorg.patch new file mode 100644 index 0000000..2278120 --- /dev/null +++ b/vnc-modular-xorg.patch @@ -0,0 +1,180 @@ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c.modular-xorg 2007-03-02 15:45:37.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/mi/miinitext.c 2007-03-02 15:45:38.000000000 +0100 +@@ -283,6 +283,9 @@ + #ifdef MITMISC + extern void MITMiscExtensionInit(INITARGS); + #endif ++#ifdef VNCEXT ++extern void vncExtensionInit(INITARGS); ++#endif + #ifdef XIDLE + extern void XIdleExtensionInit(INITARGS); + #endif +@@ -561,6 +564,9 @@ + #ifdef MITMISC + if (!noMITMiscExtension) MITMiscExtensionInit(); + #endif ++#ifdef VNCEXT ++ vncExtensionInit(); ++#endif + #ifdef XIDLE + if (!noXIdleExtension) XIdleExtensionInit(); + #endif +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am.modular-xorg 2007-03-02 15:45:38.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/Makefile.am 2007-03-02 15:47:10.000000000 +0100 +@@ -30,6 +30,8 @@ + XPRINT_SUBDIRS = xprint + endif + ++XVNC_SUBDIRS = vnc ++ + # need to add darwin support here + + SUBDIRS = \ +@@ -39,6 +41,7 @@ + $(XVFB_SUBDIRS) \ + $(XNEST_SUBDIRS) \ + $(DMX_SUBDIRS) \ ++ $(XVNC_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ + $(XPRINT_SUBDIRS) + +--- /dev/null 2007-03-01 10:25:08.783929433 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/vnc/Makefile.am 2007-03-02 15:45:38.000000000 +0100 +@@ -0,0 +1,85 @@ ++noinst_LTLIBRARIES = libvnccommon.la ++libvnccommon_la_SOURCES = \ ++ RegionHelper.h \ ++ vncExtInit.cc \ ++ vncExtInit.h \ ++ vncHooks.cc \ ++ vncHooks.h \ ++ XserverDesktop.cc \ ++ XserverDesktop.h ++ ++libvnccommon_la_CXXFLAGS = \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ ++ -DGC_HAS_COMPOSITE_CLIP \ ++ -DVNC_USE_FB \ ++ -I/usr/include/X11 \ ++ -I../../../../common \ ++ -I../../../vncconfig ++ ++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.c ++ ++Xvnc_LDADD = $(XORG_CORE_LIBS) \ ++ $(XORG_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.a \ ++ ../../../../common/rdr/librdr.a \ ++ ../../../../common/network/libnetwork.a \ ++ ../../../../common/Xregion/libXregion.a ++ ++Xvnc_CFLAGS = -DHAVE_DIX_CONFIG_H \ ++ -DNO_HW_ONLY_EXTS \ ++ -DNO_MODULE_EXTS \ ++ -DXFree86Server -DVNCEXT ++ ++Xvnc_CXXFLAGS = $(Xvnc_CFLAGS) \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" \ ++ -DVNC_USE_FB \ ++ -I../../../../common \ ++ -I../../../vncconfig \ ++ -I../../mi \ ++ -I ../../render \ ++ -I/usr/include/X11 ++ ++libvnc_la_LTLIBRARIES = libvnc.la ++libvnc_la_LDFLAGS = -module -avoid-version ++libvnc_ladir = $(moduledir)/extensions ++libvnc_la_SOURCES = xf86vncModule.cc ++libvnc_la_LIBADD = \ ++ libvnccommon.la \ ++ ../../../../common/rfb/librfb.a \ ++ ../../../../common/rdr/librdr.a \ ++ ../../../../common/network/libnetwork.a \ ++ ../../../../common/Xregion/libXregion.a ++libvnc_la_CXXFLAGS = \ ++ -I../../../../common \ ++ -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 ++ ++AM_CXXFLAGS = $(CFLAGS) \ ++ -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \ ++ -DVENDOR_STRING="\"$(VENDOR_STRING)\"" ++ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac.modular-xorg 2007-03-02 15:45:38.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/configure.ac 2007-03-02 15:45:38.000000000 +0100 +@@ -1793,6 +1793,7 @@ + hw/xnest/Makefile + hw/xwin/Makefile + hw/darwin/Makefile ++hw/vnc/Makefile + hw/kdrive/Makefile + hw/kdrive/ati/Makefile + hw/kdrive/chips/Makefile +--- 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 + #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; diff --git a/vnc-newfbsize.patch b/vnc-newfbsize.patch new file mode 100644 index 0000000..be0b11d --- /dev/null +++ b/vnc-newfbsize.patch @@ -0,0 +1,11 @@ +--- 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) diff --git a/vnc-nohttpd.patch b/vnc-nohttpd.patch new file mode 100644 index 0000000..3bf9632 --- /dev/null +++ b/vnc-nohttpd.patch @@ -0,0 +1,55 @@ +--- 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 " . "edString($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 [:] [-name ] [-depth ]\n". ++ die("\nusage: $prog [:] [-nohttpd] [-name ] [-depth ]\n". + " [-geometry x]\n". + " [-pixelformat rgbNNN|bgrNNN]\n". + " ...\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 diff --git a/vnc-noxorg.patch b/vnc-noxorg.patch new file mode 100644 index 0000000..3b390c8 --- /dev/null +++ b/vnc-noxorg.patch @@ -0,0 +1,24 @@ +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 diff --git a/vnc-ppc64.patch b/vnc-ppc64.patch new file mode 100644 index 0000000..f473ad3 --- /dev/null +++ b/vnc-ppc64.patch @@ -0,0 +1,11 @@ +--- vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h.ppc64 2006-11-14 16:10:58.000000000 +0100 ++++ vnc-4_1_2-unixsrc/unix/xorg-x11-server-source/hw/xfree86/common/compiler.h 2006-11-14 16:14:11.000000000 +0100 +@@ -1081,7 +1081,7 @@ + #if defined(linux) && defined(__powerpc64__) + # include + # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +-# include ++/*# include */ + # endif + #endif /* defined(linux) && defined(__powerpc64__) */ + #ifndef eieio /* We deal with arch-specific eieio() routines above... */ diff --git a/vnc-render.patch b/vnc-render.patch new file mode 100644 index 0000000..3e9baa0 --- /dev/null +++ b/vnc-render.patch @@ -0,0 +1,224 @@ +--- 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 ++#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]) diff --git a/vnc-restart.patch b/vnc-restart.patch new file mode 100644 index 0000000..976cc59 --- /dev/null +++ b/vnc-restart.patch @@ -0,0 +1,21 @@ +--- 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 diff --git a/vnc-select.patch b/vnc-select.patch new file mode 100644 index 0000000..b888071 --- /dev/null +++ b/vnc-select.patch @@ -0,0 +1,10 @@ +--- 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 sockets; + std::list::iterator i; ++ tv.tv_usec = tv.tv_sec = 0; + + // Process any incoming X events + TXWindow::handleXEvents(dpy); diff --git a/vnc-use-fb.patch b/vnc-use-fb.patch new file mode 100644 index 0000000..55eddd0 --- /dev/null +++ b/vnc-use-fb.patch @@ -0,0 +1,85 @@ +--- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2005-02-28 12:59:09.000000000 +0000 ++++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-03-04 16:13:19.000000000 +0000 +@@ -48,8 +48,12 @@ + #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 @@ + #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 @@ + unsigned long, char*); + extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int, + unsigned long, char*); ++#endif + } + + #define XVNCVERSION "Free Edition 4.1" +@@ -482,7 +488,7 @@ + } + #endif + +- ++#ifndef VNC_USE_FB + static Bool vfbMultiDepthCreateGC(GCPtr pGC) + { + switch (vfbBitsPerPixel(pGC->depth)) +@@ -541,6 +547,7 @@ + break; + } + } ++#endif + + static ColormapPtr InstalledMaps[MAXSCREENS]; + +@@ -811,6 +818,11 @@ + 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 @@ + pScreen->CreateGC = vfbMultiDepthCreateGC; + pScreen->GetImage = vfbMultiDepthGetImage; + pScreen->GetSpans = vfbMultiDepthGetSpans; ++#endif + + pScreen->InstallColormap = vfbInstallColormap; + pScreen->UninstallColormap = vfbUninstallColormap; +@@ -883,6 +896,9 @@ + } + } + ++#ifdef VNC_USE_FB ++ ret = fbCreateDefColormap(pScreen); ++#else + if (pvfb->bitsPerPixel == 1) + { + ret = mfbCreateDefColormap(pScreen); +@@ -891,6 +907,7 @@ + { + ret = cfbCreateDefColormap(pScreen); + } ++#endif + + miSetZeroLineBias(pScreen, pvfb->lineBias); diff --git a/vnc-via.patch b/vnc-via.patch new file mode 100644 index 0000000..6554427 --- /dev/null +++ b/vnc-via.patch @@ -0,0 +1,186 @@ +--- vnc-4_1-unixsrc/unix/vncviewer/vncviewer.cxx.via 2005-03-03 23:20:33.000000000 +0000 ++++ vnc-4_1-unixsrc/unix/vncviewer/vncviewer.cxx 2005-03-03 23:23:33.000000000 +0000 +@@ -41,6 +41,7 @@ + + using namespace network; + using namespace rfb; ++using namespace std; + + IntParameter pointerEventInterval("PointerEventInterval", + "Time in milliseconds to rate-limit" +@@ -95,6 +96,9 @@ + 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 @@ + 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 for X - built %s\n" +@@ -190,8 +249,6 @@ + usage(); + } + +- if (vncServerName) +- usage(); + vncServerName = argv[i]; + } + +@@ -207,6 +264,19 @@ + 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) { +--- vnc-4_1-unixsrc/unix/vncviewer/vncviewer.man.via 2005-03-03 23:23:41.000000000 +0000 ++++ vnc-4_1-unixsrc/unix/vncviewer/vncviewer.man 2005-03-03 23:24:18.000000000 +0000 +@@ -174,6 +174,23 @@ + 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), +--- vnc-4_1-unixsrc/common/network/TcpSocket.cxx.via 2005-03-03 23:17:55.000000000 +0000 ++++ vnc-4_1-unixsrc/common/network/TcpSocket.cxx 2005-03-03 23:19:49.000000000 +0000 +@@ -54,6 +54,29 @@ + + 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; +--- vnc-4_1-unixsrc/common/network/TcpSocket.h.via 2005-03-03 23:19:58.000000000 +0000 ++++ vnc-4_1-unixsrc/common/network/TcpSocket.h 2005-03-03 23:20:21.000000000 +0000 +@@ -32,8 +32,14 @@ + + #include + ++/* 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 --git a/vnc-viewer-reparent.patch b/vnc-viewer-reparent.patch new file mode 100644 index 0000000..5c5ff23 --- /dev/null +++ b/vnc-viewer-reparent.patch @@ -0,0 +1,115 @@ +--- 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 selectionOwnTime; + std::map 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[]; diff --git a/vnc-viewerIPv6.patch b/vnc-viewerIPv6.patch new file mode 100644 index 0000000..82e4fa0 --- /dev/null +++ b/vnc-viewerIPv6.patch @@ -0,0 +1,192 @@ +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 + #endif + ++#include ++ + 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_; } + }; + diff --git a/vnc-vncpasswd.patch b/vnc-vncpasswd.patch new file mode 100644 index 0000000..ca94d59 --- /dev/null +++ b/vnc-vncpasswd.patch @@ -0,0 +1,22 @@ +--- 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); diff --git a/vnc-vsnprintf.patch b/vnc-vsnprintf.patch new file mode 100644 index 0000000..8abe7d0 --- /dev/null +++ b/vnc-vsnprintf.patch @@ -0,0 +1,20 @@ +--- 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; + diff --git a/vnc-xclients.patch b/vnc-xclients.patch new file mode 100644 index 0000000..eff6ca3 --- /dev/null +++ b/vnc-xclients.patch @@ -0,0 +1,13 @@ +--- 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". diff --git a/vnc.spec b/vnc.spec new file mode 100644 index 0000000..64530d9 --- /dev/null +++ b/vnc.spec @@ -0,0 +1,798 @@ +%define vnc_version 4_1_2 +%define java_vnc_version 4_1 + +Summary: A remote display system +Name: vnc +Version: 4.1.2 +Release: 24.1%{?dist} +URL: http://www.realvnc.com +Source0: http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz +Source1: http://www.realvnc.com/dist/vnc-%{java_vnc_version}-javasrc.tar.gz +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 +Patch19: vnc-ppc64.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 +Patch37: vnc-noxorg.patch +Patch39: vnc-manminor.patch +Patch40: vnc-bounds.patch +Patch41: vnc-viewerIPv6.patch +License: GPLv2 +Group: User Interface/Desktops +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: perl +BuildRequires: zlib-devel libjpeg-devel +BuildRequires: desktop-file-utils >= 0.2.92 +BuildRequires: gcc-java +BuildRequires: autoconf, automake, libtool, flex, bison, pkgconfig, patchutils +BuildRequires: expat-devel, freetype-devel +BuildRequires: libX11-devel, xorg-x11-xtrans-devel, libXau-devel +BuildRequires: libXdmcp-devel, libxkbfile-devel, libXfont-devel +BuildRequires: xorg-x11-proto-devel, libXext-devel, tcp_wrappers-devel +BuildRequires: libXtst-devel, libfontenc-devel, xorg-x11-util-macros +BuildRequires: libXt-devel +BuildRequires: libstdc++-devel, gcc-c++, libselinux-devel +BuildRequires: xorg-x11-server-source +BuildRequires: mesa-libGL-devel >= 6.5.2, mesa-source >= 6.5.2, libdrm-devel + +Requires: gtk2 >= 2.6 +Requires: coreutils +Requires: vnc-libs + +%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-fonts-misc, xorg-x11-xauth, chkconfig +Requires: vnc-libs +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 -a1 +cp -r %{_datadir}/xorg-x11-server-source unix +%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 +%patch12 -p1 -b .nohttpd +%patch15 -p1 -b .viewer-reparent +%patch16 -p1 -b .64bit +%patch17 -p1 -b .select +%patch19 -p1 -b .ppc64 +%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 +%patch37 -p1 -b .nomodule + +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/ +cp -a unix/xorg-x11-server-source/{cfb/cfb.h,hw/vnc} +cp -a unix/xorg-x11-server-source/{fb/fb.h,hw/vnc} +cp -a unix/xorg-x11-server-source/{fb/fbrop.h,hw/vnc} +sed -i -e 's,xor,c_xor,' -e 's,and,c_and,' \ + unix/xorg-x11-server-source/hw/vnc/{cfb,fb,fbrop}.h + +%patch39 -p1 -b .minor +%patch40 -p1 -b .bounds +%patch41 -p1 -b .ipv6 + +%build +cd common +autoreconf --install --force +%configure +make %{?_smp_mflags} + +cd ../vnc-%{java_vnc_version}-javasrc/java +make JAVAC="gcj -C" JAR=fastjar %{?_smp_mflags} + +cd ../../unix +autoreconf --install --force +%configure +make %{?_smp_mflags} + +cd xorg-x11-server-source +aclocal; automake -a; autoconf +%configure --disable-xorg \ + --disable-xnest --enable-xvfb \ + --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ + --with-pic \ + --disable-xorgcfg \ + --disable-xprint \ + --disable-static \ + --disable-composite \ + --enable-xtrap \ + --enable-xcsecurity \ + --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ + --with-fontdir=%{_datadir}/X11/fonts \ + --with-os-name="Fedora 8" \ + --with-os-vendor="Red Hat, Inc." \ + --with-xkb-output=%{_localstatedir}/lib/xkb \ + --with-rgb-path=%{_datadir}/X11/rgb \ + --enable-install-libxf86config \ + --disable-xevie \ + --disable-dri \ + --enable-glx \ + --with-mesa-source=%{_datadir}/mesa/source + +make %{?_smp_mflags} + +%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%{_datadir}/vnc/classes +cp -a ../vnc-%{java_vnc_version}-javasrc/java/{index.vnc,logo150x150.gif,vncviewer.jar} $RPM_BUILD_ROOT%{_datadir}/vnc/classes + +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 +# . + +# 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 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/vnc.png +install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/vnc.png +install %{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 + +# removing 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) %config /etc/rc.d/init.d/vncserver +%config(noreplace) /etc/sysconfig/vncservers +%{_bindir}/Xvnc +%{_bindir}/vncpasswd +%{_bindir}/vncconfig +%{_bindir}/vncserver +%{_bindir}/x0vncserver +%{_datadir}/vnc +%{_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 Jun 30 2008 Adam Tkac 4.1.2-24.1 +- improved IPv6 support in viewer (#438422) + +* Wed Mar 19 2008 Adam Tkac 4.1.2-24 +- minor vncviewer manpage fixes (#427672, #427701) +- validate framebuffer bounds before GetImage call (#430468) + +* Wed Dec 19 2007 Adam Tkac 4.1.2-23.1 +- changed default fontpath to + catalogue:/etc/X11/fontpath.d,built-ins (#390971) +- Requires xorg-x11-fonts-misc instead xorg-x11-fonts-base + +* Tue Oct 23 2007 Adam Tkac 4.1.2-23 +- disabled Composite extension (#242280, #339811) + +* Mon Sep 24 2007 Adam Tkac 4.1.2-22 +- obsoleted vnc-s390.patch +- build with --disable-xorg + +* Wed Aug 22 2007 Adam Tkac 4.1.2-21 +- rebuild (BuildID feature) +- GPLv2 license + +* Mon Aug 06 2007 Adam Tkac 4.1.2-20.2 +- updated vnc-s390 patch to latest xorg + +* Wed Aug 01 2007 Adam Tkac 4.1.2-20.1 +- rebuild + +* Tue Jul 31 2007 Adam Tkac 4.1.2-20 +- vnc service is now disabled in all runlevels by default (#250157) + +* Tue Jul 17 2007 Adam Tkac 4.1.2-19 +- initscript is ready for parallel booting (#247092) + +* Thu Jun 08 2007 Adam Tkac 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 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 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 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 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 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 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 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 4.1.2-10.fc7 +- fixed render crashing when run in 8bpp + +* Mon Jan 08 2007 Adam Tkac 4.1.2-9.fc7 +- enable render extensions by default on s390 & s390x + +* Wed Dec 13 2006 Adam Tkac 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 4.1.2-8.fc7 +- fixed building against mesa-6.5.2 + +* Tue Dec 05 2006 Adam Tkac 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 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 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 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 4.1.2-5 +- added xorg-x11-fonts-base dependency +- fixed vncconfig crash on x64 (#179635) + +* Tue Oct 17 2006 Adam Tkac 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 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 4.1.2-2 +- update xorg-x11-server to 1.1.0 to fix crashes in anaconda + +* Fri May 26 2006 Jitka Kudrnacova 4.1.2-1 +- enable OpenGL support + +* Thu May 25 2006 Jitka Kudrnacova 4.1.2-0.1 +- fixed building on ppc64 + +* Thu May 18 2006 Jitka Kudrnacova 4.1.2-0 +- update to version 4.1.2 + +* Wed May 10 2006 Jitka Kudrnacova 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 4.1.1-37 +- removed liblbxutil-devel from BuildRequires + +* Tue Feb 28 2006 Jitka Kudrnacova 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 - 4.1.1-35.1 +- bump again for double-long bug on ppc(64) + +* Wed Feb 08 2006 Jitka Kudrnacova 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 - 4.1.1-34.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 31 2006 Tim Waugh 4.1.1-34 +- Updated xorg-x11-server to 1.0.1-1. + +* Tue Jan 3 2006 Tim Waugh 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 4.1.1-32 +- Use system libtool to fix libvnc.so build (bug #176435). + +* Wed Dec 21 2005 Tim Waugh 4.1.1-31 +- Rebase on xorg-x11-server-1.0.0-2. + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Dec 8 2005 Tim Waugh 4.1.1-30 +- Enable Xdmcp (bug #175298). + +* Thu Dec 8 2005 Tim Waugh 4.1.1-29 +- Fix x0vncserver (bug #172410). + +* Tue Dec 6 2005 Tim Waugh 4.1.1-28 +- Enable all the extensions, which were accidentally disabled. + +* Tue Dec 6 2005 Tim Waugh 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 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 4.1.1-25 +- Actually initialise the vnc extension in Xvnc. +- Disable lbx. + +* Thu Dec 1 2005 Tim Waugh 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 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 4.1.1-22 +- Extension module is not available on all architectures. + +* Fri Nov 18 2005 Tim Waugh 4.1.1-21 +- Install extension module into the correct directory. + +* Fri Nov 18 2005 Tim Waugh 4.1.1-20 +- Fix font path correctly (bug #173160). + +* Wed Nov 16 2005 Tim Waugh 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 4.1.1-18 +- Build requires xorg-x11-devel not XFree86-devel. + +* Tue Sep 6 2005 Tim Waugh 4.1.1-17 +- Make vncviewer prevent xscreensaver from blanking screen (bug #106552). + +* Thu Aug 11 2005 Tim Waugh 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 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 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 4.1.1-13 +- RENDER clipping fix from Mark McLoughlin. + +* Mon Jun 27 2005 Tim Waugh 4.1.1-12 +- Fixed vncpasswd crash (bug #160471). + +* Wed Jun 22 2005 Tim Waugh +- Updated URL in vncservers file (bug #161334). + +* Tue Jun 21 2005 Tim Waugh 4.1.1-11 +- Don't ship vncconfig.py any more. +- Enable render by default for further testing. + +* Mon Jun 20 2005 Tim Waugh +- Build requires expat-devel (bug #160982). + +* Wed Apr 27 2005 Jeremy Katz - 4.1.1-10 +- silence %%post + +* Fri Apr 15 2005 Tim Waugh 4.1.1-9 +- Disable render by default. There are still screen artifacts from it. + +* Fri Apr 1 2005 Tim Waugh 4.1.1-8 +- Further render patch fix for Peter Åstrand. + +* Thu Mar 31 2005 Tim Waugh 4.1.1-7 +- Render patch fix from Peter Åstrand. Enabled render by default again. + +* Mon Mar 28 2005 Christopher Aillon 4.1.1-6 +- rebuilt + +* Fri Mar 25 2005 Christopher Aillon 4.1.1-5 +- Update the GTK+ theme icon cache on (un)install + +* Thu Mar 24 2005 Tim Waugh 4.1.1-4 +- Upgraded base package to xorg-x11-6.8.2-13. + +* Thu Mar 17 2005 Tim Waugh 4.1.1-3 +- Disable render by default (+render turns it back on). + +* Fri Mar 11 2005 Tim Waugh 4.1.1-2 +- 4.1.1 (with 4.1 Java viewer). +- No longer need module patch. + +* Thu Mar 10 2005 Tim Waugh 4.1-0.2 +- Improved render patch from Peter Åstrand. + +* Thu Mar 3 2005 Tim Waugh 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 4.0-15 +- Upgraded base package to xorg-x11-6.8.2-6. +- Rebuild for new GCC. + +* Wed Feb 23 2005 Tim Waugh 4.0-14 +- Render support from Peter Åstrand. + +* Thu Feb 3 2005 Tim Waugh +- Don't restart the vncserver service on upgrade. + +* Tue Feb 1 2005 Tim Waugh 4.0-13 +- Upgraded base package to xorg-x11-6.8.1.903-2. + +* Fri Jan 7 2005 Tim Waugh +- Build requires patchutils (bug #144450). + +* Wed Jan 5 2005 Tim Waugh 4.0-12 +- Don't use initlog in the initscript. + +* Fri Dec 31 2004 Tim Waugh +- Cookie generation improvement from Jon Peatfield. + +* Mon Dec 13 2004 Tim Waugh 4.0-11 +- Create /tmp/.X11-unix if it doesn't already exist. + +* Wed Nov 24 2004 Tim Waugh 4.0-10 +- Use fastjar, not jar, so that the package rebuilds (bug #140671). + +* Wed Nov 17 2004 Tim Waugh 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 4.0-8 +- Use runuser not su in initscript (bug #134594). + +* Wed Sep 29 2004 Tim Waugh 4.0-7 +- Upgraded base package to xorg-x11-6.8.1-4. + +* Tue Aug 31 2004 Tim Waugh 4.0-6 +- Upgraded base package to xorg-x11-6.7.99.903-1. + +* Fri Aug 27 2004 Tim Waugh 4.0-5 +- Built for Fedora Core 2. + +* Wed Aug 25 2004 Tim Waugh 4.0-4 +- Apply and enable Kristian Høgsberg's --use-fb patch. + +* Mon Aug 2 2004 Tim Waugh +- Fixed vnc-via patch (bug #128940). + +* Thu Jun 24 2004 Tim Waugh 4.0-3 +- 4.0. +- No longer need hotspot patch. +- Add sparc patch from bug #126382. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Jun 1 2004 Tim Waugh 4.0-1.beta5.6 +- Turn ppc64 builds on again. + +* Tue Jun 1 2004 Tim Waugh 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 4.0-1.beta5.4 +- Further vnc.def fix. +- Fix cursor handling for hotspots outside the bounding rectangle. + +* Thu May 27 2004 Tim Waugh 4.0-1.beta5.3 +- Fix ppc64 build. +- Fix debuginfo package. +- Another fix for REGION_INIT usage. + +* Wed May 26 2004 Tim Waugh 4.0-1.beta5.2 +- Switch to xorg-x11 (bug #119530). + +* Thu May 20 2004 Tim Waugh 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 4.0-1.beta4.11 +- Allow parameters to be specified in the init script (bug #60176). + +* Wed Mar 31 2004 Tim Waugh 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 4.0-1.beta4.9 +- Build against xorg-x11. + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Sun Feb 1 2004 Tim Waugh +- Build fixes for GCC 3.4. + +* Fri Jan 23 2004 Tim Waugh 4.0-0.beta4.8 +- Fix last fix (bug #114063). + +* Thu Jan 22 2004 Tim Waugh 4.0-0.beta4.7 +- Restart connect() if a signal interrupts it (bug #114063). + +* Thu Nov 27 2003 Tim Waugh +- Fixed -via parsing bug in vncviewer (bug #110919). + +* Fri Nov 14 2003 Tim Waugh 4.0-0.beta4.6 +- F8 fix (bug #109377). + +* Mon Nov 10 2003 Tim Waugh 4.0-0.beta4.5 +- Better fix for bug #107455. + +* Sat Nov 8 2003 Tim Waugh 4.0-0.beta4.4 +- Fixed zero-sized cursor problem (bug #107455). + +* Thu Oct 2 2003 Tim Waugh +- Added icons (bug #105820). + +* Fri Sep 19 2003 Tim Waugh 4.0-0.beta4.3 +- Avoid a potential Xvnc crash (bug #104702). + +* Fri Sep 5 2003 Tim Waugh 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 4.0-0.beta3.10 +- Fixed SSH tunnelling support (bug #102213). + +* Fri Aug 22 2003 Tim Waugh 4.0-0.beta3.9 +- Add SSH tunnelling support (bug #102213). + +* Wed Aug 20 2003 Tim Waugh 4.0-0.beta3.8 +- Disable IdleTimeout by default. + +* Mon Aug 18 2003 Tim Waugh 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 4.0-0.beta3.6 +- Use patched tarball from XFree86 package. +- Build Java VNC viewer. + +* Wed Aug 6 2003 Tim Waugh 4.0-0.beta3.5.1 +- Rebuilt. + +* Wed Aug 6 2003 Tim Waugh 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 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 4.0-0.beta3.3 +- Disable RENDER altogether for Xvnc. + +* Mon Aug 4 2003 Tim Waugh 4.0-0.beta3.2 +- Reinstated init script. +- Add work-around for Xcursor bug. + +* Thu Jul 31 2003 Tim Waugh 4.0-0.beta3.1 +- Initial package. diff --git a/vncserver.init b/vncserver.init new file mode 100755 index 0000000..3a5bf57 --- /dev/null +++ b/vncserver.init @@ -0,0 +1,125 @@ +#!/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" +