summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunge <runge>2007-08-04 00:53:38 +0000
committerrunge <runge>2007-08-04 00:53:38 +0000
commit338301c1883da09e99647826c73db817bc984366 (patch)
tree46c8b0f53fe4b5d75220fef639193f62232832d9
parent0f162f1f0b462a5b088c57ef3461dd7ecbf24d13 (diff)
downloadlibtdevnc-338301c1.tar.gz
libtdevnc-338301c1.zip
x11vnc: -xrefresh, .DCOPserver bug, -unixpw_unsafe ignores SSH tunnel.
-rw-r--r--x11vnc/ChangeLog5
-rw-r--r--x11vnc/README137
-rw-r--r--x11vnc/help.c25
-rw-r--r--x11vnc/options.c1
-rw-r--r--x11vnc/options.h1
-rw-r--r--x11vnc/remote.c14
-rw-r--r--x11vnc/solid.c25
-rwxr-xr-xx11vnc/tkx11vnc2
-rw-r--r--x11vnc/tkx11vnc.h2
-rw-r--r--x11vnc/x11vnc.135
-rw-r--r--x11vnc/x11vnc.c18
-rw-r--r--x11vnc/x11vnc_defs.c2
-rw-r--r--x11vnc/xevents.c26
13 files changed, 205 insertions, 88 deletions
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog
index 1acaacc..02eda3a 100644
--- a/x11vnc/ChangeLog
+++ b/x11vnc/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-03 Karl Runge <runge@karlrunge.com>
+ * x11vnc: add -xrefresh option, fix KDE .DCOPserver parse bug,
+ make sure UNIXPW_DISABLE_LOCALHOST/-unixpw_unsafe ignore
+ any SSH tunnel that would imply -localhost.
+
2007-07-04 Karl Runge <runge@karlrunge.com>
* x11vnc: -debug_ncache, fix big fonts in tkx11vnc.
diff --git a/x11vnc/README b/x11vnc/README
index 7e3aca5..9a880a7 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Tue Jul 3 14:37:44 EDT 2007
+x11vnc README file Date: Fri Aug 3 17:26:56 EDT 2007
The following information is taken from these URLs:
@@ -43,10 +43,12 @@ x11vnc: a VNC server for real X displays
should work on nearly all Unixes. I also added some enhancements to
improve the interactive response, add many features, etc.
- This page and the [19]FAQ contain a lot of information [20][*],
- solutions to many problems, and interesting applications, but
+ This page including the [19]FAQ contains much information [20][*];
+ solutions to many problems; and interesting applications, but
nevertheless please feel free to [21]contact me if you have problems
- or questions.
+ or questions. Please do check the FAQ; I realize this page is massive,
+ but you can often use your browser's find-in-page action to find the
+ discussion of your problem or question.
Please help [22]beta test the new performance speedup feature using
[23]viewer-side pixel caching. Let me know how it goes; thanks.
@@ -4383,30 +4385,37 @@ xprop -root -f VNC_CONNECT 8s -set VNC_CONNECT "$1"
You can, but you would not be doing this for performance reasons (for
virtual X sessions via VNC, Xvnc should give the fastest response).
- You may want to do this because Xvnc does not support an X server
- extension you desire, or you want to take advantage of one of x11vnc's
- unending number of options and features.
+ You may want to do this because Xvnc is buggy and crashes, does not
+ support an X server extension you desire, or you want to take
+ advantage of one of x11vnc's unending number of options and features.
One way to acheive this is to have a Xvfb(1) virtual framebuffer X
server running in the background and have x11vnc attached to it.
- Another method, faster and more accurate is to use the "dummy" Device
- Driver in XFree86/Xorg (see below). One could view this desktop both
- remotely and also [567]locally using vncviewer. Make sure vncviewer's
- "-encodings raw" is in effect for local viewing (compression seems to
- slow things down locally). For local viewing you set up a "bare"
- window manager that just starts up vncviewer and nothing else
- ([568]See below).
+ Another method, faster and more accurate, is to use the "dummy" Device
+ Driver in XFree86/Xorg (see below).
+
+ In either case, one can view this desktop both remotely and also
+ [567]locally using vncviewer. Make sure vncviewer's "-encodings raw"
+ is in effect for local viewing (compression seems to slow things down
+ locally). For local viewing you set up a "bare" window manager that
+ just starts up vncviewer and nothing else ([568]See how below).
Here is one way to start up Xvfb:
xinit -- /usr/X11R6/bin/Xvfb :1 -cc 4 -screen 0 1024x768x16
This starts up a 16bpp virtual display. To export it via VNC use
- "x11vnc -display :1 ...". The "-cc 4" option is to force Xvfb to use a
- TrueColor visual instead of DirectColor.
+ x11vnc -display :1 ...
+
+ Then have the remote vncviewer attach to x11vnc's VNC display (e.g. :0
+ which is port 5900).
+
+ The "-cc 4" Xvfb option is to force it to use a TrueColor visual
+ instead of DirectColor (this works around a recent bug in the Xorg
+ Xvfb server).
One good thing about Xvfb is that the virtual framebuffer exists in
main memory (rather than in the video hardware), and so x11vnc can
- "screen scrape" it efficiently (more than, say, 100X faster than
+ "screen scrape" it very efficiently (more than, say, 100X faster than
normal video hardware).
Update Nov/2006: See the [569]FINDCREATEDISPLAY discussion of the
@@ -4419,7 +4428,7 @@ xprop -root -f VNC_CONNECT 8s -set VNC_CONNECT "$1"
[572]-create, [573]-svc, and [574]-xdmsvc aliases can also come in
handy here.
- There are some annoyances WRT Xvfb though. The default keyboard
+ There are some annoyances WRT Xvfb however. The default keyboard
mapping seems to be very poor. One should run x11vnc with
[575]-add_keysyms option to have keysyms added automatically. Also, to
add the Shift_R and Control_R modifiers something like this is needed:
@@ -4434,17 +4443,17 @@ xmodmap -e "keycode any = Meta_L"
xmodmap -e "add Mod1 = Alt_L Alt_R Meta_L"
(note: these are applied automatically in the [576]FINDCREATEDISPLAY
- mode). Perhaps the Xvfb options -xkbdb or -xkbmap could be used to get
- a better default keyboard mapping.
-
- A user points out a faster and more accurate method is to use the
- "dummy" Device Driver of XFree86/Xorg instead of Xvfb. He uses this to
- create a persistent and resizable desktop accessible from anywhere. In
- the Device Section of the config file set Driver "dummy". You may also
- need to set VideoRam NNN to be large enough to hold the framebuffer.
- The framebuffer is kept in main memory like Xvfb except that the
- server code is closely correlated with the real XFree86/Xorg Xserver
- unlike Xvfb.
+ mode of x11vnc). Perhaps the Xvfb options -xkbdb or -xkbmap could be
+ used to get a better default keyboard mapping...
+
+ Dummy Driver: A user points out a faster and more accurate method is
+ to use the "dummy" Device Driver of XFree86/Xorg instead of Xvfb. He
+ uses this to create a persistent and resizable desktop accessible from
+ anywhere. In the Device Section of the config file set Driver "dummy".
+ You may also need to set VideoRam NNN to be large enough to hold the
+ framebuffer. The framebuffer is kept in main memory like Xvfb except
+ that the server code is closely correlated with the real XFree86/Xorg
+ Xserver unlike Xvfb.
The main drawback to this method (besides requiring extra
configuration and possibly root permission) is that it also does the
@@ -4471,9 +4480,10 @@ startx -- /path/to/Xdummy :1
other virtual X sessions, say Xnest or even Xvnc itself (useful for
testing x11vnc).
- Local access: To access your virtual X display locally (i.e. while
- sitting at the same machine it is running on) one can perhaps have
- something like this in their $HOME/.xinitrc
+ Local access: You use a VNC viewer to access the display remotely; to
+ access your virtual X display locally (i.e. while sitting at the same
+ machine it is running on) one can perhaps have something like this in
+ their $HOME/.xinitrc
#!/bin/sh
x11vnc -display :5 -rfbport 5905 -bg
vncviewer -geometry +0+0 -encodings raw -passwd $HOME/.vnc/passwd localhost:5
@@ -11046,7 +11056,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.3 lastmod: 2007-07-03
+x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-03
x11vnc options:
-display disp -auth file -N
@@ -11110,23 +11120,23 @@ x11vnc options:
-speeds rd,bw,lat -wmdt string -debug_pointer
-debug_keyboard -defer time -wait time
-wait_ui factor -nowait_bog -slow_fb time
- -readtimeout n -nap -nonap
- -sb time -nofbpm -fbpm
- -nodpms -dpms -forcedpms
- -clientdpms -noserverdpms -noultraext
- -noxdamage -xd_area A -xd_mem f
- -sigpipe string -threads -nothreads
- -fs f -gaps n -grow n
- -fuzz n -debug_tiles -snapfb
- -rawfb string -freqtab file -pipeinput cmd
- -macnodim -macnosleep -macnosaver
- -macnowait -macwheel n -macnoswap
- -macnoresize -maciconanim n -macmenu
- -gui [gui-opts] -remote command -query variable
- -QD variable -sync -noremote
- -yesremote -unsafe -safer
- -privremote -nocmds -allowedcmds list
- -deny_all
+ -xrefresh time -readtimeout n -nap
+ -nonap -sb time -nofbpm
+ -fbpm -nodpms -dpms
+ -forcedpms -clientdpms -noserverdpms
+ -noultraext -noxdamage -xd_area A
+ -xd_mem f -sigpipe string -threads
+ -nothreads -fs f -gaps n
+ -grow n -fuzz n -debug_tiles
+ -snapfb -rawfb string -freqtab file
+ -pipeinput cmd -macnodim -macnosleep
+ -macnosaver -macnowait -macwheel n
+ -macnoswap -macnoresize -maciconanim n
+ -macmenu -gui [gui-opts] -remote command
+ -query variable -QD variable -sync
+ -noremote -yesremote -unsafe
+ -safer -privremote -nocmds
+ -allowedcmds list -deny_all
libvncserver options:
-rfbport port TCP port for RFB protocol
@@ -11160,7 +11170,7 @@ libvncserver-tight-extension options:
% x11vnc -help
-x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-07-03
+x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-03
(type "x11vnc -opts" to just list the options.)
@@ -13905,6 +13915,12 @@ t
For special purpose usage where a low frame rate is
acceptable and desirable, but you want the user input
processed at the normal rate so you cannot use -wait.
+-xrefresh time Floating point time in seconds to indicate how often to
+ do the equivalent of xrefresh(1) to force all windows
+ (in the viewable area if -id, -sid, or -clip is used)
+ to repaint themselves. Use this only if applications
+ misbehave by not repainting themselves properly.
+ See also -noxdamage.
-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On
slow links that take a long time to paint the first
screen libvncserver may hit the timeout and drop the
@@ -14833,6 +14849,7 @@ n
wait_bog disable -nowait_bog mode.
nowait_bog enable -nowait_bog mode.
slow_fb:f set -slow_fb to f seconds.
+ xrefresh:f set -xrefresh to f seconds.
readtimeout:n set read timeout to n seconds.
nap enable -nap mode.
nonap disable -nap mode.
@@ -14982,15 +14999,15 @@ n
nowf wireframelocal wfl nowireframelocal nowfl
wirecopyrect wcr nowirecopyrect nowcr scr_area
scr_skip scr_inc scr_keys scr_term scr_keyrepeat
- scr_parms scrollcopyrect scr noscrollcopyrect
- noscr fixscreen noxrecord xrecord reset_record
- pointer_mode pm input_skip allinput noallinput input
- grabkbd nograbkbd grabptr nograbptr grabalways
- nograbalways client_input ssltimeout speeds wmdt
- debug_pointer dp nodebug_pointer nodp debug_keyboard
- dk nodebug_keyboard nodk deferupdate defer wait_ui
- wait_bog nowait_bog slow_fb wait readtimeout nap nonap
- sb screen_blank fbpm nofbpm dpms nodpms clientdpms
+ scr_parms scrollcopyrect scr noscrollcopyrect noscr
+ fixscreen noxrecord xrecord reset_record pointer_mode
+ pm input_skip allinput noallinput input grabkbd
+ nograbkbd grabptr nograbptr grabalways nograbalways
+ client_input ssltimeout speeds wmdt debug_pointer dp
+ nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
+ nodk deferupdate defer wait_ui wait_bog nowait_bog
+ slow_fb xrefresh wait readtimeout nap nonap sb
+ screen_blank fbpm nofbpm dpms nodpms clientdpms
noclientdpms forcedpms noforcedpms noserverdpms
serverdpms noultraext ultraext fs gaps grow fuzz snapfb
nosnapfb rawfb uinput_accel uinput_thresh uinput_reset
diff --git a/x11vnc/help.c b/x11vnc/help.c
index cdcf884..40e0cca 100644
--- a/x11vnc/help.c
+++ b/x11vnc/help.c
@@ -2786,6 +2786,12 @@ void print_help(int mode) {
" For special purpose usage where a low frame rate is\n"
" acceptable and desirable, but you want the user input\n"
" processed at the normal rate so you cannot use -wait.\n"
+"-xrefresh time Floating point time in seconds to indicate how often to\n"
+" do the equivalent of xrefresh(1) to force all windows\n"
+" (in the viewable area if -id, -sid, or -clip is used)\n"
+" to repaint themselves. Use this only if applications\n"
+" misbehave by not repainting themselves properly.\n"
+" See also -noxdamage.\n"
"-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On\n"
" slow links that take a long time to paint the first\n"
" screen libvncserver may hit the timeout and drop the\n"
@@ -3719,6 +3725,7 @@ void print_help(int mode) {
" wait_bog disable -nowait_bog mode.\n"
" nowait_bog enable -nowait_bog mode.\n"
" slow_fb:f set -slow_fb to f seconds.\n"
+" xrefresh:f set -xrefresh to f seconds.\n"
" readtimeout:n set read timeout to n seconds.\n"
" nap enable -nap mode.\n"
" nonap disable -nap mode.\n"
@@ -3868,15 +3875,15 @@ void print_help(int mode) {
" nowf wireframelocal wfl nowireframelocal nowfl\n"
" wirecopyrect wcr nowirecopyrect nowcr scr_area\n"
" scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n"
-" scr_parms scrollcopyrect scr noscrollcopyrect\n"
-" noscr fixscreen noxrecord xrecord reset_record\n"
-" pointer_mode pm input_skip allinput noallinput input\n"
-" grabkbd nograbkbd grabptr nograbptr grabalways\n"
-" nograbalways client_input ssltimeout speeds wmdt\n"
-" debug_pointer dp nodebug_pointer nodp debug_keyboard\n"
-" dk nodebug_keyboard nodk deferupdate defer wait_ui\n"
-" wait_bog nowait_bog slow_fb wait readtimeout nap nonap\n"
-" sb screen_blank fbpm nofbpm dpms nodpms clientdpms\n"
+" scr_parms scrollcopyrect scr noscrollcopyrect noscr\n"
+" fixscreen noxrecord xrecord reset_record pointer_mode\n"
+" pm input_skip allinput noallinput input grabkbd\n"
+" nograbkbd grabptr nograbptr grabalways nograbalways\n"
+" client_input ssltimeout speeds wmdt debug_pointer dp\n"
+" nodebug_pointer nodp debug_keyboard dk nodebug_keyboard\n"
+" nodk deferupdate defer wait_ui wait_bog nowait_bog\n"
+" slow_fb xrefresh wait readtimeout nap nonap sb\n"
+" screen_blank fbpm nofbpm dpms nodpms clientdpms\n"
" noclientdpms forcedpms noforcedpms noserverdpms\n"
" serverdpms noultraext ultraext fs gaps grow fuzz snapfb\n"
" nosnapfb rawfb uinput_accel uinput_thresh uinput_reset\n"
diff --git a/x11vnc/options.c b/x11vnc/options.c
index e014ec9..a9192a0 100644
--- a/x11vnc/options.c
+++ b/x11vnc/options.c
@@ -345,6 +345,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
int waitms = 20;
double wait_ui = 2.0;
double slow_fb = 0.0;
+double xrefresh = 0.0;
int wait_bog = 1;
int defer_update = 20; /* deferUpdateTime ms to wait before sends. */
int got_defer = 0;
diff --git a/x11vnc/options.h b/x11vnc/options.h
index adbc43a..576c969 100644
--- a/x11vnc/options.h
+++ b/x11vnc/options.h
@@ -250,6 +250,7 @@ extern int flip_byte_order;
extern int waitms;
extern double wait_ui;
extern double slow_fb;
+extern double xrefresh;
extern int wait_bog;
extern int defer_update;
extern int got_defer;
diff --git a/x11vnc/remote.c b/x11vnc/remote.c
index 72b2221..8fd50c9 100644
--- a/x11vnc/remote.c
+++ b/x11vnc/remote.c
@@ -3598,6 +3598,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
slow_fb, w);
slow_fb = w;
+ } else if (strstr(p, "xrefresh") == p) {
+ double w;
+ COLON_CHECK("xrefresh:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%.2f", p, co, xrefresh);
+ goto qry;
+ }
+ p += strlen("xrefresh:");
+ w = atof(p);
+ if (w <= 0) w = 0.0;
+ rfbLog("remote_cmd: setting xrefresh delay %.2f -> %.2f\n",
+ xrefresh, w);
+ xrefresh = w;
+
} else if (strstr(p, "wait") == p) {
int w;
COLON_CHECK("wait:")
diff --git a/x11vnc/solid.c b/x11vnc/solid.c
index e1b7049..74a0902 100644
--- a/x11vnc/solid.c
+++ b/x11vnc/solid.c
@@ -620,6 +620,7 @@ static char *dcop_session(void) {
int len;
char *cmd, *host, *user = NULL;
char *out, *p, *ds, *dsn = NULL, *sess = NULL, *sess2 = NULL;
+ int db = 0;
RAWFB_RET(empty);
@@ -650,6 +651,9 @@ static char *dcop_session(void) {
ds = ":0";
}
ds = strdup(ds);
+ p = strrchr(ds, '.');
+ if (p) *p = '\0';
+
dsn = strchr(ds, ':');
if (dsn) {
*dsn = '_';
@@ -658,17 +662,31 @@ static char *dcop_session(void) {
ds = strdup("_0");
dsn = ds;
}
+ if (db) fprintf(stderr, "ds: %s\n", ds);
+ if (db) fprintf(stderr, "dsn: %s\n", dsn);
host = this_host();
+ if (host) {
+ char *h2 = (char *) malloc(strlen(host) + 2 + 1);
+ sprintf(h2, "_%s_", host);
+ free(host);
+ host = h2;
+ } else {
+ host = strdup("");
+ }
+ if (db) fprintf(stderr, "host: %s\n", host);
p = strtok(out, "\n");
while (p) {
+ if (db) fprintf(stderr, "p: %s\n", p);
char *q = strstr(p, ".DCOP");
if (q == NULL) {
;
} else if (host) {
if (strstr(q, host)) {
- if(strstr(p, dsn)) {
+ char *r = strstr(p, dsn);
+ int n = strlen(dsn);
+ if(r && !isalnum((int) *(r+n))) {
sess = strdup(q);
break;
} else {
@@ -679,7 +697,9 @@ static char *dcop_session(void) {
}
}
} else {
- if(strstr(p, dsn)) {
+ char *r = strstr(p, dsn);
+ int n = strlen(dsn);
+ if(r && !isalnum((int) *(r+n))) {
sess = strdup(q);
break;
}
@@ -688,6 +708,7 @@ static char *dcop_session(void) {
}
free(ds);
free(out);
+ free(host);
if (!sess && sess2) {
sess = sess2;
}
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index 76e6304..d396d94 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -400,6 +400,8 @@ Tuning
fuzz:
wait_ui:
nowait_bog
+ slow_fb:
+ xrefresh:
readtimeout:
snapfb
threads
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index e659f88..4e6550f 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -411,6 +411,8 @@ char gui_code[] = "";
" fuzz:\n"
" wait_ui:\n"
" nowait_bog\n"
+" slow_fb:\n"
+" xrefresh:\n"
" readtimeout:\n"
" snapfb\n"
" threads\n"
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 242e2c4..99670c5 100644
--- a/x11vnc/x11vnc.1
+++ b/x11vnc/x11vnc.1
@@ -1,8 +1,8 @@
.\" This file was automatically generated from x11vnc -help output.
-.TH X11VNC "1" "July 2007" "x11vnc " "User Commands"
+.TH X11VNC "1" "August 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
- version: 0.9.3, lastmod: 2007-07-03
+ version: 0.9.3, lastmod: 2007-08-03
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@@ -3257,6 +3257,17 @@ For special purpose usage where a low frame rate is
acceptable and desirable, but you want the user input
processed at the normal rate so you cannot use \fB-wait.\fR
.PP
+\fB-xrefresh\fR \fItime\fR
+.IP
+Floating point time in seconds to indicate how often to
+do the equivalent of
+.IR xrefresh (1)
+to force all windows
+(in the viewable area if \fB-id,\fR \fB-sid,\fR or \fB-clip\fR is used)
+to repaint themselves. Use this only if applications
+misbehave by not repainting themselves properly.
+See also \fB-noxdamage.\fR
+.PP
\fB-readtimeout\fR \fIn\fR
.IP
Set libvncserver rfbMaxClientWait to n seconds. On
@@ -4489,6 +4500,8 @@ nowait_bog enable \fB-nowait_bog\fR mode.
.IP
slow_fb:f set \fB-slow_fb\fR to f seconds.
.IP
+xrefresh:f set \fB-xrefresh\fR to f seconds.
+.IP
readtimeout:n set read timeout to n seconds.
.IP
nap enable \fB-nap\fR mode.
@@ -4728,15 +4741,15 @@ nodebug_ncache wireframe_mode wireframe wf nowireframe
nowf wireframelocal wfl nowireframelocal nowfl
wirecopyrect wcr nowirecopyrect nowcr scr_area
scr_skip scr_inc scr_keys scr_term scr_keyrepeat
-scr_parms scrollcopyrect scr noscrollcopyrect
-noscr fixscreen noxrecord xrecord reset_record
-pointer_mode pm input_skip allinput noallinput input
-grabkbd nograbkbd grabptr nograbptr grabalways
-nograbalways client_input ssltimeout speeds wmdt
-debug_pointer dp nodebug_pointer nodp debug_keyboard
-dk nodebug_keyboard nodk deferupdate defer wait_ui
-wait_bog nowait_bog slow_fb wait readtimeout nap nonap
-sb screen_blank fbpm nofbpm dpms nodpms clientdpms
+scr_parms scrollcopyrect scr noscrollcopyrect noscr
+fixscreen noxrecord xrecord reset_record pointer_mode
+pm input_skip allinput noallinput input grabkbd
+nograbkbd grabptr nograbptr grabalways nograbalways
+client_input ssltimeout speeds wmdt debug_pointer dp
+nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
+nodk deferupdate defer wait_ui wait_bog nowait_bog
+slow_fb xrefresh wait readtimeout nap nonap sb
+screen_blank fbpm nofbpm dpms nodpms clientdpms
noclientdpms forcedpms noforcedpms noserverdpms
serverdpms noultraext ultraext fs gaps grow fuzz snapfb
nosnapfb rawfb uinput_accel uinput_thresh uinput_reset
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index cd331ea..b98ebf1 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -1278,6 +1278,7 @@ static void print_settings(int try_http, int bg, char *gui_str) {
fprintf(stderr, " wait_ui: %.2f\n", wait_ui);
fprintf(stderr, " nowait_bog: %d\n", !wait_bog);
fprintf(stderr, " slow_fb: %.2f\n", slow_fb);
+ fprintf(stderr, " xrefresh: %.2f\n", xrefresh);
fprintf(stderr, " readtimeout: %d\n", rfbMaxClientWait/1000);
fprintf(stderr, " take_naps: %d\n", take_naps);
fprintf(stderr, " sb: %d\n", screen_blank);
@@ -2431,6 +2432,9 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-slow_fb")) {
CHECK_ARGC
slow_fb = atof(argv[++i]);
+ } else if (!strcmp(arg, "-xrefresh")) {
+ CHECK_ARGC
+ xrefresh = atof(argv[++i]);
} else if (!strcmp(arg, "-readtimeout")) {
CHECK_ARGC
rfbMaxClientWait = atoi(argv[++i]) * 1000;
@@ -3010,7 +3014,11 @@ int main(int argc, char* argv[]) {
use_stunnel = 0;
}
if (! use_stunnel && ! use_openssl) {
- if (have_ssh_env()) {
+ if (getenv("UNIXPW_DISABLE_LOCALHOST")) {
+ rfbLog("Skipping -ssl/-stunnel requirement"
+ " due to\n");
+ rfbLog("UNIXPW_DISABLE_LOCALHOST setting.\n");
+ } else if (have_ssh_env()) {
char *s = getenv("SSH_CONNECTION");
if (! s) s = getenv("SSH_CLIENT");
if (! s) s = "SSH_CONNECTION";
@@ -3027,10 +3035,6 @@ int main(int argc, char* argv[]) {
if (! nopw) {
usleep(2000*1000);
}
- } else if (getenv("UNIXPW_DISABLE_SSL")) {
- rfbLog("Skipping -ssl/-stunnel requirement"
- " due to\n");
- rfbLog("UNIXPW_DISABLE_SSL setting.\n");
} else {
if (openssl_present()) {
rfbLog("set -ssl in -unixpw mode.\n");
@@ -3175,6 +3179,10 @@ int main(int argc, char* argv[]) {
ncache = 0;
ncache_msg = 0;
}
+ if (subwin) {
+ ncache = 0;
+ ncache_msg = 0;
+ }
}
if (raw_fb_str) {
diff --git a/x11vnc/x11vnc_defs.c b/x11vnc/x11vnc_defs.c
index 5b2147c..1bb08e3 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.3 lastmod: 2007-07-03";
+char lastmod[] = "0.9.3 lastmod: 2007-08-03";
/* X display info */
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 002dd99..101bd32 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -792,6 +792,7 @@ void check_xevents(int reset) {
static time_t last_time_sync = 0;
time_t now = time(NULL);
static double last_request = 0.0;
+ static double last_xrefresh = 0.0;
XErrorHandler old_handler;
if (unixpw_in_progress) return;
@@ -836,6 +837,31 @@ void check_xevents(int reset) {
}
}
+ if (have_clients && xrefresh > 0.0 && dnow() > last_xrefresh + xrefresh) {
+ XSetWindowAttributes swa;
+ Visual visual;
+ Window xrf;
+ unsigned long mask;
+
+ swa.override_redirect = True;
+ swa.backing_store = NotUseful;
+ swa.save_under = False;
+ swa.background_pixmap = None;
+ visual.visualid = CopyFromParent;
+ mask = (CWOverrideRedirect|CWBackingStore|CWSaveUnder|CWBackPixmap);
+
+ xrf = XCreateWindow(dpy, window, coff_x, coff_y, dpy_x, dpy_y, 0, CopyFromParent,
+ InputOutput, &visual, mask, &swa);
+ if (xrf != None) {
+ if (0) fprintf(stderr, "XCreateWindow(%d, %d, %d, %d) 0x%lx\n", coff_x, coff_y, dpy_x, dpy_y, xrf);
+ XMapWindow(dpy, xrf);
+ XFlush_wr(dpy);
+ XDestroyWindow(dpy, xrf);
+ XFlush_wr(dpy);
+ }
+ last_xrefresh = dnow();
+ }
+
if (now > last_call+1) {
/* we only check these once a second or so. */
int n = 0;