Hello community,

here is the log from the commit of package tightvnc.1882 for 
openSUSE:12.3:Update checked in at 2013-07-29 14:49:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/tightvnc.1882 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.tightvnc.1882.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tightvnc.1882"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-23 23:44:04.804033756 +0200
+++ /work/SRC/openSUSE:12.3:Update/.tightvnc.1882.new/tightvnc.changes  
2013-07-29 14:49:17.000000000 +0200
@@ -0,0 +1,417 @@
+-------------------------------------------------------------------
+Tue Jul 23 13:35:52 UTC 2013 - [email protected]
+
+- Add '-securitytypes none' that is necessary for tigervnc again.
+  (bnc#800959)
+
+-------------------------------------------------------------------
+Sun Sep 19 13:22:19 CEST 2010 - [email protected]
+
+- Update to version 1.3.10:
+  + Unix Server:
+    - Applied fixes for 64-bit Linux issues.
+    - Made the vncserver script read configuration from files
+      (system-wide /etc/tightvncserver.conf and user-specific
+      $HOME/.vnc/tightvncserver.conf).
+  + All viewers:
+    - Allow configuring JPEG quality level regardless of the
+      preferred encoding set. This makes sense because TightVNC
+      Servers can transmit video data as JPEG even if Tight is not
+      the preferred encoding.
+  + Other minor improvements and bugfixes.
+- Rebase vncserver.patch to apply without fuzz.
+- Install tightvncserver.conf to /etc.
+- Remove Xvnc manpage, since we do not ship Xvnc here.
+
+-------------------------------------------------------------------
+Tue Sep  7 13:29:38 UTC 2010 - [email protected]
+
+- Add tightvnc-altgr.patch to fix an issue with AltGr modifier
+  keys (bnc#637313).
+
+-------------------------------------------------------------------
+Wed Sep 30 13:21:35 UTC 2009 - [email protected]
+
+- This package requires xinetd 
+
+-------------------------------------------------------------------
+Mon Jul 28 16:57:31 CEST 2008 - [email protected]
+
+- Remove unimplemented -user option from manpage (bnc#409945)
+
+-------------------------------------------------------------------
+Wed Jan 16 17:18:56 CET 2008 - [email protected]
+
+- start Xvnc with "-noreset" to avoid crashes during Xserver reset
+  (Bug #351338)
+
+-------------------------------------------------------------------
+Thu Oct 25 00:56:24 CEST 2007 - [email protected]
+
+- "-SecurityTypes None" parameter no longer required due to switch
+  back to xf4nc
+
+-------------------------------------------------------------------
+Thu Aug  2 16:04:11 CEST 2007 - [email protected]
+
+- New version: 1.3.9
+- Improved x86_64 support and Java viewer
+- Fixed fullscreen mode of vncviewer (#275985)
+
+-------------------------------------------------------------------
+Fri May  4 10:44:35 CEST 2007 - [email protected]
+
+- add unzip to BuildRequires
+
+-------------------------------------------------------------------
+Tue Apr 24 17:34:28 CEST 2007 - [email protected]
+
+- Added tightvnc-rfbversion.patch to work around the non-standard
+  RFB protocol version reported by the XF4VNC server on SLES9.
+  (#267023)
+
+-------------------------------------------------------------------
+Thu Mar  1 18:11:51 CET 2007 - [email protected]
+
+- Fixed the session manager fix (sic!) in the vncserver script.
+- Reverted xinetd fixes that got lost with the last checkin.
+  (#249810)
+
+-------------------------------------------------------------------
+Thu Feb  1 14:32:12 CET 2007 - [email protected]
+
+- Added support for the NewFBSize protocol extension (#199702).
+
+- Prevent X clients inside an Xvnc session from getting killed by
+  the "outer" X session's session manager (#226051)
+
+- New version: 1.3.8:
+- File transfers between viewer and server machines.
+- Support for RFB protocol version 3.7, with TightVNC extensions.
+- Several other improvements and bug fixes to the Unix and Java
+  viewers.
+
+-------------------------------------------------------------------
+Fri Jan 26 21:18:09 CET 2007 - [email protected]
+
+- reverted previous change due to switch back to RH VNC
+
+-------------------------------------------------------------------
+Mon Jan 15 05:18:12 CET 2007 - [email protected]
+
+- removed "-SecurityTypes None" parameter again (Bug #234499)
+
+-------------------------------------------------------------------
+Thu Oct 26 16:02:28 CEST 2006 - [email protected]
+
+- remove hardcoded display 42 and add the newly required parameter
+  "-SecurityTypes None" to xinetd config
+
+-------------------------------------------------------------------
+Mon Oct 23 11:59:01 CEST 2006 - [email protected]
+
+- also fix path /usr/X11R6/bin/Xvnc -> /usr/bin/Xvnc in config file
+
+-------------------------------------------------------------------
+Sat Aug 19 11:31:21 CEST 2006 - [email protected]
+
+- move binaries to /usr/bin and adjust /etc/xinetd.d/vnc 
+
+-------------------------------------------------------------------
+Wed Aug  9 17:06:15 CEST 2006 - [email protected]
+
+- adjusted to new X.Org 7 Xvnc and font path
+
+-------------------------------------------------------------------
+Mon May  8 18:51:54 CEST 2006 - [email protected]
+
+- Tweak the Xaw scrollbars in vncviewer to behavior more like
+  gtk/qt/mac/windows/anything-written-since-the-late-80s
+  scrollbars, so that people don't think they're just broken.
+  (#173294)
+
+-------------------------------------------------------------------
+Wed Mar 22 17:27:25 CET 2006 - [email protected]
+
+- Fixed a color bug that happened when vncviewer was running on a
+  machine with different byte order that the X server it uses.
+  (bug #156440).
+
+-------------------------------------------------------------------
+Wed Jan 25 21:42:10 CET 2006 - [email protected]
+
+- converted neededforbuild to BuildRequires
+
+-------------------------------------------------------------------
+Fri Sep  9 11:21:36 CEST 2005 - [email protected]
+
+- Fix buffer overflows.
+
+-------------------------------------------------------------------
+Fri Jul  8 10:53:32 CEST 2005 - [email protected]
+
+- Added missing header includes.
+
+-------------------------------------------------------------------
+Thu Jun 23 07:53:42 CEST 2005 - [email protected]
+
+- use RPM_OPT_FLAGS.
+
+-------------------------------------------------------------------
+Fri Mar 26 08:56:48 CET 2004 - [email protected]
+
+- fix reg file to use also the new ports (#31004)
+
+-------------------------------------------------------------------
+Sat Mar 20 10:51:14 CET 2004 - [email protected]
+
+- do not use () in SLP descriptions, might break some clients
+
+-------------------------------------------------------------------
+Fri Mar 19 15:13:08 CET 2004 - [email protected]
+
+- Changed the ports in vnc.xinetd to 5801..5803 and 5901..5903,
+  according to bug #31004.
+
+- Added tightvnc-X_SetInputFocus.patch to prevent vncviewer from
+  crashing in certain window managers when being iconified
+  (bug #36133).
+
+-------------------------------------------------------------------
+Fri Feb 13 16:58:10 CET 2004 - [email protected]
+
+- anounce java service with a http:// URL
+
+-------------------------------------------------------------------
+Wed Dec 17 11:02:01 CET 2003 - [email protected]
+
+- Fixed a typo and added support for 1600x1200 to vnc.xinetd
+  (Bug #33702).
+
+-------------------------------------------------------------------
+Wed Nov 19 17:20:02 CET 2003 - [email protected]
+
+- use $HOSTNAME instead of $LOCALHOST in vnc.reg file
+
+-------------------------------------------------------------------
+Thu Nov 13 23:44:30 CET 2003 - [email protected]
++++ 220 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.tightvnc.1882.new/tightvnc.changes

New:
----
  tightvnc-1.3.10.tar.bz2
  tightvnc-X_SetInputFocus.patch
  tightvnc-altgr.patch
  tightvnc-byteorder.patch
  tightvnc-firewall-http
  tightvnc-firewall-vnc
  tightvnc-fullscreen.patch
  tightvnc-man.patch
  tightvnc-newfbsize.patch
  tightvnc-rfbversion.patch
  tightvnc-vncviewer-scrollbar.patch
  tightvnc.changes
  tightvnc.spec
  vnc.reg
  vnc.xinetd
  vnc_inetd_httpd
  vncconnect.patch
  vncpasswd.arg.patch
  vncpasswd.patch
  vncserver.noreset.patch
  vncserver.patch
  vncviewer.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tightvnc.spec ++++++
#
# spec file for package tightvnc
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           tightvnc
BuildRequires:  libjpeg-devel
BuildRequires:  unzip
BuildRequires:  xorg-x11-devel
Url:            http://www.tightvnc.com
Requires:       xinetd
Requires:       xorg-x11-Xvnc
Provides:       vnc
Obsoletes:      vnc
PreReq:         sed
Summary:        A virtual X-Window System server
License:        GPL-2.0+
Group:          Productivity/Networking/Remote Desktop
Version:        1.3.10
Release:        0
Source0:        %name-%version.tar.bz2
Source1:        vnc_inetd_httpd
Source2:        vnc.xinetd
Source3:        vnc.reg
Source4:        tightvnc-firewall-vnc
Source5:        tightvnc-firewall-http
Patch0:         vncviewer.patch
Patch1:         vncserver.patch
Patch2:         vncpasswd.arg.patch
Patch3:         tightvnc-X_SetInputFocus.patch
Patch4:         vncconnect.patch
Patch5:         vncpasswd.patch
Patch6:         tightvnc-byteorder.patch
Patch7:         tightvnc-vncviewer-scrollbar.patch
Patch8:         tightvnc-newfbsize.patch
Patch9:         tightvnc-rfbversion.patch
Patch10:        tightvnc-fullscreen.patch
Patch11:        vncserver.noreset.patch
Patch12:        tightvnc-man.patch
Patch13:        tightvnc-altgr.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
With vnc, start a virtual X Windows System server and get access to it
from different machines with the vnc-viewer.  You can change the
machine without terminating your session.

The viewer and server are also available for Windows -- they allow
access to vnc under Windows.  You can find it under /dosutils/tightvnc
on the installation media.

%prep
%setup -q -n vnc_unixsrc
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13

%build
xmkmf
make World CCOPTIONS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
mkdir -m755 -p $RPM_BUILD_ROOT/usr/bin
mkdir -m755 -p $RPM_BUILD_ROOT/usr/share/vnc/classes
mkdir -m755 -p $RPM_BUILD_ROOT%_mandir/man1
./vncinstall $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT%_mandir
install -m644 classes/* $RPM_BUILD_ROOT/usr/share/vnc/classes
mkdir -m755 -p $RPM_BUILD_ROOT/etc
install -m644 tightvncserver.conf $RPM_BUILD_ROOT/etc/
mkdir -m755 -p $RPM_BUILD_ROOT/etc/xinetd.d/
cp %{SOURCE2} $RPM_BUILD_ROOT/etc/xinetd.d/vnc
install -m755 -c %{SOURCE1} $RPM_BUILD_ROOT/usr/bin/
mkdir -m755 -p $RPM_BUILD_ROOT/etc/slp.reg.d/
install -m644 -c %{SOURCE3} $RPM_BUILD_ROOT/etc/slp.reg.d/
mkdir -m755 -p %buildroot/etc/sysconfig/SuSEfirewall2.d/services
install -m644 -c %SOURCE4 
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/vnc-server
install -m644 -c %SOURCE5 
%buildroot/etc/sysconfig/SuSEfirewall2.d/services/vnc-httpd
# we don't ship Xvnc
rm $RPM_BUILD_ROOT%_mandir/man1/Xvnc*

%post
if [ -f /etc/xinetd.d/vnc.rpmnew -a -f /etc/xinetd.d/vnc ]; then
        awk '
$1 == "server" {
        sub(/\/usr\/X11R6/,"/usr", $0)
}
$1 == "server_args" && /:42/ {
        sub(/:42/,"", $0);
}
$1 == "server_args" && / -noreset/ {
        sub(/ -noreset/,"", $0);
}
$1 == "server_args" && /=/ {
        sub(/=/,"= -noreset", $0);
}
{
        print
}
        ' < /etc/xinetd.d/vnc > /etc/xinetd.d/vnc.new.$$
        /bin/mv -b /etc/xinetd.d/vnc.new.$$ /etc/xinetd.d/vnc
fi

%files
%defattr(-,root,root)
%doc README LICENCE.TXT ChangeLog WhatsNew
%doc %_mandir/*/*
/usr/share/vnc
/usr/bin/*
%config(noreplace) /etc/tightvncserver.conf
%config(noreplace) /etc/xinetd.d/vnc
%dir /etc/slp.reg.d
%config(noreplace) /etc/slp.reg.d/*
%config(noreplace) /etc/sysconfig/SuSEfirewall2.d/services/*

%changelog
++++++ tightvnc-X_SetInputFocus.patch ++++++
--- vncviewer/misc.c
+++ vncviewer/misc.c
@@ -24,6 +24,7 @@
 #include <vncviewer.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <X11/Xproto.h>
 
 static void CleanupSignalHandler(int sig);
 static int CleanupXErrorHandler(Display *dpy, XErrorEvent *error);
@@ -292,6 +293,8 @@
 static int
 CleanupXErrorHandler(Display *dpy, XErrorEvent *error)
 {
+  if( error->request_code == X_SetInputFocus )
+      return 0;
   fprintf(stderr,"CleanupXErrorHandler called\n");
   Cleanup();
   return (*defaultXErrorHandler)(dpy, error);
++++++ tightvnc-altgr.patch ++++++
--- vncviewer/desktop.c
+++ vncviewer/desktop.c
@@ -34,7 +34,7 @@
 Cursor dotCursor;
 Widget form, viewport, desktop;
 
-static Bool modifierPressed[256];
+static CARD32 downKeysym[256];
 
 static XImage *image = NULL;
 
@@ -79,8 +79,10 @@
   XtAddEventHandler(desktop, LeaveWindowMask|ExposureMask,
                    True, HandleBasicDesktopEvent, NULL);
 
-  for (i = 0; i < 256; i++)
-    modifierPressed[i] = False;
+  for (i = 0; i < 256; i++) {
+    downKeysym[i] = 0;
+  }
+  
 
   CreateImage();
 }
@@ -189,9 +191,9 @@
 
   case LeaveNotify:
     for (i = 0; i < 256; i++) {
-      if (modifierPressed[i]) {
-       SendKeyEvent(XKeycodeToKeysym(dpy, i, 0), False);
-       modifierPressed[i] = False;
+      if (downKeysym[i]) {
+       SendKeyEvent(XKeycodeToKeysym(dpy, downKeysym[i], 0), False);
+       downKeysym[i] = 0;
       }
     }
     break;
@@ -319,15 +321,16 @@
     return;
 
   case KeyPress:
-  case KeyRelease:
     XLookupString(&ev->xkey, keyname, 256, &ks, NULL);
+    downKeysym[ev->xkey.keycode] = ks;
+    SendKeyEvent(ks, True);
+    return;
 
-    if (IsModifierKey(ks)) {
-      ks = XKeycodeToKeysym(dpy, ev->xkey.keycode, 0);
-      modifierPressed[ev->xkey.keycode] = (ev->type == KeyPress);
+  case KeyRelease:
+    if (downKeysym[ev->xkey.keycode]) {
+      SendKeyEvent(downKeysym[ev->xkey.keycode], False);
+      downKeysym[ev->xkey.keycode] = 0;
     }
-
-    SendKeyEvent(ks, (ev->type == KeyPress));
     return;
 
   default:
++++++ tightvnc-byteorder.patch ++++++
--- vncviewer/colour.c
+++ vncviewer/colour.c
@@ -102,7 +102,7 @@
     myFormat.bitsPerPixel = visbpp;
     myFormat.depth = visdepth;
     myFormat.trueColour = 1;
-    myFormat.bigEndian = (ImageByteOrder(dpy) == MSBFirst);
+    myFormat.bigEndian = (__BYTE_ORDER == __BIG_ENDIAN);
     myFormat.redShift = ffs(vis->red_mask) - 1;
     myFormat.greenShift = ffs(vis->green_mask) - 1;
     myFormat.blueShift = ffs(vis->blue_mask) - 1;
--- vncviewer/desktop.c
+++ vncviewer/desktop.c
@@ -98,6 +98,7 @@
                         BitmapPad(dpy), 0);
 
     image->data = malloc(image->bytes_per_line * image->height);
+    image->byte_order = (__BYTE_ORDER == __BIG_ENDIAN);
     if (!image->data) {
       fprintf(stderr,"malloc failed\n");
       exit(1);
--- vncviewer/vncviewer.h
+++ vncviewer/vncviewer.h
@@ -30,6 +30,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <pwd.h>
+#include <endian.h>
+#include <byteswap.h>
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>
@@ -42,14 +44,13 @@
 
 extern int endianTest;
 
-#define Swap16IfLE(s) \
-    (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
-
-#define Swap32IfLE(l) \
-    (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \
-                            (((l) & 0x00ff0000) >> 8)  | \
-                            (((l) & 0x0000ff00) << 8)  | \
-                            (((l) & 0x000000ff) << 24))  : (l))
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define Swap16IfLE(s) bswap_16 (s)
+#define Swap32IfLE(l) bswap_32 (l)
+#else
+#define Swap16IfLE(s) (s)
+#define Swap32IfLE(l) (l)
+#endif
 
 #define MAX_ENCODINGS 20
 
++++++ tightvnc-firewall-http ++++++
## Name: VNC mini-HTTP server
## Description: Opens the VNC HTTP ports so that browsers can connect.

TCP="5800:5899"
++++++ tightvnc-firewall-vnc ++++++
## Name: VNC
## Description: Opens VNC server ports so that viewers can connect.

TCP="5900:5999"
++++++ tightvnc-fullscreen.patch ++++++
--- vncviewer/fullscreen.c
+++ vncviewer/fullscreen.c
@@ -35,7 +35,35 @@
 static Dimension viewportWidth, viewportHeight;
 static Dimension scrollbarWidth, scrollbarHeight;
 
+#define _NET_WM_STATE_REMOVE        0    /* remove/unset property */
+#define _NET_WM_STATE_ADD           1    /* add/set property */
 
+static void
+netwm_set_state(Display *dpy, Window win, int operation, Atom state)
+{
+    XEvent e;
+    Atom _NET_WM_STATE = XInternAtom(dpy, "_NET_WM_STATE", False);
+
+    memset(&e,0,sizeof(e));
+    e.xclient.type = ClientMessage;
+    e.xclient.message_type = _NET_WM_STATE;
+    e.xclient.display = dpy;
+    e.xclient.window = win;
+    e.xclient.format = 32;
+    e.xclient.data.l[0] = operation;
+    e.xclient.data.l[1] = state;
+
+    XSendEvent(dpy, DefaultRootWindow(dpy), False,
+               SubstructureRedirectMask, &e);
+}
+
+static void
+netwm_fullscreen(Display *dpy, Window win, int state)
+{
+    Atom _NET_WM_STATE_FULLSCREEN = XInternAtom(dpy, 
"_NET_WM_STATE_FULLSCREEN", False);
+    int op = state ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
+    netwm_set_state(dpy,win,op,_NET_WM_STATE_FULLSCREEN);
+}
 
 /*
  * FullScreenOn goes into full-screen mode.  It makes the toplevel window
@@ -99,14 +127,16 @@
     scrollbarHeight = oldViewportHeight - clipHeight;
 
     if (si.framebufferWidth > dpyWidth) {
-      viewportWidth = toplevelWidth = dpyWidth + scrollbarWidth;
+       toplevelWidth = dpyWidth + scrollbarWidth;
+       viewportWidth = toplevelWidth;
     } else {
       viewportWidth = si.framebufferWidth + scrollbarWidth;
       toplevelWidth = dpyWidth;
     }
 
     if (si.framebufferHeight > dpyHeight) {
-      viewportHeight = toplevelHeight = dpyHeight + scrollbarHeight;
+       toplevelHeight = dpyHeight + scrollbarHeight;
+       viewportHeight = toplevelHeight;
     } else {
       viewportHeight = si.framebufferHeight + scrollbarHeight;
       toplevelHeight = dpyHeight;
@@ -122,37 +152,14 @@
   viewportX = (toplevelWidth - viewportWidth) / 2;
   viewportY = (toplevelHeight - viewportHeight) / 2;
 
-
   /* We want to stop the window manager from managing our toplevel window.
      This is not really a nice thing to do, so may not work properly with every
      window manager.  We do this simply by setting overrideRedirect and
      reparenting our window to the root.  The window manager will get a
      ReparentNotify and hopefully clean up its frame window. */
 
-  XtVaSetValues(toplevel, XtNoverrideRedirect, True, NULL);
-
-  XReparentWindow(dpy, XtWindow(toplevel), DefaultRootWindow(dpy), 0, 0);
-
-  /* Some WMs does not obey x,y values of XReparentWindow; the window
-     is not placed in the upper, left corner. The code below fixes
-     this: It manually moves the window, after the Xserver is done
-     with XReparentWindow. The last XSync seems to prevent losing
-     focus, but I don't know why. */
-  XSync(dpy, False);
-  XMoveWindow(dpy, XtWindow(toplevel), 0, 0);
-  XSync(dpy, False);
-
-  /* Now we want to fix the size of "viewport".  We shouldn't just change it
-     directly.  Instead we set "toplevel" to the required size (which should
-     propagate through "form" to "viewport").  Then we remove "viewport" from
-     being managed by "form", change its resources to position it and make sure
-     that "form" won't attempt to resize it, then ask "form" to manage it
-     again. */
-
-  XtResizeWidget(toplevel, viewportWidth, viewportHeight, 0);
-
+  XtResizeWidget(viewport, viewportWidth, viewportHeight, 0);
   XtUnmanageChild(viewport);
-
   XtVaSetValues(viewport,
                XtNhorizDistance, viewportX,
                XtNvertDistance, viewportY,
@@ -162,28 +169,10 @@
                XtNbottom, XtChainTop,
                NULL);
 
-  XtManageChild(viewport);
-
-  /* Now we can set "toplevel" to its proper size. */
-
-  XtResizeWidget(toplevel, toplevelWidth, toplevelHeight, 0);
-
-  /* Set the popup to overrideRedirect too */
 
+  XtManageChild(viewport);
   XtVaSetValues(popup, XtNoverrideRedirect, True, NULL);
-
-  /* Try to get the input focus. */
-
-  XSetInputFocus(dpy, DefaultRootWindow(dpy), RevertToPointerRoot,
-                CurrentTime);
-
-  /* Optionally, grab the keyboard. */
-
-  if (appData.grabKeyboard &&
-      XtGrabKeyboard(desktop, True, GrabModeAsync,
-                    GrabModeAsync, CurrentTime) != GrabSuccess) {
-    fprintf(stderr, "XtGrabKeyboard() failed.\n");
-  }
+  netwm_fullscreen(dpy, XtWindow(toplevel), True);
 }
 
 
@@ -210,14 +199,11 @@
 
   appData.fullScreen = False;
 
-  if (appData.grabKeyboard)
-    XtUngrabKeyboard(desktop, CurrentTime);
-
-  XtUnmapWidget(toplevel);
-
+  netwm_fullscreen(dpy, XtWindow(toplevel), False);
   XtResizeWidget(toplevel,
                 viewportWidth - scrollbarWidth,
                 viewportHeight - scrollbarHeight, 0);
+
   XtResizeWidget(viewport,
                 viewportWidth - scrollbarWidth,
                 viewportHeight - scrollbarHeight, 0);
@@ -236,18 +222,6 @@
                NULL);
 
   XtManageChild(viewport);
-
-  XtVaSetValues(toplevel, XtNoverrideRedirect, False, NULL);
-
-  if ((toplevelWidth + appData.wmDecorationWidth) >= dpyWidth)
-    toplevelWidth = dpyWidth - appData.wmDecorationWidth;
-
-  if ((toplevelHeight + appData.wmDecorationHeight) >= dpyHeight)
-    toplevelHeight = dpyHeight - appData.wmDecorationHeight;
-
-  XtResizeWidget(toplevel, toplevelWidth, toplevelHeight, 0);
-
-  XtMapWidget(toplevel);
   XSync(dpy, False);
 
   /* Set the popup back to non-overrideRedirect */
--- vncviewer/misc.c
+++ vncviewer/misc.c
@@ -65,19 +65,6 @@
   dpyWidth = WidthOfScreen(DefaultScreenOfDisplay(dpy));
   dpyHeight = HeightOfScreen(DefaultScreenOfDisplay(dpy));
 
-  if (appData.fullScreen) {
-
-    /* full screen - set position to 0,0, but defer size calculation until
-       widgets are realized */
-
-    XtVaSetValues(toplevel, XtNoverrideRedirect, True,
-                 XtNgeometry, "+0+0", NULL);
-
-  } else {
-
-    /* not full screen - work out geometry for middle of screen unless
-       specified by user */
-
     XtVaGetValues(toplevel, XtNgeometry, &geometry, NULL);
 
     if (geometry == NULL) {
@@ -105,7 +92,6 @@
              toplevelWidth, toplevelHeight, toplevelX, toplevelY);
       XtVaSetValues(toplevel, XtNgeometry, geometry, NULL);
     }
-  }
 
   /* Test if the keyboard is grabbed.  If so, it's probably because the
      XDM login window is up, so try iconifying it to release the grab */
++++++ tightvnc-man.patch ++++++
--- vncviewer/vncviewer.man
+++ vncviewer/vncviewer.man
@@ -88,11 +88,6 @@
 (bell) event. This option disables such behaviour
 (TightVNC\-specific).
 .TP
-\fB\-user\fR \fIusername\fR
-User name for Unix login authentication. Default is to use current
-Unix user name. If this option was given, the viewer will prefer Unix
-login authentication over the standard VNC authentication.
-.TP
 \fB\-passwd\fR \fIpasswd\-file\fR
 File from which to get the password (as generated by the
 \fBvncpasswd\fR(1) program). This option affects only the standard VNC
@@ -262,9 +257,6 @@
 .B passwordFile
 Equivalent of \fB\-passwd\fR option.
 .TP
-.B userLogin
-Equivalent of \fB\-user\fR option.
-.TP
 .B passwordDialog
 Whether to use a dialog box to get the password (true) or get it from
 the tty (false). Irrelevant if \fBpasswordFile\fR is set. Default
++++++ tightvnc-newfbsize.patch ++++++
--- vncviewer/desktop.c
+++ vncviewer/desktop.c
@@ -82,13 +82,23 @@
   for (i = 0; i < 256; i++)
     modifierPressed[i] = False;
 
-  image = NULL;
+  CreateImage();
+}
+
+void
+CreateImage()
+{
+    if (image != NULL) {
+       XDestroyImage(image);
+       image = NULL;
+    }
 
 #ifdef MITSHM
-  if (appData.useShm) {
-    image = CreateShmImage();
-    if (!image)
-      appData.useShm = False;
+    if (appData.useShm) {
+       ShmCleanup();
+       image = CreateShmImage();
+       if (!image)
+           appData.useShm = False;
   }
 #endif
 
--- vncviewer/misc.c
+++ vncviewer/misc.c
@@ -34,6 +34,7 @@
 
 Dimension dpyWidth, dpyHeight;
 Atom wmDeleteWindow, wmState;
+Bool userGeometry = True;
 
 static Bool xloginIconified = False;
 static XErrorHandler defaultXErrorHandler;
@@ -84,6 +85,7 @@
       Dimension toplevelWidth = si.framebufferWidth;
       Dimension toplevelHeight = si.framebufferHeight;
 
+      userGeometry = False;
       if ((toplevelWidth + appData.wmDecorationWidth) >= dpyWidth)
        toplevelWidth = dpyWidth - appData.wmDecorationWidth;
 
--- vncviewer/rfbproto.c
+++ vncviewer/rfbproto.c
@@ -66,7 +66,7 @@
 static void JpegTermSource(j_decompress_ptr cinfo);
 static void JpegSetSrcManager(j_decompress_ptr cinfo, CARD8 *compressedData,
                               int compressedLen);
-
+static void ReadNewFBSize(rfbFramebufferUpdateRectHeader *pfburh);
 
 int rfbsock;
 char *desktopName;
@@ -177,6 +177,8 @@
          sig_rfbEncodingPointerPos, "Pointer position update");
   CapsAdd(encodingCaps, rfbEncodingLastRect, rfbTightVncVendor,
          sig_rfbEncodingLastRect, "LastRect protocol extension");
+  CapsAdd(encodingCaps, rfbEncodingNewFBSize, rfbTightVncVendor,
+         sig_rfbEncodingNewFBSize, "Framebuffer size change");
 }
 
 
@@ -806,6 +808,8 @@
     if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) {
       encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect);
     }
+    if (se->nEncodings < MAX_ENCODINGS)
+       encs[se->nEncodings++] = Swap32IfLE(rfbEncodingNewFBSize);
   }
   else {
     if (SameMachine(rfbsock)) {
@@ -849,6 +853,7 @@
     }
 
     encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect);
+    encs[se->nEncodings++] = Swap32IfLE(rfbEncodingNewFBSize);
   }
 
   len = sz_rfbSetEncodingsMsg + se->nEncodings * 4;
@@ -1023,6 +1028,11 @@
       rect.r.w = Swap16IfLE(rect.r.w);
       rect.r.h = Swap16IfLE(rect.r.h);
 
+      if (rect.encoding == rfbEncodingNewFBSize) {
+         ReadNewFBSize(&rect);
+         break;
+      }
+
       if (rect.encoding == rfbEncodingXCursor ||
          rect.encoding == rfbEncodingRichCursor) {
        if (!HandleCursorShape(rect.r.x, rect.r.y, rect.r.w, rect.r.h,
@@ -1463,3 +1473,35 @@
   cinfo->src = &jpegSrcManager;
 }
 
+//
+// Processing NewFBSize pseudo-rectangle. Create new framebuffer of
+// the size specified in pfburh->r.w and pfburh->r.h, and change the
+// window size correspondingly.
+//
+
+static void ReadNewFBSize(rfbFramebufferUpdateRectHeader *pfburh)
+{
+    si.framebufferWidth = pfburh->r.w;
+    si.framebufferHeight = pfburh->r.h;
+    
+    fprintf(stderr, "NewFBSize: %dx%d\n",
+           si.framebufferWidth, si.framebufferHeight);
+    CreateImage();
+
+    XtUnmanageChild(viewport);
+    XtVaSetValues(desktop,
+                 XtNwidth, si.framebufferWidth,
+                 XtNheight, si.framebufferHeight,
+                 NULL);
+    XtVaSetValues(viewport,
+                 XtNwidth, si.framebufferWidth,
+                 XtNheight, si.framebufferHeight,
+                 NULL);
+    XtVaSetValues(toplevel,
+                 XtNmaxWidth, si.framebufferWidth,
+                 XtNmaxHeight, si.framebufferHeight,
+                 NULL);
+    XtResizeWidget(toplevel,
+                  si.framebufferWidth, si.framebufferHeight, 0);
+    XtManageChild(viewport);
+}
--- vncviewer/vncviewer.h
+++ vncviewer/vncviewer.h
@@ -158,6 +158,7 @@
 
 extern void DesktopInitBeforeRealization();
 extern void DesktopInitAfterRealization();
+extern void CreateImage();
 extern void SendRFBEvent(Widget w, XEvent *event, String *params,
                         Cardinal *num_params);
 extern void CopyDataToScreen(char *buf, int x, int y, int width, int height);
@@ -198,6 +199,7 @@
 extern void Quit(Widget w, XEvent *event, String *params,
                 Cardinal *num_params);
 extern void Cleanup();
+extern Bool userGeometry;
 
 /* popup.c */
 
++++++ tightvnc-rfbversion.patch ++++++
--- vncviewer/rfbproto.c
+++ vncviewer/rfbproto.c
@@ -240,8 +240,9 @@
     return False;
   }
 
-  if (server_major == 3 && server_minor >= 8) {
+  if (server_major == 3 && server_minor >= 8 && server_minor != 130) {
     /* the server supports protocol 3.8 or higher version */
+    /* but not the non-standard version 3.130 of XF4VNC */
     protocolMinorVersion = 8;
   } else if (server_major == 3 && server_minor == 7) {
     /* the server supports protocol 3.7 */
++++++ tightvnc-vncviewer-scrollbar.patch ++++++
--- vncviewer/Vncviewer
+++ vncviewer/Vncviewer
@@ -43,6 +43,18 @@
 *viewport.useRight: True
 *viewport*Scrollbar*thumb: None
 
+!
+! Override the confusing Xaw scrollbar button semantics
+!
+
+*Scrollbar.translations: #override\
+  <Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
+  <Btn1Motion>: MoveThumb() NotifyThumb() \n\
+  <Btn2Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
+  <Btn2Motion>: MoveThumb() NotifyThumb() \n\
+  <Btn3Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
+  <Btn3Motion>: MoveThumb() NotifyThumb() \n\
+  <BtnUp>: NotifyScroll(Proportional) EndScroll()
 
 !
 ! Default translations on desktop window.
--- vncviewer/argsresources.c
+++ vncviewer/argsresources.c
@@ -45,6 +45,15 @@
   "*viewport.useRight: True",
   "*viewport*Scrollbar*thumb: None",
 
+  "*Scrollbar.translations: #override\
+     <Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
+     <Btn1Motion>: MoveThumb() NotifyThumb() \\n\
+     <Btn2Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
+     <Btn2Motion>: MoveThumb() NotifyThumb() \\n\
+     <Btn3Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \\n\
+     <Btn3Motion>: MoveThumb() NotifyThumb() \\n\
+     <BtnUp>: NotifyScroll(Proportional) EndScroll()",
+
   "*desktop.baseTranslations:\
      <Key>F8: ShowPopup()\\n\
      <ButtonPress>: SendRFBEvent()\\n\
++++++ vnc.reg ++++++
#############################################################################
#
# OpenSLP registration file
#
# register VNC remote logins via kdm
# You need also to allow remote logins
#
#############################################################################

# Register VNC service for krdc (KDE VNC client in kdenetwork)
service:remotedesktop.kde:vnc://$HOSTNAME:5901,en,65535
tcp-port=5901
description=VNC remote login [1024x768]

# Register VNC service for krdc (KDE VNC client in kdenetwork)
service:remotedesktop.kde:vnc://$HOSTNAME:5902,en,65535
tcp-port=5902
description=VNC remote login [1280x1024]

# Register VNC service for krdc (KDE VNC client in kdenetwork)
service:remotedesktop.kde:vnc://$HOSTNAME:5903,en,65535
tcp-port=5903
description=VNC remote login [1600x1200]

# Register VNC service for Java clients
# Can be used with every Web browser with enabled Java
service:remotedesktop.java:http://$HOSTNAME:5801,en,65535
tcp-port=5801
description=VNC remote login [1024x768]

# Register VNC service for Java clients
# Can be used with every Web browser with enabled Java
service:remotedesktop.java:http://$HOSTNAME:5802,en,65535
tcp-port=5802
description=VNC remote login [1280x1024]

# Register VNC service for Java clients
# Can be used with every Web browser with enabled Java
service:remotedesktop.java:http://$HOSTNAME:5803,en,65535
tcp-port=5803
description=VNC remote login [1600x1200]

++++++ vnc.xinetd ++++++
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1024x768, 16bit depth.
service vnc1
{
        type            = UNLISTED
        port            = 5901
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/Xvnc
        server_args     = -noreset -inetd -once -query localhost -geometry 
1024x768 -depth 16 -securitytypes none
        disable         = yes
}
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1280x1024, 16bit depth.
service vnc2
{
        type            = UNLISTED
        port            = 5902
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/Xvnc
        server_args     = -noreset -inetd -once -query localhost -geometry 
1280x1024 -depth 16 -securitytypes none
        disable         = yes
}
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1600x1200, 16bit depth.
service vnc3
{
        type            = UNLISTED
        port            = 5903
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/Xvnc
        server_args     = -noreset -inetd -once -query localhost -geometry 
1600x1200 -depth 16 -securitytypes none
        disable         = yes
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5901, (vnc port 1).
service vnchttpd1
{
        type            = UNLISTED
        port            = 5801
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/vnc_inetd_httpd
        server_args     = 1024 768 5901
        disable         = yes
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5902, (vnc port 2).
service vnchttpd2
{
        type            = UNLISTED
        port            = 5802
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/vnc_inetd_httpd
        server_args     = 1280 1024 5902
        disable         = yes
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5902, (vnc port 3).
service vnchttpd3
{
        type            = UNLISTED
        port            = 5803
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/bin/vnc_inetd_httpd
        server_args     = 1600 1200 5903
        disable         = yes
}
++++++ vnc_inetd_httpd ++++++
#!/bin/bash
read request url httptype || exit 0
url="${url/
/}"
httptype="${httptype/
/}"

width=$1
height=$2
port=$3

if [ "x$httptype" != "x" ]; then
        line="x"
        while [ -n "$line" ]; do
                read line || exit 0
                line="${line/
/}"
        done
fi
case "$url" in
/)
        # We need the size of the display for the current applet.
        # The VNC menubar is 20 pixels high ...
        height=$((height+20))
        ctype="text/html"
        content="
<HTML><HEAD><TITLE>Remote Desktop</TITLE></HEAD>
<BODY>
<APPLET CODE=VncViewer.class ARCHIVE=VncViewer.jar WIDTH=$width HEIGHT=$height>
        <param name=PORT value=$port>
</APPLET>
</BODY></HTML>"
        ;;
*.jar|*.class)
        # Use basename to make sure we have just a filename, not ../../...
        url=${url/.*\/}
        ctype="application/octet-stream"
        cfile="/usr/share/vnc/classes/$url"
        content="FILE"
        ;;
esac

if [ "x$httptype" != "x" ]; then
        echo "HTTP/1.0 200 OK"
        echo "Content-Type: $ctype"
        if [ "$content" == "FILE" ]; then
                clen=`wc -c "$cfile"`
        else
                clen=`echo "$content"|wc -c`
        fi
        echo "Content-Length: $clen"
        echo "Connection: close"
        echo
fi

if [ "$request" == "GET" ]; then
        if [ "$content" == "FILE" ]; then
                cat "$cfile"
        else
                echo "$content"
        fi
fi
exit 0
++++++ vncconnect.patch ++++++
--- vncconnect/vncconnect.c
+++ vncconnect/vncconnect.c
@@ -3,6 +3,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 
++++++ vncpasswd.arg.patch ++++++
--- Imakefile
+++ Imakefile
@@ -1,7 +1,7 @@
 #define IHaveSubdirs
 #define PassCDebugFlags
 
-SUBDIRS = libvncauth vncviewer vncpasswd vncconnect
+SUBDIRS = libvncauth vncviewer vncpasswd vncconnect vncpasswd.arg
 
 World:
        make Makefiles
--- vncinstall
+++ vncinstall
@@ -39,7 +39,7 @@
 fi
 
 for f in Xvnc/programs/Xserver/Xvnc vncviewer/vncviewer \
-        vncpasswd/vncpasswd vncconnect/vncconnect vncserver; do
+        vncpasswd/vncpasswd vncpasswd.arg/vncpasswd.arg vncconnect/vncconnect 
vncserver; do
 
   # Installing binaries
   if cmp -s $f $bin_dst/`basename $f`; then
--- vncpasswd.arg/Imakefile
+++ vncpasswd.arg/Imakefile
@@ -0,0 +1,15 @@
+
+#ifdef SunArchitecture
+CC = gcc
+CCOPTIONS =
+CDEBUGFLAGS = -O2
+#endif
+
+SRCS = vncpasswd.arg.c
+INCLUDES = -I../include
+VNCAUTH_LIB = ../libvncauth/libvncauth.a
+
+all:: vncpasswd.arg
+
+NormalProgramTarget(vncpasswd.arg,vncpasswd.arg.o,$(VNCAUTH_LIB),$(VNCAUTH_LIB),)
+DependTarget()
--- vncpasswd.arg/vncpasswd.arg.c
+++ vncpasswd.arg/vncpasswd.arg.c
@@ -0,0 +1,70 @@
+/*
+ *  Copyright (C) 1999 AT&T Laboratories Cambridge.  All Rights Reserved.
+ *
+ *  This is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This software is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this software; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ *  USA.
+ */
+
+/*
+ *  vncpasswd:  A standalone program which gets and verifies a password, 
+ *              encrypts it, and stores it to a file.  Always ignore anything
+ *              after 8 characters, since this is what Solaris getpass() does
+ *              anyway.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "vncauth.h"
+
+static void usage(char *argv[]) {
+  fprintf(stderr,"Usage: %s file password\n",argv[0]);
+  exit(1);
+}
+
+int main(int argc, char *argv[]) {
+  char *passwd;
+  char *passwdFile;
+  int i,len;
+
+  if (argc == 3) {
+      passwdFile = argv[1];
+      passwd = argv[2];
+  } else {
+      usage(argv);
+  }
+
+  if (!passwd) {
+    fprintf(stderr,"Can't get password\n");
+    exit(1);
+  }   
+  if (strlen(passwd) < 6) {
+    fprintf(stderr,"Password too short\n");
+    exit(1);
+  }   
+  if (strlen(passwd) > 8) {
+    passwd[8] = '\0';
+  }
+
+  if (vncEncryptAndStorePasswd(passwd, passwdFile) != 0) {
+    fprintf(stderr,"Cannot write password file %s\n",passwdFile);
+    exit(1);
+  }
+  len = strlen(passwd);
+  for (i = 0; i < len; i++)
+    passwd[i] = '\0';
+  return(0);
+}
++++++ vncpasswd.patch ++++++
--- vncpasswd/vncpasswd.c
+++ vncpasswd/vncpasswd.c
@@ -128,15 +128,15 @@
 
   /* Actually write the passwords. */
   if (!vncEncryptAndStorePasswd2(passwd1, passwd2_ptr, passwdFile)) {
-    memset(passwd1, 0, strlen(passwd1));
-    memset(passwd2, 0, strlen(passwd2));
+    memset(passwd1, 0, sizeof(passwd1));
+    memset(passwd2, 0, sizeof(passwd2));
     fprintf(stderr, "Cannot write password file %s\n", passwdFile);
     exit(1);
   }
 
   /* Zero the memory. */
-  memset(passwd1, 0, strlen(passwd1));
-  memset(passwd2, 0, strlen(passwd2));
+  memset(passwd1, 0, sizeof(passwd1));
+  memset(passwd2, 0, sizeof(passwd2));
   return 0;
 }
 
++++++ vncserver.noreset.patch ++++++
--- vncserver.orig      2008-01-16 17:04:09.733344000 +0100
+++ vncserver   2008-01-16 17:07:29.797847250 +0100
@@ -182,6 +182,9 @@
 $cmd .= " -fp $fontPath" if ($fontPath);
 $cmd .= " -co $colorPath" if ($colorPath);
 
+# Xvnc crashes after reset when client reconnects (Bug #351338)
+$cmd .= " -noreset ";
+
 foreach $arg (@ARGV) {
     $cmd .= " " . &quotedString($arg);
 }
++++++ vncserver.patch ++++++
Index: vncserver
===================================================================
--- vncserver.orig
+++ vncserver
@@ -32,9 +32,9 @@
 $geometry = "1024x768";
 $depth = 24;
 $desktopName = "X";
-$vncClasses = "/usr/local/vnc/classes";
+$vncClasses = "/usr/share/vnc/classes";
 $vncUserDir = "$ENV{HOME}/.vnc";
-$fontPath = "unix/:7100";
+$fontPath = 
"/usr/share/fonts/misc:unscaled,/usr/share/fonts/local,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/Type1,/usr/share/fonts/URW,/usr/share/fonts/Speedo,/usr/share/fonts/truetype,/usr/share/fonts/uni,/usr/share/fonts/CID";
 $authType = "-rfbauth $vncUserDir/passwd";
 
 # Read configuration from the system-wide and user files if present.
@@ -80,7 +80,7 @@ chop($host = `uname -n`);
 
 # Uncomment this line if you want default geometry, depth and pixelformat
 # to match the current X display:
-# &GetXDisplayDefaults();
+&GetXDisplayDefaults();
 
 if ($opt{'-geometry'}) {
     $geometry = $opt{'-geometry'};
@@ -148,11 +148,7 @@ unlink($desktopLog);
 # 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)));
-}
+$cookie = `mcookie`;
 
 system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
 system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie"); 
@@ -227,6 +223,8 @@ if (-e "/tmp/.X11-unix/X$displayNumber")
 }
 $ENV{VNCDESKTOP}= $desktopName;
 
+delete @ENV{qw(SESSION_MANAGER)};
+
 system("$xstartup >> " . &quotedString($desktopLog) . " 2>&1 &");
 
 exit;
@@ -274,7 +272,7 @@ sub CheckGeometryAndDepth
 
 sub GetDisplayNumber
 {
-    foreach $n (1..99) {
+    for ($n = 1; $n < 100; $n++) {
        if (&CheckDisplayNumber($n)) {
            return $n+0; # Bruce Mah's workaround for bug in perl 5.005_02
        }
++++++ vncviewer.patch ++++++
--- vncviewer/Imakefile
+++ vncviewer/Imakefile
@@ -44,4 +44,4 @@
 
 OBJS = $(SRCS:.c=.o)
 
-ComplexProgramTarget(vncviewer)
+ComplexProgramTargetNoMan(vncviewer)
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to