x11vnc: add WAITBG=1 env. var, add mwm to -create.

pull/1/head
runge 17 years ago
parent 85303147a0
commit 6378acecb0

File diff suppressed because it is too large Load Diff

@ -941,6 +941,9 @@ void print_help(int mode) {
" See the shorthand options above \"-svc\" and \"-xdmsvc\"\n" " See the shorthand options above \"-svc\" and \"-xdmsvc\"\n"
" that specify the above options for some useful cases.\n" " that specify the above options for some useful cases.\n"
"\n" "\n"
" If you set the env. var WAITBG=1 x11vnc will go into\n"
" the background once listening in wait mode.\n"
"\n"
#ifndef NO_SSL_OR_UNIXPW #ifndef NO_SSL_OR_UNIXPW
"-nossl Disable the -ssl option (see below). Since -ssl is off\n" "-nossl Disable the -ssl option (see below). Since -ssl is off\n"
" by default -nossl would only be used on the commandline\n" " by default -nossl would only be used on the commandline\n"

@ -979,6 +979,9 @@ char create_display[] =
" elif [ \"X$have_fvwm2\" != \"X\" -a \"X$FD_SESS\" = \"Xfvwm\" ]; then\n" " elif [ \"X$have_fvwm2\" != \"X\" -a \"X$FD_SESS\" = \"Xfvwm\" ]; then\n"
" echo \"$have_fvwm2\"\n" " echo \"$have_fvwm2\"\n"
" return\n" " return\n"
" elif [ \"X$have_mwm\" != \"X\" -a \"X$FD_SESS\" = \"Xmwm\" ]; then\n"
" echo \"$have_mwm\"\n"
" return\n"
" elif [ \"X$have_xterm\" != \"X\" -a \"X$FD_SESS\" = \"Xfailsafe\" ]; then\n" " elif [ \"X$have_xterm\" != \"X\" -a \"X$FD_SESS\" = \"Xfailsafe\" ]; then\n"
" echo \"$have_xterm\"\n" " echo \"$have_xterm\"\n"
" return\n" " return\n"
@ -1009,7 +1012,7 @@ char create_display[] =
" return\n" " return\n"
" fi\n" " fi\n"
" fi\n" " fi\n"
" for wm in blackbox fvwm icewm wmw openbox twm windowmaker metacity\n" " for wm in blackbox fvwm icewm wmw openbox twm mwm windowmaker metacity\n"
" do\n" " do\n"
" eval \"have=\\$have_$wm\"\n" " eval \"have=\\$have_$wm\"\n"
" if [ \"X$have\" = \"X\" ]; then\n" " if [ \"X$have\" = \"X\" ]; then\n"

@ -1434,6 +1434,38 @@ int wait_for_client(int *argc, char** argv, int http) {
avahi_advertise(name, this_host(), screen->port); avahi_advertise(name, this_host(), screen->port);
} }
if (getenv("WAITBG")) {
#if LIBVNCSERVER_HAVE_FORK && LIBVNCSERVER_HAVE_SETSID
int p, n;
if ((p = fork()) > 0) {
exit(0);
} else if (p == -1) {
rfbLogEnable(1);
fprintf(stderr, "could not fork\n");
perror("fork");
clean_up_exit(1);
}
if (setsid() == -1) {
rfbLogEnable(1);
fprintf(stderr, "setsid failed\n");
perror("setsid");
clean_up_exit(1);
}
/* adjust our stdio */
n = open("/dev/null", O_RDONLY);
dup2(n, 0);
dup2(n, 1);
if (! logfile) {
dup2(n, 2);
}
if (n > 2) {
close(n);
}
#else
clean_up_exit(1);
#endif
}
if (inetd && use_openssl) { if (inetd && use_openssl) {
accept_openssl(OPENSSL_INETD, -1); accept_openssl(OPENSSL_INETD, -1);
} }
@ -1630,6 +1662,8 @@ if (!keep_unixpw_opts) {
sprintf(xsess, "twm"); sprintf(xsess, "twm");
} else if (strstr(t, "fvwm")) { } else if (strstr(t, "fvwm")) {
sprintf(xsess, "fvwm"); sprintf(xsess, "fvwm");
} else if (strstr(t, "mwm")) {
sprintf(xsess, "mwm");
} else if (strstr(t, "failsafe")) { } else if (strstr(t, "failsafe")) {
sprintf(xsess, "failsafe"); sprintf(xsess, "failsafe");
} }

@ -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" "April 2007" "x11vnc " "User Commands" .TH X11VNC "1" "May 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.1, lastmod: 2007-04-30 version: 0.9.1, lastmod: 2007-05-03
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
@ -1095,6 +1095,9 @@ for xdm in xdm-config: DisplayManager.requestPort: 177
.IP .IP
See the shorthand options above "\fB-svc\fR" and "\fB-xdmsvc\fR" See the shorthand options above "\fB-svc\fR" and "\fB-xdmsvc\fR"
that specify the above options for some useful cases. 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.
.PP .PP
\fB-nossl\fR \fB-nossl\fR
.IP .IP
@ -4909,7 +4912,7 @@ set ftp root
.IR HOME .IR HOME
.PP .PP
The following are set for the auxiliary commands The following are set for the auxiliary commands
run by \fB-accept\fR and \fB-gone\fR: run by \fB-accept\fR, \fB-gone\fR and other cases:
.PP .PP
.IR RFB_CLIENT_IP , .IR RFB_CLIENT_IP ,
.IR RFB_CLIENT_PORT , .IR RFB_CLIENT_PORT ,
@ -4919,6 +4922,12 @@ run by \fB-accept\fR and \fB-gone\fR:
.IR RFB_CLIENT_ID , .IR RFB_CLIENT_ID ,
.IR RFB_CLIENT_COUNT , .IR RFB_CLIENT_COUNT ,
.IR RFB_MODE .IR RFB_MODE
.IR RFB_STATE
.IR RFB_LOGIN_VIEWONLY
.IR RFB_LOGIN_TIME
.IR RFB_CURRENT_TIME
.IR RFB_USERNAME
.IR RFB_SSL_CLIENT_CERT
.SH "SEE ALSO" .SH "SEE ALSO"
.IR vncviewer (1), .IR vncviewer (1),
.IR vncpasswd (1), .IR vncpasswd (1),

@ -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.1 lastmod: 2007-04-30"; char lastmod[] = "0.9.1 lastmod: 2007-05-03";
/* X display info */ /* X display info */

Loading…
Cancel
Save