Commit 54237e33 authored by runge's avatar runge

x11vnc: COLUMNS=256 and other fixes to find/create scripts. More ratecheck.

parent 1df143d1
2007-09-26 Karl Runge <runge@karlrunge.com>
* x11vnc: COLUMNS=256 to find/create scripts. More ratecheck.
2007-09-14 Karl Runge <runge@karlrunge.com>
* x11vnc: Add -sshxdmsvc. Fix find_display for inetd. Improve
-allinput method; env CHECK_RATE to watch for FBUR build up
(i.e. JFVNC).
2007-09-11 Karl Runge <runge@karlrunge.com>
* x11vnc: fix wireframe crash under -clip. Add -redirect for
VNC redir. -rawfb nullbig, randbig, solid, swirl, etc.
......
This diff is collapsed.
......@@ -1934,10 +1934,10 @@ void read_x11vnc_remote_prop(int nomsg) {
} else if (strstr(x11vnc_remote_str, "cmd=") &&
strstr(x11vnc_remote_str, "passwd")) {
rfbLog("read X11VNC_REMOTE: *\n");
} else if (strlen(x11vnc_remote_str) > 38) {
} else if (strlen(x11vnc_remote_str) > 36) {
char trim[100];
trim[0] = '\0';
strncat(trim, x11vnc_remote_str, 38);
strncat(trim, x11vnc_remote_str, 36);
rfbLog("read X11VNC_REMOTE: %s ...\n", trim);
} else {
......
......@@ -782,22 +782,42 @@ void print_help(int mode) {
" FINDCREATEDISPLAY method. This is an alias for\n"
" \"-display WAIT:cmd=FINDCREATEDISPLAY-Xvfb\".\n"
"\n"
"-xdummy As in -create, except Xdummy instead of Xvfb. Implies\n"
" FD_XDUMMY_NOROOT=1.\n"
" SSH NOTE: for both -find and -create you can (should!)\n"
" add the \"-localhost\" option to force SSH tunnel access.\n"
"\n"
"-xdummy As in -create, except Xdummy instead of Xvfb.\n"
"-xvnc As in -create, except Xvnc instead of Xvfb.\n"
"-xvnc_redirect As in -create, except Xvnc.redirect instead of Xvfb.\n"
"\n"
"-svc Terminal services mode. Also \"-service\". Alias for\n"
" -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb -unixpw\n"
" -users unixpw= -ssl SAVE\n"
"-svc Terminal services mode based on SSL access. Alias for\n"
" -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb -unixpw -users\n"
" unixpw= -ssl SAVE Also \"-service\".\n"
"\n"
"-svc_xdummy As -svc except Xdummy instead of Xvfb. Implies\n"
" FD_XDUMMY_NOROOT=1.\n"
"-svc_xdummy As -svc except Xdummy instead of Xvfb.\n"
"-svc_xvnc As -svc except Xvnc instead of Xvfb.\n"
"\n"
"-xdmsvc Terminal services mode. Also \"-xdm_service\". Alias for\n"
" -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp -unixpw\n"
" -users unixpw= -ssl SAVE\n"
"-xdmsvc Display manager Terminal services mode based on SSL.\n"
" Alias for -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp\n"
" -unixpw -users unixpw= -ssl SAVE Also \"-xdm_service\".\n"
"\n"
" To create a session a user will have to first log in\n"
" to the -unixpw dialog and then log in again to the\n"
" XDM/GDM/KDM prompt. Subsequent re-connections will\n"
" only require the -unixpw password. See the discussion\n"
" under -display WAIT:... for more details about XDM,\n"
" etc configuration.\n"
"\n"
"-sshxdmsvc Display manager Terminal services mode based on SSH.\n"
" Alias for -display WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp\n"
" -localhost.\n"
"\n"
" The -localhost option constrains connections to come\n"
" in via a SSH tunnel (which will require a login).\n"
" To create a session a user will also have to log into\n"
" the XDM GDM KDM prompt. Subsequent re-connections will\n"
" only only require the SSH login. See the discussion\n"
" under -display WAIT:... for more details about XDM,\n"
" etc configuration.\n"
"\n"
"-redirect port As in FINDCREATEDISPLAY-Xvnc.redirect mode except\n"
" redirect immediately (i.e. without X session finding\n"
......@@ -948,14 +968,19 @@ void print_help(int mode) {
" actually start up an X server.\n"
"\n"
" By default FINDCREATEDISPLAY will try Xdummy and then\n"
" Xvfb. The Xdummy wrapper is part of the x11vnc source\n"
" code (x11vnc/misc/Xdummy) It should be available in\n"
" PATH and have run \"Xdummy -install\" once to create\n"
" the shared library. Xdummy requires root permission and\n"
" only works on Linux. (Note: specify FD_XDUMMY_NOROOT=1\n"
" to skip a check for the root id; evidently your sudo(1)\n"
" will take care of everything). Xvfb is available on\n"
" most platforms and does not require root.\n"
" Xvfb:\n"
"\n"
" The Xdummy wrapper is part of the x11vnc source code\n"
" (x11vnc/misc/Xdummy) It should be available in PATH and\n"
" have run \"Xdummy -install\" once to create the shared\n"
" library. Xdummy requires root permission and only works\n"
" on Linux. (Note: specify FD_XDUMMY_NOROOT=1 to skip\n"
" a check for the root id; evidently your sudo(1) will\n"
" take care of everything. The -xdummy and -svc_xdummy\n"
" options imply FD_XDUMMY_NOROOT=1).\n"
"\n"
" Xvfb is available on most platforms and does not\n"
" require root.\n"
"\n"
" When x11vnc exits (i.e. user disconnects) the X\n"
" server session stays running in the background.\n"
......@@ -1027,8 +1052,9 @@ void print_help(int mode) {
" for kdm in kdmrc: Enable=true in section [Xdmcp]\n"
" for xdm in xdm-config: DisplayManager.requestPort: 177\n"
"\n"
" See the shorthand options above \"-svc\" and \"-xdmsvc\"\n"
" that specify the above options for some useful cases.\n"
" See the shorthand options above \"-svc\", \"-xdmsvc\"\n"
" and \"-sshxdmsvc\" that specify the above options for\n"
" some useful cases.\n"
"\n"
" If you set the env. var WAITBG=1 x11vnc will go into\n"
" the background once listening in wait mode.\n"
......
......@@ -710,6 +710,9 @@ char find_display[] =
"PATH=$PATH:/bin:/usr/bin:/usr/X11R6/bin:/usr/bin/X11:/usr/openwin/bin:/usr/ucb\n"
"export PATH\n"
"\n"
"COLUMNS=256\n"
"export COLUMNS\n"
"\n"
"# -n means no xauth, -f prescribes file to use.\n"
"showxauth=1\n"
"if [ \"X$1\" = \"X-n\" ]; then\n"
......@@ -833,6 +836,10 @@ char find_display[] =
" fi\n"
" fi\n"
" done\n"
" echo \"\" # failure\n"
" if [ \"X$showxauth\" != \"X\" ]; then\n"
" echo \"\"\n"
" fi\n"
" exit 1\n"
"fi\n"
"\n"
......@@ -995,7 +1002,12 @@ char find_display[] =
" exit\n"
"fi\n"
"if [ \"X$display\" = \"X\" ]; then\n"
" if [ \"X$FINDDISPLAY_run\" = \"X\" ]; then\n"
" echo \"\" # failure\n"
" if [ \"X$showxauth\" != \"X\" ]; then\n"
" echo \"\"\n"
" fi\n"
" fi\n"
" exit 1\n"
"fi\n"
"\n"
......@@ -1046,6 +1058,9 @@ char create_display[] =
" set -xv\n"
"fi\n"
"\n"
"COLUMNS=256\n"
"export COLUMNS\n"
"\n"
"findfree() {\n"
" try=20\n"
" n=\"\"\n"
......@@ -1339,18 +1354,28 @@ char create_display[] =
" fi\n"
"\n"
" result=0\n"
" ns=4\n"
" #ns=4\n"
" ns=0\n"
" ns2=1\n"
" #if uname | grep SunOS > /dev/null; then\n"
" # ns=2\n"
" #fi\n"
"\n"
" if [ \"X$use_xdmcp_query\" = \"X1\" ]; then\n"
" # we cannot use -nolisten tcp\n"
" echo \"$* -once -query localhost $FD_OPTS\" 1>&2\n"
" if [ \"X$have_root\" != \"X\" ]; then\n"
" $have_nohup $* -once -query localhost $FD_OPTS 1>&2 &\n"
" else\n"
" if [ \"X$ns\" = \"X0\" ]; then\n"
" $have_nohup sh -c \"$* -once -query localhost -auth $authfile $FD_OPTS\" 1>&2 &\n"
" else\n"
" $have_nohup sh -c \"(sleep $ns; $* -once -query localhost -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" ns=0\n"
" result=1\n"
" #result=1\n"
" fi\n"
" fi\n"
" pid=$!\n"
" sleep 10\n"
" elif [ \"X$have_startx\" != \"X\" -o \"X$have_xinit\" != \"X\" ]; then\n"
" if [ \"X$have_startx\" != \"X\" ]; then\n"
" sxcmd=$have_startx\n"
......@@ -1361,42 +1386,93 @@ char create_display[] =
" if [ \"X$have_root\" != \"X\" ]; then\n"
" $sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS 1>&2 &\n"
" else\n"
" if [ \"X$ns\" = \"X0\" ]; then\n"
" $have_nohup sh -c \"$sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS\" 1>&2 &\n"
" else\n"
" # Why did we ever sleep before starting the server??\n"
" $have_nohup sh -c \"(sleep $ns; $sxcmd $sess -- $* -nolisten tcp -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" ns=0\n"
" result=1\n"
" #result=1\n"
" fi\n"
" fi\n"
" pid=$!\n"
" else\n"
" # need to emulate startx/xinit ourselves...\n"
" echo \"$* -nolisten tcp -auth $authfile $FD_OPTS\" 1>&2\n"
" if [ \"X$have_root\" != \"X\" ]; then\n"
" $have_nohup $* -nolisten tcp -auth $authfile $FD_OPTS 1>&2 &\n"
" pid=$!\n"
" sleep 2\n"
" sleep 3\n"
" $have_nohup $sess 1>&2 &\n"
" else\n"
" if [ \"X$ns\" = \"X0\" ]; then\n"
" $have_nohup sh -c \"$* -nolisten tcp -auth $authfile $FD_OPTS\" 1>&2 &\n"
" else\n"
" $have_nohup sh -c \"(sleep $ns; $* -nolisten tcp -auth $authfile $FD_OPTS)\" 1>&2 &\n"
" #result=1\n"
" fi\n"
" pid=$!\n"
" sleep 2\n"
" $have_nohup sh -c \"(sleep $ns; $sess)\" 1>&2 &\n"
" ns=0\n"
" result=1\n"
" sleep 3\n"
" $have_nohup sh -c \"(sleep 3; $sess)\" 1>&2 &\n"
" fi\n"
" fi\n"
" sleep $ns\n"
" if uname | grep SunOS > /dev/null; then\n"
" $have_nohup sh -c \"(sleep 60; rm -f $rmf)\" 1>&2 &\n"
" else\n"
" $have_nohup sh -c \"(sleep 60; rm -f $rmf $authfile)\" 1>&2 &\n"
" fi\n"
"\n"
" t=0\n"
" tmax=5\n"
" while [ $t -lt $tmax ]\n"
" do\n"
" t=`expr $t + 1`\n"
" sleep $ns2\n"
" pid2=`head -n 1 \"/tmp/.X$N-lock\" 2>/dev/null | sed -e 's/[ ]//g' | grep '^[0-9][0-9]*$'`\n"
" if [ \"X$pid2\" = \"X\" ]; then\n"
" pid2=9999999\n"
" fi\n"
" if [ \"X$result\" = \"X1\" ]; then\n"
" :\n"
" break\n"
" elif [ -d /proc/$pid2 ]; then\n"
" result=1\n"
" break\n"
" elif kill -0 $pid2 2>/dev/null; then\n"
" result=1\n"
" break\n"
" elif [ -d /proc/$pid ]; then\n"
" result=1\n"
" elif kill -0 $pid; then\n"
" break\n"
" elif kill -0 $pid 2>/dev/null; then\n"
" result=1\n"
" break\n"
" else\n"
" result=0\n"
" fi\n"
" if uname | grep SunOS > /dev/null; then\n"
" $have_nohup sh -c \"(sleep 60; rm -f $rmf)\" 1>&2 &\n"
" else\n"
" $have_nohup sh -c \"(sleep 60; rm -f $rmf $authfile)\" 1>&2 &\n"
" if [ \"X$have_netstat\" != \"X\" ]; then\n"
" if $have_netstat -an | grep \"/tmp/.X11-unix/X$N\\$\" > /dev/null; then\n"
" result=1\n"
" fi\n"
" fi\n"
" done\n"
"\n"
"# if [ \"X$result\" = \"X1\" ]; then\n"
"# if [ \"X$use_xdmcp_query\" = \"X0\" -a \"X$have_xdpyinfo\" != \"X\" ]; then\n"
"# ok=0\n"
"# for t in 1 2 3 4\n"
"# do\n"
"# $have_xdpyinfo >/dev/null 2>&1\n"
"# if [ $? != 0 ]; then\n"
"# sleep 1\n"
"# else\n"
"# ok=1\n"
"# break;\n"
"# fi\n"
"# done\n"
"# if [ \"X$ok\" = \"X0\" ]; then\n"
"# result=0\n"
"# fi\n"
"# fi\n"
"# fi\n"
"\n"
" if [ \"X$redir_daemon\" != \"X\" -a \"X$result\" = \"X1\" ]; then\n"
" redir_daemon=`echo \"$redir_daemon\" | sed -e 's|[^A-z0-9:,/]||g'`\n"
......@@ -1671,7 +1747,7 @@ char create_display[] =
" p_ok=1\n"
"fi\n"
"\n"
"for prog in startx xinit xdm gdm kdm xterm Xdummy Xvfb Xvnc xauth mcookie md5sum xmodmap startkde gnome-session blackbox fvwm2 mwm openbox twm windowmaker wmaker enlightenment metacity X Xorg XFree86 Xsun Xsession dtwm netstat nohup esddsp konsole gnome-terminal\n"
"for prog in startx xinit xdm gdm kdm xterm Xdummy Xvfb Xvnc xauth xdpyinfo mcookie md5sum xmodmap startkde gnome-session blackbox fvwm2 mwm openbox twm windowmaker wmaker enlightenment metacity X Xorg XFree86 Xsun Xsession dtwm netstat nohup esddsp konsole gnome-terminal perl\n"
"do\n"
" p2=`echo \"$prog\" | sed -e 's/-/_/g'`\n"
" eval \"have_$p2=''\"\n"
......@@ -1726,15 +1802,15 @@ char create_display[] =
" curr_try=`echo \"$curr_try\" | sed -e 's/[+.-]xdmcp//'`\n"
" curr_try=`echo \"$curr_try\" | sed -e 's/[+.-]redirect//'`\n"
" \n"
" if echo \"$curr_try\" | grep -iw \"^Xdummy\" > /dev/null; then\n"
" if echo \"$curr_try\" | grep -i '^Xdummy\\>' > /dev/null; then\n"
" try_Xdummy\n"
" elif echo \"$curr_try\" | grep -iw \"^Xvfb\" > /dev/null; then\n"
" elif echo \"$curr_try\" | grep -i '^Xvfb\\>' > /dev/null; then\n"
" try_Xvfb\n"
" elif echo \"$curr_try\" | grep -iw \"^Xvnc\" > /dev/null; then\n"
" elif echo \"$curr_try\" | grep -i '^Xvnc\\>' > /dev/null; then\n"
" try_Xvnc\n"
" elif echo \"$curr_try\" | grep -iw \"^Xsrv\" > /dev/null; then\n"
" elif echo \"$curr_try\" | grep -i '^Xsrv\\>' > /dev/null; then\n"
" try_Xsrv\n"
" elif echo \"$curr_try\" | grep -iw \"^X\" > /dev/null; then\n"
" elif echo \"$curr_try\" | grep -i '^X\\>' > /dev/null; then\n"
" try_X\n"
" fi\n"
" if [ \"X$result\" = \"X1\" ]; then\n"
......
......@@ -1412,6 +1412,7 @@ int wait_for_client(int *argc, char** argv, int http) {
if (fd >= 0) {
write(fd, find_display, strlen(find_display));
close(fd);
set_env("FINDDISPLAY_run", "1");
sprintf(com, "/bin/sh %s -n; rm -f %s", tmp, tmp);
system(com);
}
......
......@@ -404,6 +404,67 @@ double rfac(void) {
return f;
}
void check_allinput_rate(void) {
static double last_all_input_check = 0.0, last_all_input_start = 0.0;
static int set = 0;
if (! set) {
set = 1;
last_all_input_check = dnow();
} else {
int dt = 4;
if (x11vnc_current > last_all_input_check + dt) {
int n, nq = 0;
while ((n = rfbCheckFds(screen, 0))) {
nq += n;
}
fprintf(stderr, "nqueued: %d\n", nq);
if (0 && nq > 25 * dt) {
double rate = nq / dt;
rfbLog("Client is sending %.1f extra requests per second for the\n", rate);
rfbLog("past %d seconds! Switching to -allpinput mode. (queued: %d)\n", dt, nq);
all_input = 1;
}
set = 0;
}
}
}
static void do_allinput(long usec) {
static double last = 0.0;
static int meas = 0;
int n, f = 1, cnt = 0;
long usec0;
double now;
if (!screen || !screen->clientHead) {
return;
}
if (usec < 0) {
usec = 0;
}
usec0 = usec;
if (last == 0.0) {
last = dnow();
}
while ((n = rfbCheckFds(screen, usec)) > 0) {
if (f) {
fprintf(stderr, " *");
f = 0;
}
if (cnt++ > 30) {
break;
}
meas += n;
}
fprintf(stderr, "-%d", cnt);
now = dnow();
if (now > last + 2.0) {
double rate = meas / (now - last);
fprintf(stderr, "\n%.2f ", rate);
meas = 0;
last = dnow();
}
}
/*
* utility wrapper to call rfbProcessEvents
* checks that we are not in threaded mode.
......@@ -411,6 +472,7 @@ double rfac(void) {
#define USEC_MAX 999999 /* libvncsever assumes < 1 second */
void rfbPE(long usec) {
int uip0 = unixpw_in_progress;
static int check_rate = -1;
if (! screen) {
return;
}
......@@ -438,6 +500,22 @@ void rfbPE(long usec) {
; /* this is new unixpw client */
}
}
if (check_rate != 0) {
if (check_rate < 0) {
if (getenv("CHECK_RATE")) {
check_rate = 1;
} else {
check_rate = 0;
}
}
if (check_rate && !all_input && x11vnc_current < last_client + 45) {
check_allinput_rate();
}
}
if (all_input) {
do_allinput(usec);
}
}
void rfbCFD(long usec) {
......@@ -459,19 +537,15 @@ void rfbCFD(long usec) {
(int) usec, tm - x11vnc_start);
}
#if 0
fprintf(stderr, "handleEventsEagerly: %d\n", screen->handleEventsEagerly);
#endif
if (! use_threads) {
if (0 && all_input) {
static int cnt = 0;
int f = 1;
while (rfbCheckFds(screen, usec) > 0) {
if (f) {
cnt++;
f = 0;
}
fprintf(stderr, "-%d", cnt);
}
if (all_input) {
do_allinput(usec);
} else {
/* XXX how for cmdline? */
if (all_input) {
screen->handleEventsEagerly = TRUE;
} else {
......
......@@ -2,7 +2,7 @@
.TH X11VNC "1" "September 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.3, lastmod: 2007-09-10
version: 0.9.3, lastmod: 2007-09-26
.SH SYNOPSIS
.B x11vnc
[OPTION]...
......@@ -930,11 +930,13 @@ First try to find the user's display using FINDDISPLAY,
if that doesn't succeed create an X session via the
FINDCREATEDISPLAY method. This is an alias for
"\fB-display\fR \fIWAIT:cmd=FINDCREATEDISPLAY-Xvfb\fR".
.IP
SSH NOTE: for both \fB-find\fR and \fB-create\fR you can (should!)
add the "\fB-localhost\fR" option to force SSH tunnel access.
.PP
\fB-xdummy\fR
.IP
As in \fB-create,\fR except Xdummy instead of Xvfb. Implies
FD_XDUMMY_NOROOT=1.
As in \fB-create,\fR except Xdummy instead of Xvfb.
.PP
\fB-xvnc\fR
.IP
......@@ -946,14 +948,13 @@ As in \fB-create,\fR except Xvnc.redirect instead of Xvfb.
.PP
\fB-svc\fR
.IP
Terminal services mode. Also "\fB-service\fR". Alias for
\fB-display\fR WAIT:cmd=FINDCREATEDISPLAY-Xvfb \fB-unixpw\fR
\fB-users\fR unixpw= \fB-ssl\fR SAVE
Terminal services mode based on SSL access. Alias for
\fB-display\fR WAIT:cmd=FINDCREATEDISPLAY-Xvfb \fB-unixpw\fR \fB-users\fR
unixpw= \fB-ssl\fR SAVE Also "\fB-service\fR".
.PP
\fB-svc_xdummy\fR
.IP
As \fB-svc\fR except Xdummy instead of Xvfb. Implies
FD_XDUMMY_NOROOT=1.
As \fB-svc\fR except Xdummy instead of Xvfb.
.PP
\fB-svc_xvnc\fR
.IP
......@@ -961,9 +962,30 @@ As \fB-svc\fR except Xvnc instead of Xvfb.
.PP
\fB-xdmsvc\fR
.IP
Terminal services mode. Also "\fB-xdm_service\fR". Alias for
\fB-display\fR WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp \fB-unixpw\fR
\fB-users\fR unixpw= \fB-ssl\fR SAVE
Display manager Terminal services mode based on SSL.
Alias for \fB-display\fR WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp
\fB-unixpw\fR \fB-users\fR unixpw= \fB-ssl\fR SAVE Also "\fB-xdm_service\fR".
.IP
To create a session a user will have to first log in
to the \fB-unixpw\fR dialog and then log in again to the
XDM/GDM/KDM prompt. Subsequent re-connections will
only require the \fB-unixpw\fR password. See the discussion
under \fB-display\fR WAIT:... for more details about XDM,
etc configuration.
.PP
\fB-sshxdmsvc\fR
.IP
Display manager Terminal services mode based on SSH.
Alias for \fB-display\fR WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp
\fB-localhost.\fR
.IP
The \fB-localhost\fR option constrains connections to come
in via a SSH tunnel (which will require a login).
To create a session a user will also have to log into
the XDM GDM KDM prompt. Subsequent re-connections will
only only require the SSH login. See the discussion
under \fB-display\fR WAIT:... for more details about XDM,
etc configuration.
.PP
\fB-redirect\fR \fIport\fR
.IP
......@@ -1122,15 +1144,21 @@ for the user. This is the only time x11vnc tries to
actually start up an X server.
.IP
By default FINDCREATEDISPLAY will try Xdummy and then
Xvfb. The Xdummy wrapper is part of the x11vnc source
code (x11vnc/misc/Xdummy) It should be available in
PATH and have run "Xdummy \fB-install"\fR once to create
the shared library. Xdummy requires root permission and
only works on Linux. (Note: specify FD_XDUMMY_NOROOT=1
to skip a check for the root id; evidently your
Xvfb:
.IP
The Xdummy wrapper is part of the x11vnc source code
(x11vnc/misc/Xdummy) It should be available in PATH and
have run "Xdummy \fB-install"\fR once to create the shared
library. Xdummy requires root permission and only works
on Linux. (Note: specify FD_XDUMMY_NOROOT=1 to skip
a check for the root id; evidently your
.IR sudo (1)
will take care of everything). Xvfb is available on
most platforms and does not require root.
will
take care of everything. The \fB-xdummy\fR and \fB-svc_xdummy\fR
options imply FD_XDUMMY_NOROOT=1).
.IP
Xvfb is available on most platforms and does not
require root.
.IP
When x11vnc exits (i.e. user disconnects) the X
server session stays running in the background.
......@@ -1209,8 +1237,9 @@ for gdm in gdm.conf: Enable=true in section [xdmcp]
for kdm in kdmrc: Enable=true in section [Xdmcp]
for xdm in xdm-config: DisplayManager.requestPort: 177
.IP
See the shorthand options above "\fB-svc\fR" and "\fB-xdmsvc\fR"
that specify the above options for some useful cases.
See the shorthand options above "\fB-svc\fR", "\fB-xdmsvc\fR"
and "\fB-sshxdmsvc\fR" that specify the above options for
some useful cases.
.IP
If you set the env. var WAITBG=1 x11vnc will go into
the background once listening in wait mode.
......
......@@ -1026,6 +1026,8 @@ static void watch_loop(void) {
got_keyboard_calls = 0;
urgent_update = 0;
x11vnc_current = dnow();
if (! use_threads) {
dtime0(&tm);
if (! skip_pe) {
......@@ -2518,6 +2520,10 @@ int main(int argc, char* argv[]) {
users_list = strdup("unixpw=");
use_openssl = 1;
openssl_pem = strdup("SAVE");
} else if (!strcmp(arg, "-sshxdmsvc")) {
use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp");
allow_list = strdup("127.0.0.1");
got_localhost = 1;
#ifndef NO_SSL_OR_UNIXPW
} else if (!strcmp(arg, "-unixpw_cmd")
|| !strcmp(arg, "-unixpw_cmd_unsafe")) {
......@@ -3880,7 +3886,7 @@ int main(int argc, char* argv[]) {
/* open the X display: */
if (auth_file) {
set_env("XAUTHORITY", auth_file);
fprintf(stderr, "XA: %s\n", getenv("XAUTHORITY"));
if (0) fprintf(stderr, "XA: %s\n", getenv("XAUTHORITY"));
}
#if LIBVNCSERVER_HAVE_XKEYBOARD
/*
......
......@@ -468,6 +468,7 @@ extern double last_copyrect_fix;
extern double last_wireframe;
extern double servertime_diff;
extern double x11vnc_start;
extern double x11vnc_current;
extern double g_now;
extern double last_get_wm_frame_time;
......
......@@ -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-09-10";
char lastmod[] = "0.9.3 lastmod: 2007-09-26";
/* X display info */
......@@ -131,6 +131,7 @@ double last_copyrect_fix = 0.0;
double last_wireframe = 0.0;
double servertime_diff = 0.0;
double x11vnc_start = 0.0;
double x11vnc_current = 0.0;
double g_now = 0.0;
double last_get_wm_frame_time = 0.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment