From c96107783c89359781581cacc2fa46f8a979fc98 Mon Sep 17 00:00:00 2001 From: runge Date: Thu, 24 Dec 2009 18:00:59 -0500 Subject: x11vnc: prepare_x11vnc_dist.sh for 0.9.10. -xdummy_xvfb, -svc_xdummy_xvfb and -create_x shorthand. lxde session. Xdummy improvements and root no longer required. --- x11vnc/x11vnc.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'x11vnc/x11vnc.c') diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c index d6429e3..28db622 100644 --- a/x11vnc/x11vnc.c +++ b/x11vnc/x11vnc.c @@ -2221,10 +2221,20 @@ int main(int argc, char* argv[]) { use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvfb"); continue; } + if (!strcmp(arg, "-create_x")) { + CHECK_ARGC + use_dpy = (char *) malloc(strlen(argv[i+1])+100); + sprintf(use_dpy, "WAIT:cmd=FINDCREATEDISPLAY-%s", argv[++i]); + continue; + } if (!strcmp(arg, "-xdummy")) { use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xdummy"); continue; } + if (!strcmp(arg, "-xdummy_xvfb")) { + use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xdummy,Xvfb"); + continue; + } if (!strcmp(arg, "-xvnc")) { use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvnc"); continue; @@ -2557,7 +2567,14 @@ int main(int argc, char* argv[]) { users_list = strdup("unixpw="); use_openssl = 1; openssl_pem = strdup("SAVE"); - set_env("FD_XDUMMY_NOROOT", "1"); + continue; + } + if (!strcmp(arg, "-svc_xdummy_xvfb")) { + use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xdummy,Xvfb"); + unixpw = 1; + users_list = strdup("unixpw="); + use_openssl = 1; + openssl_pem = strdup("SAVE"); continue; } if (!strcmp(arg, "-svc_xvnc")) { @@ -4924,6 +4941,15 @@ int main(int argc, char* argv[]) { } else if (use_dpy && strstr(use_dpy, "WAIT:") == use_dpy) { char *mcm = multiple_cursors_mode; + if (strstr(use_dpy, "Xdummy")) { + if (!xrandr && !got_noxrandr) { + if (! quiet) { + rfbLog("Enabling -xrandr for possible use of Xdummy server.\n"); + } + xrandr = 1; + } + } + waited_for_client = wait_for_client(&argc_vnc, argv_vnc, try_http && ! got_httpdir); @@ -4933,6 +4959,7 @@ int main(int argc, char* argv[]) { } } + if (auth_file) { check_guess_auth_file(); if (auth_file != NULL) { @@ -4990,6 +5017,16 @@ int main(int argc, char* argv[]) { exit(0); } + if (dpy && !xrandr && !got_noxrandr) { + Atom trap_xrandr = XInternAtom(dpy, "X11VNC_TRAP_XRANDR", True); + if (trap_xrandr != None) { + if (! quiet) { + rfbLog("Enabling -xrandr due to X11VNC_TRAP_XRANDR atom.\n"); + } + xrandr = 1; + } + } + #ifdef MACOSX if (! dpy && ! raw_fb_str) { raw_fb_str = strdup("console"); -- cgit v1.2.1