summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x11vnc/ChangeLog3
-rw-r--r--x11vnc/README6
-rw-r--r--x11vnc/remote.c26
-rwxr-xr-xx11vnc/tkx11vnc44
-rw-r--r--x11vnc/tkx11vnc.h44
-rw-r--r--x11vnc/x11vnc.12
-rw-r--r--x11vnc/x11vnc_defs.c2
7 files changed, 111 insertions, 16 deletions
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog
index 74c6843..36dc615 100644
--- a/x11vnc/ChangeLog
+++ b/x11vnc/ChangeLog
@@ -1,3 +1,6 @@
+2009-02-25 Karl Runge <runge@karlrunge.com>
+ * x11vnc: fix some -QD cases for use in tkx11vnc.
+
2009-02-21 Karl Runge <runge@karlrunge.com>
* x11vnc: add -noskip_lockkeys option for future use.
diff --git a/x11vnc/README b/x11vnc/README
index 95714b2..ffdfa15 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Sat Feb 21 21:51:04 EST 2009
+x11vnc README file Date: Wed Feb 25 21:10:01 EST 2009
The following information is taken from these URLs:
@@ -12387,7 +12387,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
-x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-02-21
+x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-02-25
x11vnc options:
-display disp -auth file -N
@@ -12512,7 +12512,7 @@ libvncserver-tight-extension options:
% x11vnc -help
-x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-02-21
+x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-02-25
(type "x11vnc -opts" to just list the options.)
diff --git a/x11vnc/remote.c b/x11vnc/remote.c
index 22295f0..bb037a6 100644
--- a/x11vnc/remote.c
+++ b/x11vnc/remote.c
@@ -1363,7 +1363,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
if (!strcmp(p, "ultrafilexfer")) {
if (query) {
- snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE);
+ if (screen) {
+ snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE);
+ } else {
+ snprintf(buf, bufn, "ans=%s:%d", p, 0);
+ }
goto qry;
}
if (! screen->permitFileTransfer) {
@@ -1374,7 +1378,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
if (!strcmp(p, "noultrafilexfer")) {
if (query) {
- snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE);
+ if (screen) {
+ snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE);
+ } else {
+ snprintf(buf, bufn, "ans=%s:%d", p, 1);
+ }
goto qry;
}
if (screen->permitFileTransfer) {
@@ -1387,7 +1395,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
int maj, min;
COLON_CHECK("rfbversion:")
if (query) {
- snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion);
+ if (screen) {
+ snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion);
+ } else {
+ snprintf(buf, bufn, "ans=%s:%d.%d", p, 3, 8);
+ }
goto qry;
}
p += strlen("rfbversion:");
@@ -5093,6 +5105,14 @@ char *process_remote_cmd(char *cmd, int stringonly) {
NONUL(vnc_desktop_name));
goto qry;
}
+ if (!strcmp(p, "autoport")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, auto_port);
+ goto qry;
+ }
+ if (!strcmp(p, "loop") || !strcmp(p, "loopbg")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, 0);
+ goto qry;
+ }
if (!strcmp(p, "desktopname")) {
snprintf(buf, bufn, "aro=%s:%s", p,
NONUL(rfb_desktop_name));
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index 6071d84..edd07b7 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -148,7 +148,7 @@ Displays
=S reflect:
=D desktop:
=D rfbport:
- =S autoport
+ =S autoport:
=0 gui:
Screen
@@ -254,7 +254,7 @@ Misc
=GAL LOFF
=GAL X-ext::
xtrap
- xrecord
+ noxrecord
=RQA reset_record
=GAL LOFF
=GAL MacOSX::
@@ -2535,8 +2535,38 @@ proc get_default_vars {} {
append qry ",vncconnect"
- set qargs [list "-QD" $qry]
- set all [run_remote_cmd $qargs]
+ set q ""
+ set i 0
+ set all ""
+ foreach s [split $qry ","] {
+ if {$q != ""} {
+ append q ","
+ }
+ append q $s
+ incr i
+ if {$i > 50} {
+ set qargs [list "-QD" $q]
+ set a [run_remote_cmd $qargs]
+ if {$all != ""} {
+ append all ","
+ }
+ append all $a
+ set q ""
+ set i 0
+ }
+ }
+ if {$q != ""} {
+ set qargs [list "-QD" $q]
+ set a [run_remote_cmd $qargs]
+ if {$all != ""} {
+ append all ","
+ }
+ append all $a
+ }
+
+# old way, qry too long...
+# set qargs [list "-QD" $qry]
+# set all [run_remote_cmd $qargs]
if {[regexp {ans=} $all]} {
#append_text "Retrieved all default settings.\n"
@@ -5870,6 +5900,10 @@ proc get_settings_rcfile {} {
continue
} elseif {$item == "rc" || $item == "norc"} {
continue
+ } elseif {$item == "loop"} {
+ continue
+ } elseif {$item == "loopbg"} {
+ continue
}
set def ""
@@ -5877,6 +5911,7 @@ proc get_settings_rcfile {} {
set def $default_var($item)
}
+
set qst ""
set hmm "#? "
if {$item == "display"} {
@@ -5896,6 +5931,7 @@ proc get_settings_rcfile {} {
} else {
set mv $menu_var($item)
}
+#puts "item=$item def=$def mv=$mv"
if {$mv == $unset_str} {
set mv ""
}
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 6787be0..4057a8e 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -159,7 +159,7 @@ char gui_code[] = "";
" =S reflect:\n"
" =D desktop:\n"
" =D rfbport:\n"
-" =S autoport\n"
+" =S autoport:\n"
" =0 gui:\n"
"\n"
"Screen\n"
@@ -265,7 +265,7 @@ char gui_code[] = "";
" =GAL LOFF\n"
" =GAL X-ext::\n"
" xtrap\n"
-" xrecord\n"
+" noxrecord\n"
" =RQA reset_record\n"
" =GAL LOFF\n"
" =GAL MacOSX::\n"
@@ -2546,8 +2546,38 @@ char gui_code[] = "";
"\n"
" append qry \",vncconnect\"\n"
"\n"
-" set qargs [list \"-QD\" $qry]\n"
-" set all [run_remote_cmd $qargs]\n"
+" set q \"\"\n"
+" set i 0\n"
+" set all \"\"\n"
+" foreach s [split $qry \",\"] {\n"
+" if {$q != \"\"} {\n"
+" append q \",\"\n"
+" }\n"
+" append q $s\n"
+" incr i\n"
+" if {$i > 50} {\n"
+" set qargs [list \"-QD\" $q]\n"
+" set a [run_remote_cmd $qargs]\n"
+" if {$all != \"\"} {\n"
+" append all \",\"\n"
+" }\n"
+" append all $a\n"
+" set q \"\"\n"
+" set i 0\n"
+" }\n"
+" }\n"
+" if {$q != \"\"} {\n"
+" set qargs [list \"-QD\" $q]\n"
+" set a [run_remote_cmd $qargs]\n"
+" if {$all != \"\"} {\n"
+" append all \",\"\n"
+" }\n"
+" append all $a\n"
+" }\n"
+"\n"
+"# old way, qry too long...\n"
+"# set qargs [list \"-QD\" $qry]\n"
+"# set all [run_remote_cmd $qargs]\n"
"\n"
" if {[regexp {ans=} $all]} {\n"
" #append_text \"Retrieved all default settings.\\n\"\n"
@@ -5881,6 +5911,10 @@ char gui_code[] = "";
" continue\n"
" } elseif {$item == \"rc\" || $item == \"norc\"} {\n"
" continue\n"
+" } elseif {$item == \"loop\"} {\n"
+" continue\n"
+" } elseif {$item == \"loopbg\"} {\n"
+" continue\n"
" }\n"
"\n"
" set def \"\"\n"
@@ -5888,6 +5922,7 @@ char gui_code[] = "";
" set def $default_var($item)\n"
" }\n"
"\n"
+"\n"
" set qst \"\"\n"
" set hmm \"#? \"\n"
" if {$item == \"display\"} {\n"
@@ -5907,6 +5942,7 @@ char gui_code[] = "";
" } else {\n"
" set mv $menu_var($item)\n"
" }\n"
+"#puts \"item=$item def=$def mv=$mv\"\n"
" if {$mv == $unset_str} {\n"
" set mv \"\"\n"
" }\n"
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 665f5c8..101a58d 100644
--- a/x11vnc/x11vnc.1
+++ b/x11vnc/x11vnc.1
@@ -2,7 +2,7 @@
.TH X11VNC "1" "February 2009" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
- version: 0.9.7, lastmod: 2009-02-21
+ version: 0.9.7, lastmod: 2009-02-25
.SH SYNOPSIS
.B x11vnc
[OPTION]...
diff --git a/x11vnc/x11vnc_defs.c b/x11vnc/x11vnc_defs.c
index a8dd3a8..2f7fd66 100644
--- a/x11vnc/x11vnc_defs.c
+++ b/x11vnc/x11vnc_defs.c
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
-char lastmod[] = "0.9.7 lastmod: 2009-02-21";
+char lastmod[] = "0.9.7 lastmod: 2009-02-25";
/* X display info */