summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunge <runge>2007-03-20 23:35:08 +0000
committerrunge <runge>2007-03-20 23:35:08 +0000
commitd013b8766ff947468b0f564a539bc17cd7c303b0 (patch)
tree8cadc5d514a7fadbef8ef1c7b115d863cff8a2e8
parent5e4546628cbd6a450fa7eeea67c1434269cf6154 (diff)
downloadlibtdevnc-d013b8766ff947468b0f564a539bc17cd7c303b0.tar.gz
libtdevnc-d013b8766ff947468b0f564a539bc17cd7c303b0.zip
ssvnc: sync to 1.0.13 release.
-rw-r--r--x11vnc/misc/enhanced_tightvnc_viewer/README44
-rw-r--r--x11vnc/misc/enhanced_tightvnc_viewer/Windows/README.txt18
-rwxr-xr-xx11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl45
-rwxr-xr-xx11vnc/misc/enhanced_tightvnc_viewer/build.unix11
-rwxr-xr-xx11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle2
-rw-r--r--x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch69
6 files changed, 150 insertions, 39 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/README b/x11vnc/misc/enhanced_tightvnc_viewer/README
index 6bb2e16..36b81a0 100644
--- a/x11vnc/misc/enhanced_tightvnc_viewer/README
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/README
@@ -22,17 +22,15 @@ See these sites and related ones for more information:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
http://sourceforge.net/projects/cotvnc/
-Note: Some of the Windows binaries included contain cryptographic software
-that you may not be allowed to download, use, or redistribute. Please
-check your situation first before downloading any of these bundles.
-See the survey http://rechten.uvt.nl/koops/cryptolaw/index.htm for useful
-information. The Unix programs do not contain cryptographic software, but
-rather will make use of cryptographic libraries that are installed on your
-Unix system. Depending on your circumstances you may still need to check.
-
-All work by Karl J. Runge in this project is Copyright (c) 2006 Karl J. Runge
-and is licensed under the GPL as described in the file COPYING in this
-directory.
+Note: Some of the binaries included contain cryptographic software that
+you may not be allowed to download, use, or redistribute. Please check
+your situation first before downloading any of these bundles. See the
+survey http://rechten.uvt.nl/koops/cryptolaw/index.htm for useful
+information.
+
+All work done by Karl J. Runge in this project is
+Copyright (c) 2006-2007 Karl J. Runge and is licensed under the GPL as
+described in the file COPYING in this directory.
All the files and information in this project are provided "AS IS"
without any warranty of any kind. Use them at your own risk.
@@ -52,7 +50,7 @@ The short name of the project is "ssvnc" for SSL/SSH VNC Viewer.
It is a self-contained bundle, you could carry it around on, say,
a USB memory stick for secure VNC viewing from almost any machine,
-Unix or Windows.
+Unix, Mac, or Windows.
Features:
--------
@@ -99,6 +97,8 @@ The enhanced TightVNC viewer features are:
- Cursor alphablending with x11vnc at 32bpp (-alpha option)
+ - Maintains its own BackingStore if the X server does not
+
- x11vnc's client-side caching -ncache method cropping option
(-ycrop n). This will "hide" the large pixel buffer cache
below the actual display. Set to actual height or use -1 for
@@ -188,8 +188,26 @@ Windows:
You can make a Windows shortcut to this program if you want to.
See the Windows/README.txt for more info.
+
+Important Note for Windows Vista: One user reports that on Windows Vista
+if you move or extract the "ssvnc" folder down to the "Program Files"
+folder you will be prompted to do this as the Administrator. But then
+when you start up ssvnc, as a regular user, it cannot create files in
+that folder and so it fails to run properly. We recommend to not copy
+or extract the "ssvnc" folder into "Program Files". Rather, extract
+it to somewhere you have write permission (e.g. C:\ or your User dir)
+and create a Shortcut to ssvnc.exe on the desktop.
+
+If you must put a launcher file down in "Program Files", perhaps an
+"ssvnc.bat" that looks like this:
+
+C:
+cd \ssvnc\Windows
+ssvnc.exe
+
+
Bundle Info:
------------
@@ -262,6 +280,8 @@ README is in, i.e "ssvnc") and like this:
To use custom locations for libraries see the LDFLAGS_OS and CPPFLAGS_OS
description at the top of the build.unix script.
+Feel free to ask us if you need help running ./build.unix
+
The programs:
------------
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/Windows/README.txt b/x11vnc/misc/enhanced_tightvnc_viewer/Windows/README.txt
index d35c410..cccc9f5 100644
--- a/x11vnc/misc/enhanced_tightvnc_viewer/Windows/README.txt
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/Windows/README.txt
@@ -49,3 +49,21 @@ Misc:
Also, the kill.exe and tlist.exe programs in the w98 directory
came from diagnostic tools ftp site of Microsoft's.
+
+
+
+Important Note for Windows Vista: One user reports that on Windows Vista
+if you move or extract the "ssvnc" folder down to the "Program Files"
+folder you will be prompted to do this as the Administrator. But then
+when you start up ssvnc, as a regular user, it cannot create files in
+that folder and so it fails to run properly. We recommend to not copy
+or extract the "ssvnc" folder into "Program Files". Rather, extract
+it to somewhere you have write permission (e.g. C:\ or your User dir)
+and create a Shortcut to ssvnc.exe on the desktop.
+
+If you must put a launcher file down in "Program Files", perhaps an
+"ssvnc.bat" that looks like this:
+C:
+cd \ssvnc\Windows
+ssvnc.exe
+
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl
index 0e7f3bb..77e7c27 100755
--- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl
@@ -883,6 +883,7 @@ proc get_ipconfig {} {
append file [pid]
append file ".txt"
+ # VF
catch {[exec winipcfg /Batch $file]}
if [file exists $file] {
@@ -984,6 +985,7 @@ proc windows_start_sound_daemon {file} {
global env
global use_sound sound_daemon_local_cmd sound_daemon_local_start
+ # VF
regsub {\.bat} $file "snd.bat" file2
set fh2 [open $file2 "w"]
@@ -1240,11 +1242,13 @@ proc launch_windows_ssh {hp file n} {
set setup_cmds [ugly_setup_scripts pre $tag]
if {$setup_cmds != ""} {
+ # VF
regsub {\.bat} $file "pre.cmd" file_pre_cmd
set fh [open $file_pre_cmd "w"]
puts $fh "$setup_cmds sleep 10; "
close $fh
+ # VF
regsub {\.bat} $file "pre.bat" file_pre
set fh [open $file_pre "w"]
set plink_str "plink.exe -ssh -C -P $ssh_port -m $file_pre_cmd $verb -t"
@@ -1290,6 +1294,7 @@ proc launch_windows_ssh {hp file n} {
set file_cmd ""
if {$setup_cmds != ""} {
+ # VF
regsub {\.bat} $file ".cmd" file_cmd
set fh_cmd [open $file_cmd "w"]
@@ -1315,6 +1320,7 @@ proc launch_windows_ssh {hp file n} {
windows_start_sound_daemon $file
}
+ # VF
set fh [open $file "w"]
if {$is_win9x} {
puts $fh "cd $pwd"
@@ -1392,6 +1398,7 @@ proc launch_windows_ssh {hp file n} {
if {$double_ssh != ""} {
set plink_str_double_ssh "plink.exe -ssh -t $pw $double_ssh \"echo sleep 60 ...; sleep 60; echo done.\""
+ # VF
regsub {\.bat} $file "dob.bat" file_double
set fhdouble [open $file_double "w"]
puts $fhdouble $plink_str_double_ssh
@@ -2089,6 +2096,7 @@ proc fetch_cert {} {
global is_windows
set tmp "/tmp/cert.hsh.[pid]"
if {$is_windows} {
+ # VF
set tmp cert.hsh
}
set fh ""
@@ -2181,6 +2189,7 @@ proc fetch_cert_windows {hp} {
set ossl [get_openssl]
update
+ # VF
set tin tmpin.txt
set tou tmpout.txt
set fh ""
@@ -2891,10 +2900,11 @@ proc launch {{hp ""}} {
}
}
+ # VF
set prefix "stunnel-vnc"
set suffix "conf"
if {$use_ssh || $use_sshssl} {
- set prefix "plink-vnc"
+ set prefix "plink_vnc"
set suffix "bat"
}
@@ -3450,6 +3460,7 @@ emailAddress_max = 64
global is_windows
if {$is_windows} {
+ # VF
set tmp "cert.cfg"
} else {
set tmp "/tmp/cert.cfg."
@@ -7439,6 +7450,34 @@ proc set_options {} {
focus .o
}
+proc check_writable {} {
+ set test test[pid].txt
+ catch {set f [open $test "w"]; puts $f "test"; close $f}
+
+ ###catch {file delete -force $test} # testing.
+
+ if ![file exists $test] {
+ global env
+ if [info exists env(HOME)] {
+ set dir "$env(HOME)/ss_vnc/cache"
+ catch {file mkdir $dir}
+ if ![file exists $dir] {
+ return
+ }
+ foreach f [glob -type f * */* */*/*] {
+ set dest "$dir/$f"
+ set dirn [file dirname $dest]
+ catch {file mkdir $dirn}
+ catch {file copy -force -- $f $dest}
+ }
+ cd $dir
+ ###catch {set f [open $test "w"]; puts $f "test"; close $f}
+ }
+ } else {
+ catch {file delete -force $test}
+ }
+}
+
global env
set is_windows 0
set help_font "-font fixed"
@@ -7454,6 +7493,10 @@ if {[regexp -nocase {Windows.9} $tcl_platform(os)]} {
set is_win9x 0
}
+if {$is_windows} {
+ check_writable
+}
+
set uname ""
if {! $is_windows} {
catch {set uname [exec uname]}
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/build.unix b/x11vnc/misc/enhanced_tightvnc_viewer/build.unix
index e18510c..64da4da 100755
--- a/x11vnc/misc/enhanced_tightvnc_viewer/build.unix
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/build.unix
@@ -87,13 +87,16 @@ mkdir -p $tmp || exit 1
#
libs="$tmp/libs"
mkdir -p $libs || exit 1
-#for liba in libz.a libjpeg.a libssl.a libcrypto.a
-for liba in libz.a libjpeg.a
+for liba in libz.a libjpeg.a libssl.a libcrypto.a
+#for liba in libz.a libjpeg.a
do
for dir in /usr/lib /lib /usr/local/lib /usr/pkg/lib /usr/sfw/lib /usr/openwin/lib
do
if [ "$name" = "Linux.x86_64" -o "$name" = "Linux.ppc64" ] ; then
dir64=`echo "$dir" | sed -e 's,lib,lib64,'`
+ if [ -d $dir64 ]; then
+ dir=$dir64
+ fi
fi
try="$dir/$liba"
if [ -f $try ]; then
@@ -128,6 +131,10 @@ END
fi
fi
+if [ -d /var/tmp/LIBS ]; then
+ LDFLAGS_OS="$LDFLAGS_OS -L/var/tmp/LIBS"
+fi
+
if [ `uname` = "SunOS" ]; then
LDFLAGS_OS="$LDFLAGS_OS -L/usr/sfw/lib -R/usr/sfw/lib"
CPPFLAGS_OS="$CPPFLAGS_OS -I /usr/sfw/include"
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle
index 694e132..63ccafe 100755
--- a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle
@@ -1,7 +1,7 @@
#!/bin/sh
rm -rf ./src/tmp/* || exit 1
-vers=1.0.12
+vers=1.0.13
cd .. || exit 1
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch
index 292fc5c..02ba032 100644
--- a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch
+++ b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch
@@ -1128,7 +1128,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cp_it vnc_unixsrc/vncviewer/c
+ls -l ./vncviewer $dest /dist/src/apps/VNC/etc/libvncserver_cvs/expts/etv/ssvnc/bin/Linux.i686/vncviewer
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewer/cursor.c
--- vnc_unixsrc.orig/vncviewer/cursor.c 2003-01-15 04:46:52.000000000 -0500
-+++ vnc_unixsrc/vncviewer/cursor.c 2007-02-08 18:46:24.000000000 -0500
++++ vnc_unixsrc/vncviewer/cursor.c 2007-03-17 22:48:34.000000000 -0400
@@ -39,7 +39,7 @@
static Bool prevSoftCursorSet = False;
@@ -1197,7 +1197,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
free(buf);
return False;
}
-@@ -429,41 +435,51 @@
+@@ -429,41 +435,63 @@
rcLockY + rcLockHeight > rcCursorY - rcHotY);
}
@@ -1252,6 +1252,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
+ if (oper == OPER_SAVE) {
+ /* Save screen area in memory. */
+//fprintf(stderr, "OPER_SAVE\n");
++#if 0
#ifdef MITSHM
- if (appData.useShm)
- XSync(dpy, False);
@@ -1267,17 +1268,28 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
+ {
+ XSync(dpy, False);
+ }
-+ XCopyArea(dpy, desktopWin, rcSavedArea, gc, x, y, w, h, 0, 0);
++#endif
++ if (appData.useBackingstore) {
++ XSync(dpy, False);
++ XCopyArea(dpy, desktopWin, rcSavedArea, gc, x, y, w, h, 0, 0);
++ } else {
++ XPutImage(dpy, rcSavedArea, gc, image, x, y, 0, 0, w, h);
++ }
+ } else {
+//fprintf(stderr, "OPER_RESTORE\n");
+ /* Restore screen area. */
-+ XCopyArea(dpy, rcSavedArea, desktopWin, gc, 0, 0, w, h, x, y);
-+ XGetSubImage(dpy, rcSavedArea, 0, 0, w, h, AllPlanes, ZPixmap, image, x, y);
++ if (appData.useBackingstore) {
++ XCopyArea(dpy, rcSavedArea, desktopWin, gc, 0, 0, w, h, x, y);
++ XGetSubImage(dpy, rcSavedArea, 0, 0, w, h, AllPlanes, ZPixmap, image, x, y);
++ } else {
++ XCopyArea(dpy, rcSavedArea, desktopWin, gc, 0, 0, w, h, x, y);
++ XGetSubImage(dpy, rcSavedArea, 0, 0, w, h, AllPlanes, ZPixmap, image, x, y);
++ }
+ }
}
static void SoftCursorDraw(void)
-@@ -472,6 +488,139 @@
+@@ -472,6 +500,139 @@
int offset, bytesPerPixel;
char *pos;
@@ -1299,10 +1311,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
+ if (alphablend && bytesPerPixel == 4) {
+ unsigned long pixel, put, *upos, *upix;
+ int got_alpha = 0, rsX, rsY, rsW, rsH;
-+ static XImage *image = NULL;
++ static XImage *alpha_image = NULL;
+ static int iwidth = 128;
+
-+ if (! image) {
++ if (! alpha_image) {
+ /* watch out for tiny fb (rare) */
+ if (iwidth > si.framebufferWidth) {
+ iwidth = si.framebufferWidth;
@@ -1312,7 +1324,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
+ }
+
+ /* initialize an XImage with a chunk of desktopWin */
-+ image = XGetImage(dpy, desktopWin, 0, 0, iwidth, iwidth,
++ alpha_image = XGetImage(dpy, desktopWin, 0, 0, iwidth, iwidth,
+ AllPlanes, ZPixmap);
+ }
+
@@ -1343,8 +1355,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
+
+ /* load the saved fb patch in to image (faster way?) */
+ XGetSubImage(dpy, rcSavedArea, 0, 0, rcWidth, rcHeight,
-+ AllPlanes, ZPixmap, image, 0, 0);
-+ upix = (unsigned long *)image->data;
++ AllPlanes, ZPixmap, alpha_image, 0, 0);
++ upix = (unsigned long *)alpha_image->data;
+
+ /* if the richcursor is clipped, the fb patch will be smaller */
+ rsW = rcWidth;
@@ -1417,8 +1429,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
bytesPerPixel = myFormat.bitsPerPixel / 8;
/* FIXME: Speed optimization is possible. */
-@@ -492,23 +641,23 @@
+@@ -490,25 +651,26 @@
+ }
+ }
}
++ XSync(dpy, False);
}
-static void FreeSoftCursor(void)
@@ -1457,7 +1472,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
-
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncviewer/desktop.c
--- vnc_unixsrc.orig/vncviewer/desktop.c 2004-05-28 13:29:29.000000000 -0400
-+++ vnc_unixsrc/vncviewer/desktop.c 2007-03-01 21:05:47.000000000 -0500
++++ vnc_unixsrc/vncviewer/desktop.c 2007-03-17 23:31:56.000000000 -0400
@@ -28,21 +28,28 @@
#include <X11/extensions/XShm.h>
#endif
@@ -1771,7 +1786,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
/*
* DesktopInitAfterRealization does things which require the X windows to
* exist. It creates some GCs and sets the dot cursor.
-@@ -114,34 +306,100 @@
+@@ -114,34 +306,108 @@
void
DesktopInitAfterRealization()
{
@@ -1820,6 +1835,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ NULL, 0);
+
+ if (appData.useBackingstore) {
++ Screen *s = DefaultScreenOfDisplay(dpy);
++ if (DoesBackingStore(s) != Always) {
++ fprintf(stderr, "X server does not do backingstore, disabling it.\n");
++ appData.useBackingstore = False;
++ }
++ }
++
++ if (appData.useBackingstore) {
+ XtVaGetApplicationResources(desktop, (XtPointer)&attr.backing_store,
+ desktopBackingStoreResources, 1, NULL);
+ valuemask |= CWBackingStore;
@@ -1834,8 +1857,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ valuemask |= CWCursor;
+ }
+ bogoCursor = XCreateFontCursor(dpy, XC_bogosity);
-
-- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
++
+ XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+ if (XGetWindowAttributes(dpy, desktopWin, &gattr)) {
+ fprintf(stderr, "desktopWin backingstore: %d save_under: %d\n", gattr.backing_store, gattr.save_under);
@@ -1851,7 +1873,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+{
+ XSetWindowAttributes attr;
+ unsigned long valuemask;
-+
+
+- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+ if (dotCursor == None) {
+ dotCursor = CreateDotCursor();
+ }
@@ -1899,7 +1922,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
-@@ -152,39 +410,53 @@
+@@ -152,39 +418,53 @@
static void
HandleBasicDesktopEvent(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont)
{
@@ -1974,7 +1997,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
-@@ -201,6 +473,9 @@
+@@ -201,6 +481,9 @@
* button2 down, 3 for both, etc).
*/
@@ -1984,7 +2007,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
void
SendRFBEvent(Widget w, XEvent *ev, String *params, Cardinal *num_params)
{
-@@ -213,6 +488,13 @@
+@@ -213,6 +496,13 @@
return;
}
@@ -1998,7 +2021,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
if (appData.viewOnly) return;
if (*num_params != 0) {
-@@ -332,23 +614,112 @@
+@@ -332,23 +622,112 @@
static Cursor
CreateDotCursor()
{
@@ -2127,7 +2150,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
-@@ -359,38 +730,35 @@
+@@ -359,38 +738,35 @@
void
CopyDataToScreen(char *buf, int x, int y, int width, int height)
{
@@ -2193,7 +2216,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
-@@ -401,62 +769,175 @@
+@@ -401,62 +777,175 @@
static void
CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width, int height)
{