Commit 6378acec authored by runge's avatar runge

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

parent 85303147
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -941,6 +941,9 @@ void print_help(int mode) {
" See the shorthand options above \"-svc\" and \"-xdmsvc\"\n"
" that specify the above options for 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"
"\n"
#ifndef NO_SSL_OR_UNIXPW
"-nossl Disable the -ssl option (see below). Since -ssl is off\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"
" echo \"$have_fvwm2\"\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"
" echo \"$have_xterm\"\n"
" return\n"
......@@ -1009,7 +1012,7 @@ char create_display[] =
" return\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"
" eval \"have=\\$have_$wm\"\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);
}
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) {
accept_openssl(OPENSSL_INETD, -1);
}
......@@ -1630,6 +1662,8 @@ if (!keep_unixpw_opts) {
sprintf(xsess, "twm");
} else if (strstr(t, "fvwm")) {
sprintf(xsess, "fvwm");
} else if (strstr(t, "mwm")) {
sprintf(xsess, "mwm");
} else if (strstr(t, "failsafe")) {
sprintf(xsess, "failsafe");
}
......
.\" 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
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
.B x11vnc
[OPTION]...
......@@ -1095,6 +1095,9 @@ 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.
.IP
If you set the env. var WAITBG=1 x11vnc will go into
the background once listening in wait mode.
.PP
\fB-nossl\fR
.IP
......@@ -4909,7 +4912,7 @@ set ftp root
.IR HOME
.PP
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
.IR RFB_CLIENT_IP ,
.IR RFB_CLIENT_PORT ,
......@@ -4919,6 +4922,12 @@ run by \fB-accept\fR and \fB-gone\fR:
.IR RFB_CLIENT_ID ,
.IR RFB_CLIENT_COUNT ,
.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"
.IR vncviewer (1),
.IR vncpasswd (1),
......
......@@ -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.1 lastmod: 2007-04-30";
char lastmod[] = "0.9.1 lastmod: 2007-05-03";
/* X display info */
......
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