x11vnc: fix some -QD cases for use in tkx11vnc.

pull/1/head
runge 16 years ago
parent 81cda63cb4
commit 453166ecdc

@ -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> 2009-02-21 Karl Runge <runge@karlrunge.com>
* x11vnc: add -noskip_lockkeys option for future use. * x11vnc: add -noskip_lockkeys option for future use.

@ -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: 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: Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions) % 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: x11vnc options:
-display disp -auth file -N -display disp -auth file -N
@ -12512,7 +12512,7 @@ libvncserver-tight-extension options:
% x11vnc -help % 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.) (type "x11vnc -opts" to just list the options.)

@ -1363,7 +1363,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
} }
if (!strcmp(p, "ultrafilexfer")) { if (!strcmp(p, "ultrafilexfer")) {
if (query) { if (query) {
if (screen) {
snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE); snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE);
} else {
snprintf(buf, bufn, "ans=%s:%d", p, 0);
}
goto qry; goto qry;
} }
if (! screen->permitFileTransfer) { if (! screen->permitFileTransfer) {
@ -1374,7 +1378,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
} }
if (!strcmp(p, "noultrafilexfer")) { if (!strcmp(p, "noultrafilexfer")) {
if (query) { if (query) {
if (screen) {
snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE); snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE);
} else {
snprintf(buf, bufn, "ans=%s:%d", p, 1);
}
goto qry; goto qry;
} }
if (screen->permitFileTransfer) { if (screen->permitFileTransfer) {
@ -1387,7 +1395,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
int maj, min; int maj, min;
COLON_CHECK("rfbversion:") COLON_CHECK("rfbversion:")
if (query) { if (query) {
if (screen) {
snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion); 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; goto qry;
} }
p += strlen("rfbversion:"); p += strlen("rfbversion:");
@ -5093,6 +5105,14 @@ char *process_remote_cmd(char *cmd, int stringonly) {
NONUL(vnc_desktop_name)); NONUL(vnc_desktop_name));
goto qry; 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")) { if (!strcmp(p, "desktopname")) {
snprintf(buf, bufn, "aro=%s:%s", p, snprintf(buf, bufn, "aro=%s:%s", p,
NONUL(rfb_desktop_name)); NONUL(rfb_desktop_name));

@ -148,7 +148,7 @@ Displays
=S reflect: =S reflect:
=D desktop: =D desktop:
=D rfbport: =D rfbport:
=S autoport =S autoport:
=0 gui: =0 gui:
Screen Screen
@ -254,7 +254,7 @@ Misc
=GAL LOFF =GAL LOFF
=GAL X-ext:: =GAL X-ext::
xtrap xtrap
xrecord noxrecord
=RQA reset_record =RQA reset_record
=GAL LOFF =GAL LOFF
=GAL MacOSX:: =GAL MacOSX::
@ -2535,8 +2535,38 @@ proc get_default_vars {} {
append qry ",vncconnect" append qry ",vncconnect"
set qargs [list "-QD" $qry] set q ""
set all [run_remote_cmd $qargs] 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]} { if {[regexp {ans=} $all]} {
#append_text "Retrieved all default settings.\n" #append_text "Retrieved all default settings.\n"
@ -5870,6 +5900,10 @@ proc get_settings_rcfile {} {
continue continue
} elseif {$item == "rc" || $item == "norc"} { } elseif {$item == "rc" || $item == "norc"} {
continue continue
} elseif {$item == "loop"} {
continue
} elseif {$item == "loopbg"} {
continue
} }
set def "" set def ""
@ -5877,6 +5911,7 @@ proc get_settings_rcfile {} {
set def $default_var($item) set def $default_var($item)
} }
set qst "" set qst ""
set hmm "#? " set hmm "#? "
if {$item == "display"} { if {$item == "display"} {
@ -5896,6 +5931,7 @@ proc get_settings_rcfile {} {
} else { } else {
set mv $menu_var($item) set mv $menu_var($item)
} }
#puts "item=$item def=$def mv=$mv"
if {$mv == $unset_str} { if {$mv == $unset_str} {
set mv "" set mv ""
} }

@ -159,7 +159,7 @@ char gui_code[] = "";
" =S reflect:\n" " =S reflect:\n"
" =D desktop:\n" " =D desktop:\n"
" =D rfbport:\n" " =D rfbport:\n"
" =S autoport\n" " =S autoport:\n"
" =0 gui:\n" " =0 gui:\n"
"\n" "\n"
"Screen\n" "Screen\n"
@ -265,7 +265,7 @@ char gui_code[] = "";
" =GAL LOFF\n" " =GAL LOFF\n"
" =GAL X-ext::\n" " =GAL X-ext::\n"
" xtrap\n" " xtrap\n"
" xrecord\n" " noxrecord\n"
" =RQA reset_record\n" " =RQA reset_record\n"
" =GAL LOFF\n" " =GAL LOFF\n"
" =GAL MacOSX::\n" " =GAL MacOSX::\n"
@ -2546,8 +2546,38 @@ char gui_code[] = "";
"\n" "\n"
" append qry \",vncconnect\"\n" " append qry \",vncconnect\"\n"
"\n" "\n"
" set qargs [list \"-QD\" $qry]\n" " set q \"\"\n"
" set all [run_remote_cmd $qargs]\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" "\n"
" if {[regexp {ans=} $all]} {\n" " if {[regexp {ans=} $all]} {\n"
" #append_text \"Retrieved all default settings.\\n\"\n" " #append_text \"Retrieved all default settings.\\n\"\n"
@ -5881,6 +5911,10 @@ char gui_code[] = "";
" continue\n" " continue\n"
" } elseif {$item == \"rc\" || $item == \"norc\"} {\n" " } elseif {$item == \"rc\" || $item == \"norc\"} {\n"
" continue\n" " continue\n"
" } elseif {$item == \"loop\"} {\n"
" continue\n"
" } elseif {$item == \"loopbg\"} {\n"
" continue\n"
" }\n" " }\n"
"\n" "\n"
" set def \"\"\n" " set def \"\"\n"
@ -5888,6 +5922,7 @@ char gui_code[] = "";
" set def $default_var($item)\n" " set def $default_var($item)\n"
" }\n" " }\n"
"\n" "\n"
"\n"
" set qst \"\"\n" " set qst \"\"\n"
" set hmm \"#? \"\n" " set hmm \"#? \"\n"
" if {$item == \"display\"} {\n" " if {$item == \"display\"} {\n"
@ -5907,6 +5942,7 @@ char gui_code[] = "";
" } else {\n" " } else {\n"
" set mv $menu_var($item)\n" " set mv $menu_var($item)\n"
" }\n" " }\n"
"#puts \"item=$item def=$def mv=$mv\"\n"
" if {$mv == $unset_str} {\n" " if {$mv == $unset_str} {\n"
" set mv \"\"\n" " set mv \"\"\n"
" }\n" " }\n"

@ -2,7 +2,7 @@
.TH X11VNC "1" "February 2009" "x11vnc " "User Commands" .TH X11VNC "1" "February 2009" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays 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 .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* 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 */ /* X display info */

Loading…
Cancel
Save