x11vnc: -xrefresh, .DCOPserver bug, -unixpw_unsafe ignores SSH tunnel.

pull/1/head
runge 17 years ago
parent 0f162f1f0b
commit 338301c188

@ -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> 2007-07-04 Karl Runge <runge@karlrunge.com>
* x11vnc: -debug_ncache, fix big fonts in tkx11vnc. * x11vnc: -debug_ncache, fix big fonts in tkx11vnc.

@ -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: 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 should work on nearly all Unixes. I also added some enhancements to
improve the interactive response, add many features, etc. improve the interactive response, add many features, etc.
This page and the [19]FAQ contain a lot of information [20][*], This page including the [19]FAQ contains much information [20][*];
solutions to many problems, and interesting applications, but solutions to many problems; and interesting applications, but
nevertheless please feel free to [21]contact me if you have problems 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 Please help [22]beta test the new performance speedup feature using
[23]viewer-side pixel caching. Let me know how it goes; thanks. [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 You can, but you would not be doing this for performance reasons (for
virtual X sessions via VNC, Xvnc should give the fastest response). 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 You may want to do this because Xvnc is buggy and crashes, does not
extension you desire, or you want to take advantage of one of x11vnc's support an X server extension you desire, or you want to take
unending number of options and features. 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 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. server running in the background and have x11vnc attached to it.
Another method, faster and more accurate is to use the "dummy" Device Another method, faster and more accurate, is to use the "dummy" Device
Driver in XFree86/Xorg (see below). One could view this desktop both Driver in XFree86/Xorg (see below).
remotely and also [567]locally using vncviewer. Make sure vncviewer's
"-encodings raw" is in effect for local viewing (compression seems to In either case, one can view this desktop both remotely and also
slow things down locally). For local viewing you set up a "bare" [567]locally using vncviewer. Make sure vncviewer's "-encodings raw"
window manager that just starts up vncviewer and nothing else is in effect for local viewing (compression seems to slow things down
([568]See below). 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: Here is one way to start up Xvfb:
xinit -- /usr/X11R6/bin/Xvfb :1 -cc 4 -screen 0 1024x768x16 xinit -- /usr/X11R6/bin/Xvfb :1 -cc 4 -screen 0 1024x768x16
This starts up a 16bpp virtual display. To export it via VNC use 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 x11vnc -display :1 ...
TrueColor visual instead of DirectColor.
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 One good thing about Xvfb is that the virtual framebuffer exists in
main memory (rather than in the video hardware), and so x11vnc can 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). normal video hardware).
Update Nov/2006: See the [569]FINDCREATEDISPLAY discussion of the 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 [572]-create, [573]-svc, and [574]-xdmsvc aliases can also come in
handy here. 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 mapping seems to be very poor. One should run x11vnc with
[575]-add_keysyms option to have keysyms added automatically. Also, to [575]-add_keysyms option to have keysyms added automatically. Also, to
add the Shift_R and Control_R modifiers something like this is needed: 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" xmodmap -e "add Mod1 = Alt_L Alt_R Meta_L"
(note: these are applied automatically in the [576]FINDCREATEDISPLAY (note: these are applied automatically in the [576]FINDCREATEDISPLAY
mode). Perhaps the Xvfb options -xkbdb or -xkbmap could be used to get mode of x11vnc). Perhaps the Xvfb options -xkbdb or -xkbmap could be
a better default keyboard mapping. used to get a better default keyboard mapping...
A user points out a faster and more accurate method is to use the Dummy Driver: A user points out a faster and more accurate method is
"dummy" Device Driver of XFree86/Xorg instead of Xvfb. He uses this to to use the "dummy" Device Driver of XFree86/Xorg instead of Xvfb. He
create a persistent and resizable desktop accessible from anywhere. In uses this to create a persistent and resizable desktop accessible from
the Device Section of the config file set Driver "dummy". You may also anywhere. In the Device Section of the config file set Driver "dummy".
need to set VideoRam NNN to be large enough to hold the framebuffer. You may also need to set VideoRam NNN to be large enough to hold the
The framebuffer is kept in main memory like Xvfb except that the framebuffer. The framebuffer is kept in main memory like Xvfb except
server code is closely correlated with the real XFree86/Xorg Xserver that the server code is closely correlated with the real XFree86/Xorg
unlike Xvfb. Xserver unlike Xvfb.
The main drawback to this method (besides requiring extra The main drawback to this method (besides requiring extra
configuration and possibly root permission) is that it also does the 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 other virtual X sessions, say Xnest or even Xvnc itself (useful for
testing x11vnc). testing x11vnc).
Local access: To access your virtual X display locally (i.e. while Local access: You use a VNC viewer to access the display remotely; to
sitting at the same machine it is running on) one can perhaps have access your virtual X display locally (i.e. while sitting at the same
something like this in their $HOME/.xinitrc machine it is running on) one can perhaps have something like this in
their $HOME/.xinitrc
#!/bin/sh #!/bin/sh
x11vnc -display :5 -rfbport 5905 -bg x11vnc -display :5 -rfbport 5905 -bg
vncviewer -geometry +0+0 -encodings raw -passwd $HOME/.vnc/passwd localhost:5 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: 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.3 lastmod: 2007-07-03 x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-03
x11vnc options: x11vnc options:
-display disp -auth file -N -display disp -auth file -N
@ -11110,23 +11120,23 @@ x11vnc options:
-speeds rd,bw,lat -wmdt string -debug_pointer -speeds rd,bw,lat -wmdt string -debug_pointer
-debug_keyboard -defer time -wait time -debug_keyboard -defer time -wait time
-wait_ui factor -nowait_bog -slow_fb time -wait_ui factor -nowait_bog -slow_fb time
-readtimeout n -nap -nonap -xrefresh time -readtimeout n -nap
-sb time -nofbpm -fbpm -nonap -sb time -nofbpm
-nodpms -dpms -forcedpms -fbpm -nodpms -dpms
-clientdpms -noserverdpms -noultraext -forcedpms -clientdpms -noserverdpms
-noxdamage -xd_area A -xd_mem f -noultraext -noxdamage -xd_area A
-sigpipe string -threads -nothreads -xd_mem f -sigpipe string -threads
-fs f -gaps n -grow n -nothreads -fs f -gaps n
-fuzz n -debug_tiles -snapfb -grow n -fuzz n -debug_tiles
-rawfb string -freqtab file -pipeinput cmd -snapfb -rawfb string -freqtab file
-macnodim -macnosleep -macnosaver -pipeinput cmd -macnodim -macnosleep
-macnowait -macwheel n -macnoswap -macnosaver -macnowait -macwheel n
-macnoresize -maciconanim n -macmenu -macnoswap -macnoresize -maciconanim n
-gui [gui-opts] -remote command -query variable -macmenu -gui [gui-opts] -remote command
-QD variable -sync -noremote -query variable -QD variable -sync
-yesremote -unsafe -safer -noremote -yesremote -unsafe
-privremote -nocmds -allowedcmds list -safer -privremote -nocmds
-deny_all -allowedcmds list -deny_all
libvncserver options: libvncserver options:
-rfbport port TCP port for RFB protocol -rfbport port TCP port for RFB protocol
@ -11160,7 +11170,7 @@ libvncserver-tight-extension options:
% x11vnc -help % 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.) (type "x11vnc -opts" to just list the options.)
@ -13905,6 +13915,12 @@ t
For special purpose usage where a low frame rate is For special purpose usage where a low frame rate is
acceptable and desirable, but you want the user input acceptable and desirable, but you want the user input
processed at the normal rate so you cannot use -wait. 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 -readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On
slow links that take a long time to paint the first slow links that take a long time to paint the first
screen libvncserver may hit the timeout and drop the screen libvncserver may hit the timeout and drop the
@ -14833,6 +14849,7 @@ n
wait_bog disable -nowait_bog mode. wait_bog disable -nowait_bog mode.
nowait_bog enable -nowait_bog mode. nowait_bog enable -nowait_bog mode.
slow_fb:f set -slow_fb to f seconds. slow_fb:f set -slow_fb to f seconds.
xrefresh:f set -xrefresh to f seconds.
readtimeout:n set read timeout to n seconds. readtimeout:n set read timeout to n seconds.
nap enable -nap mode. nap enable -nap mode.
nonap disable -nap mode. nonap disable -nap mode.
@ -14982,15 +14999,15 @@ n
nowf wireframelocal wfl nowireframelocal nowfl nowf wireframelocal wfl nowireframelocal nowfl
wirecopyrect wcr nowirecopyrect nowcr scr_area wirecopyrect wcr nowirecopyrect nowcr scr_area
scr_skip scr_inc scr_keys scr_term scr_keyrepeat scr_skip scr_inc scr_keys scr_term scr_keyrepeat
scr_parms scrollcopyrect scr noscrollcopyrect scr_parms scrollcopyrect scr noscrollcopyrect noscr
noscr fixscreen noxrecord xrecord reset_record fixscreen noxrecord xrecord reset_record pointer_mode
pointer_mode pm input_skip allinput noallinput input pm input_skip allinput noallinput input grabkbd
grabkbd nograbkbd grabptr nograbptr grabalways nograbkbd grabptr nograbptr grabalways nograbalways
nograbalways client_input ssltimeout speeds wmdt client_input ssltimeout speeds wmdt debug_pointer dp
debug_pointer dp nodebug_pointer nodp debug_keyboard nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
dk nodebug_keyboard nodk deferupdate defer wait_ui nodk deferupdate defer wait_ui wait_bog nowait_bog
wait_bog nowait_bog slow_fb wait readtimeout nap nonap slow_fb xrefresh wait readtimeout nap nonap sb
sb screen_blank fbpm nofbpm dpms nodpms clientdpms screen_blank fbpm nofbpm dpms nodpms clientdpms
noclientdpms forcedpms noforcedpms noserverdpms noclientdpms forcedpms noforcedpms noserverdpms
serverdpms noultraext ultraext fs gaps grow fuzz snapfb serverdpms noultraext ultraext fs gaps grow fuzz snapfb
nosnapfb rawfb uinput_accel uinput_thresh uinput_reset nosnapfb rawfb uinput_accel uinput_thresh uinput_reset

@ -2786,6 +2786,12 @@ void print_help(int mode) {
" For special purpose usage where a low frame rate is\n" " For special purpose usage where a low frame rate is\n"
" acceptable and desirable, but you want the user input\n" " acceptable and desirable, but you want the user input\n"
" processed at the normal rate so you cannot use -wait.\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" "-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On\n"
" slow links that take a long time to paint the first\n" " slow links that take a long time to paint the first\n"
" screen libvncserver may hit the timeout and drop the\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" " wait_bog disable -nowait_bog mode.\n"
" nowait_bog enable -nowait_bog mode.\n" " nowait_bog enable -nowait_bog mode.\n"
" slow_fb:f set -slow_fb to f seconds.\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" " readtimeout:n set read timeout to n seconds.\n"
" nap enable -nap mode.\n" " nap enable -nap mode.\n"
" nonap disable -nap mode.\n" " nonap disable -nap mode.\n"
@ -3868,15 +3875,15 @@ void print_help(int mode) {
" nowf wireframelocal wfl nowireframelocal nowfl\n" " nowf wireframelocal wfl nowireframelocal nowfl\n"
" wirecopyrect wcr nowirecopyrect nowcr scr_area\n" " wirecopyrect wcr nowirecopyrect nowcr scr_area\n"
" scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n" " scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n"
" scr_parms scrollcopyrect scr noscrollcopyrect\n" " scr_parms scrollcopyrect scr noscrollcopyrect noscr\n"
" noscr fixscreen noxrecord xrecord reset_record\n" " fixscreen noxrecord xrecord reset_record pointer_mode\n"
" pointer_mode pm input_skip allinput noallinput input\n" " pm input_skip allinput noallinput input grabkbd\n"
" grabkbd nograbkbd grabptr nograbptr grabalways\n" " nograbkbd grabptr nograbptr grabalways nograbalways\n"
" nograbalways client_input ssltimeout speeds wmdt\n" " client_input ssltimeout speeds wmdt debug_pointer dp\n"
" debug_pointer dp nodebug_pointer nodp debug_keyboard\n" " nodebug_pointer nodp debug_keyboard dk nodebug_keyboard\n"
" dk nodebug_keyboard nodk deferupdate defer wait_ui\n" " nodk deferupdate defer wait_ui wait_bog nowait_bog\n"
" wait_bog nowait_bog slow_fb wait readtimeout nap nonap\n" " slow_fb xrefresh wait readtimeout nap nonap sb\n"
" sb screen_blank fbpm nofbpm dpms nodpms clientdpms\n" " screen_blank fbpm nofbpm dpms nodpms clientdpms\n"
" noclientdpms forcedpms noforcedpms noserverdpms\n" " noclientdpms forcedpms noforcedpms noserverdpms\n"
" serverdpms noultraext ultraext fs gaps grow fuzz snapfb\n" " serverdpms noultraext ultraext fs gaps grow fuzz snapfb\n"
" nosnapfb rawfb uinput_accel uinput_thresh uinput_reset\n" " nosnapfb rawfb uinput_accel uinput_thresh uinput_reset\n"

@ -345,6 +345,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
int waitms = 20; int waitms = 20;
double wait_ui = 2.0; double wait_ui = 2.0;
double slow_fb = 0.0; double slow_fb = 0.0;
double xrefresh = 0.0;
int wait_bog = 1; int wait_bog = 1;
int defer_update = 20; /* deferUpdateTime ms to wait before sends. */ int defer_update = 20; /* deferUpdateTime ms to wait before sends. */
int got_defer = 0; int got_defer = 0;

@ -250,6 +250,7 @@ extern int flip_byte_order;
extern int waitms; extern int waitms;
extern double wait_ui; extern double wait_ui;
extern double slow_fb; extern double slow_fb;
extern double xrefresh;
extern int wait_bog; extern int wait_bog;
extern int defer_update; extern int defer_update;
extern int got_defer; extern int got_defer;

@ -3598,6 +3598,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
slow_fb, w); slow_fb, w);
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) { } else if (strstr(p, "wait") == p) {
int w; int w;
COLON_CHECK("wait:") COLON_CHECK("wait:")

@ -620,6 +620,7 @@ static char *dcop_session(void) {
int len; int len;
char *cmd, *host, *user = NULL; char *cmd, *host, *user = NULL;
char *out, *p, *ds, *dsn = NULL, *sess = NULL, *sess2 = NULL; char *out, *p, *ds, *dsn = NULL, *sess = NULL, *sess2 = NULL;
int db = 0;
RAWFB_RET(empty); RAWFB_RET(empty);
@ -650,6 +651,9 @@ static char *dcop_session(void) {
ds = ":0"; ds = ":0";
} }
ds = strdup(ds); ds = strdup(ds);
p = strrchr(ds, '.');
if (p) *p = '\0';
dsn = strchr(ds, ':'); dsn = strchr(ds, ':');
if (dsn) { if (dsn) {
*dsn = '_'; *dsn = '_';
@ -658,17 +662,31 @@ static char *dcop_session(void) {
ds = strdup("_0"); ds = strdup("_0");
dsn = ds; dsn = ds;
} }
if (db) fprintf(stderr, "ds: %s\n", ds);
if (db) fprintf(stderr, "dsn: %s\n", dsn);
host = this_host(); 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"); p = strtok(out, "\n");
while (p) { while (p) {
if (db) fprintf(stderr, "p: %s\n", p);
char *q = strstr(p, ".DCOP"); char *q = strstr(p, ".DCOP");
if (q == NULL) { if (q == NULL) {
; ;
} else if (host) { } else if (host) {
if (strstr(q, 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); sess = strdup(q);
break; break;
} else { } else {
@ -679,7 +697,9 @@ static char *dcop_session(void) {
} }
} }
} else { } else {
if(strstr(p, dsn)) { char *r = strstr(p, dsn);
int n = strlen(dsn);
if(r && !isalnum((int) *(r+n))) {
sess = strdup(q); sess = strdup(q);
break; break;
} }
@ -688,6 +708,7 @@ static char *dcop_session(void) {
} }
free(ds); free(ds);
free(out); free(out);
free(host);
if (!sess && sess2) { if (!sess && sess2) {
sess = sess2; sess = sess2;
} }

@ -400,6 +400,8 @@ Tuning
fuzz: fuzz:
wait_ui: wait_ui:
nowait_bog nowait_bog
slow_fb:
xrefresh:
readtimeout: readtimeout:
snapfb snapfb
threads threads

@ -411,6 +411,8 @@ char gui_code[] = "";
" fuzz:\n" " fuzz:\n"
" wait_ui:\n" " wait_ui:\n"
" nowait_bog\n" " nowait_bog\n"
" slow_fb:\n"
" xrefresh:\n"
" readtimeout:\n" " readtimeout:\n"
" snapfb\n" " snapfb\n"
" threads\n" " threads\n"

@ -1,8 +1,8 @@
.\" This file was automatically generated from x11vnc -help output. .\" 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 .SH NAME
x11vnc - allow VNC connections to real X11 displays 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 .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
@ -3257,6 +3257,17 @@ For special purpose usage where a low frame rate is
acceptable and desirable, but you want the user input acceptable and desirable, but you want the user input
processed at the normal rate so you cannot use \fB-wait.\fR processed at the normal rate so you cannot use \fB-wait.\fR
.PP .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 \fB-readtimeout\fR \fIn\fR
.IP .IP
Set libvncserver rfbMaxClientWait to n seconds. On Set libvncserver rfbMaxClientWait to n seconds. On
@ -4489,6 +4500,8 @@ nowait_bog enable \fB-nowait_bog\fR mode.
.IP .IP
slow_fb:f set \fB-slow_fb\fR to f seconds. slow_fb:f set \fB-slow_fb\fR to f seconds.
.IP .IP
xrefresh:f set \fB-xrefresh\fR to f seconds.
.IP
readtimeout:n set read timeout to n seconds. readtimeout:n set read timeout to n seconds.
.IP .IP
nap enable \fB-nap\fR mode. nap enable \fB-nap\fR mode.
@ -4728,15 +4741,15 @@ nodebug_ncache wireframe_mode wireframe wf nowireframe
nowf wireframelocal wfl nowireframelocal nowfl nowf wireframelocal wfl nowireframelocal nowfl
wirecopyrect wcr nowirecopyrect nowcr scr_area wirecopyrect wcr nowirecopyrect nowcr scr_area
scr_skip scr_inc scr_keys scr_term scr_keyrepeat scr_skip scr_inc scr_keys scr_term scr_keyrepeat
scr_parms scrollcopyrect scr noscrollcopyrect scr_parms scrollcopyrect scr noscrollcopyrect noscr
noscr fixscreen noxrecord xrecord reset_record fixscreen noxrecord xrecord reset_record pointer_mode
pointer_mode pm input_skip allinput noallinput input pm input_skip allinput noallinput input grabkbd
grabkbd nograbkbd grabptr nograbptr grabalways nograbkbd grabptr nograbptr grabalways nograbalways
nograbalways client_input ssltimeout speeds wmdt client_input ssltimeout speeds wmdt debug_pointer dp
debug_pointer dp nodebug_pointer nodp debug_keyboard nodebug_pointer nodp debug_keyboard dk nodebug_keyboard
dk nodebug_keyboard nodk deferupdate defer wait_ui nodk deferupdate defer wait_ui wait_bog nowait_bog
wait_bog nowait_bog slow_fb wait readtimeout nap nonap slow_fb xrefresh wait readtimeout nap nonap sb
sb screen_blank fbpm nofbpm dpms nodpms clientdpms screen_blank fbpm nofbpm dpms nodpms clientdpms
noclientdpms forcedpms noforcedpms noserverdpms noclientdpms forcedpms noforcedpms noserverdpms
serverdpms noultraext ultraext fs gaps grow fuzz snapfb serverdpms noultraext ultraext fs gaps grow fuzz snapfb
nosnapfb rawfb uinput_accel uinput_thresh uinput_reset nosnapfb rawfb uinput_accel uinput_thresh uinput_reset

@ -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, " wait_ui: %.2f\n", wait_ui);
fprintf(stderr, " nowait_bog: %d\n", !wait_bog); fprintf(stderr, " nowait_bog: %d\n", !wait_bog);
fprintf(stderr, " slow_fb: %.2f\n", slow_fb); fprintf(stderr, " slow_fb: %.2f\n", slow_fb);
fprintf(stderr, " xrefresh: %.2f\n", xrefresh);
fprintf(stderr, " readtimeout: %d\n", rfbMaxClientWait/1000); fprintf(stderr, " readtimeout: %d\n", rfbMaxClientWait/1000);
fprintf(stderr, " take_naps: %d\n", take_naps); fprintf(stderr, " take_naps: %d\n", take_naps);
fprintf(stderr, " sb: %d\n", screen_blank); fprintf(stderr, " sb: %d\n", screen_blank);
@ -2431,6 +2432,9 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-slow_fb")) { } else if (!strcmp(arg, "-slow_fb")) {
CHECK_ARGC CHECK_ARGC
slow_fb = atof(argv[++i]); slow_fb = atof(argv[++i]);
} else if (!strcmp(arg, "-xrefresh")) {
CHECK_ARGC
xrefresh = atof(argv[++i]);
} else if (!strcmp(arg, "-readtimeout")) { } else if (!strcmp(arg, "-readtimeout")) {
CHECK_ARGC CHECK_ARGC
rfbMaxClientWait = atoi(argv[++i]) * 1000; rfbMaxClientWait = atoi(argv[++i]) * 1000;
@ -3010,7 +3014,11 @@ int main(int argc, char* argv[]) {
use_stunnel = 0; use_stunnel = 0;
} }
if (! use_stunnel && ! use_openssl) { 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"); char *s = getenv("SSH_CONNECTION");
if (! s) s = getenv("SSH_CLIENT"); if (! s) s = getenv("SSH_CLIENT");
if (! s) s = "SSH_CONNECTION"; if (! s) s = "SSH_CONNECTION";
@ -3027,10 +3035,6 @@ int main(int argc, char* argv[]) {
if (! nopw) { if (! nopw) {
usleep(2000*1000); usleep(2000*1000);
} }
} else if (getenv("UNIXPW_DISABLE_SSL")) {
rfbLog("Skipping -ssl/-stunnel requirement"
" due to\n");
rfbLog("UNIXPW_DISABLE_SSL setting.\n");
} else { } else {
if (openssl_present()) { if (openssl_present()) {
rfbLog("set -ssl in -unixpw mode.\n"); rfbLog("set -ssl in -unixpw mode.\n");
@ -3175,6 +3179,10 @@ int main(int argc, char* argv[]) {
ncache = 0; ncache = 0;
ncache_msg = 0; ncache_msg = 0;
} }
if (subwin) {
ncache = 0;
ncache_msg = 0;
}
} }
if (raw_fb_str) { if (raw_fb_str) {

@ -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.3 lastmod: 2007-07-03"; char lastmod[] = "0.9.3 lastmod: 2007-08-03";
/* X display info */ /* X display info */

@ -792,6 +792,7 @@ void check_xevents(int reset) {
static time_t last_time_sync = 0; static time_t last_time_sync = 0;
time_t now = time(NULL); time_t now = time(NULL);
static double last_request = 0.0; static double last_request = 0.0;
static double last_xrefresh = 0.0;
XErrorHandler old_handler; XErrorHandler old_handler;
if (unixpw_in_progress) return; 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) { if (now > last_call+1) {
/* we only check these once a second or so. */ /* we only check these once a second or so. */
int n = 0; int n = 0;

Loading…
Cancel
Save