summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2009-12-24 18:00:59 -0500
committerrunge <runge@karlrunge.com>2009-12-24 18:00:59 -0500
commitc96107783c89359781581cacc2fa46f8a979fc98 (patch)
tree60216b14e9d719a66a02f0e2b29eaa3598b75403 /x11vnc/x11vnc.c
parent9659bc129f520b635b7056cf5d746a35003a6b80 (diff)
downloadlibtdevnc-c96107783c89359781581cacc2fa46f8a979fc98.tar.gz
libtdevnc-c96107783c89359781581cacc2fa46f8a979fc98.zip
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.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c39
1 files changed, 38 insertions, 1 deletions
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");