summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
authorrunge <runge>2007-09-11 20:15:38 +0000
committerrunge <runge>2007-09-11 20:15:38 +0000
commit115e935f72b58e72598c7fccf17364d6cd2fa5a1 (patch)
tree1ce24590ac497725cb977dfc08ee363773928e89 /x11vnc/x11vnc.c
parent6a6d26a74701179672d59bfd153cc1a2e92e96bd (diff)
downloadlibtdevnc-115e935f72b58e72598c7fccf17364d6cd2fa5a1.tar.gz
libtdevnc-115e935f72b58e72598c7fccf17364d6cd2fa5a1.zip
x11vnc: fix wireframe crash under -clip. Add -redirect for
VNC redir. -rawfb nullbig, randbig, solid, swirl, etc. FD_XDM mode to find_display. -listdpy. Add enlightenment. Xvnc.redirect FINDDISPLAY-vnc_redirect. -xvnc, -xvnc_redirect, -svc_xvnc. AUTO_PORT.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index ca76d8d..7da5122 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -2299,20 +2299,34 @@ int main(int argc, char* argv[]) {
}
} else if (!strcmp(arg, "-find")) {
use_dpy = strdup("WAIT:cmd=FINDDISPLAY");
- } else if (!strcmp(arg, "-finddpy")) {
+ } else if (!strcmp(arg, "-finddpy") || strstr(arg, "-listdpy") == arg) {
int ic = 0;
use_dpy = strdup("WAIT:cmd=FINDDISPLAY-run");
if (argc > i+1) {
set_env("X11VNC_USER", argv[i+1]);
fprintf(stdout, "X11VNC_USER=%s\n", getenv("X11VNC_USER"));
}
+ if (strstr(arg, "-listdpy") == arg) {
+ set_env("FIND_DISPLAY_ALL", "1");
+ }
wait_for_client(&ic, NULL, 0);
exit(0);
} else if (!strcmp(arg, "-create")) {
use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvfb");
} else if (!strcmp(arg, "-xdummy")) {
use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xdummy");
- set_env("FD_XDUMMY_NOROOT", "1");
+ } else if (!strcmp(arg, "-xvnc")) {
+ use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvnc");
+ } else if (!strcmp(arg, "-xvnc_redirect")) {
+ use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvnc.redirect");
+ } else if (!strcmp(arg, "-redirect")) {
+ char *q, *t, *t0 = "WAIT:cmd=FINDDISPLAY-vnc_redirect";
+ CHECK_ARGC
+ t = (char *) malloc(strlen(t0) + strlen(argv[++i]) + 2);
+ q = strrchr(argv[i], ':');
+ if (q) *q = ' ';
+ sprintf(t, "%s=%s", t0, argv[i]);
+ use_dpy = t;
} else if (!strcmp(arg, "-auth") || !strcmp(arg, "-xauth")) {
CHECK_ARGC
auth_file = strdup(argv[++i]);
@@ -2492,6 +2506,12 @@ int main(int argc, char* argv[]) {
use_openssl = 1;
openssl_pem = strdup("SAVE");
set_env("FD_XDUMMY_NOROOT", "1");
+ } else if (!strcmp(arg, "-svc_xvnc")) {
+ use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvnc");
+ unixpw = 1;
+ users_list = strdup("unixpw=");
+ use_openssl = 1;
+ openssl_pem = strdup("SAVE");
} else if (!strcmp(arg, "-xdmsvc") || !strcmp(arg, "-xdm_service")) {
use_dpy = strdup("WAIT:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp");
unixpw = 1;
@@ -3295,6 +3315,10 @@ int main(int argc, char* argv[]) {
orig_use_xdamage = use_xdamage;
+ if (!auto_port && getenv("AUTO_PORT")) {
+ auto_port = atoi(getenv("AUTO_PORT"));
+ }
+
if (getenv("X11VNC_LOOP_MODE")) {
if (bg && !getenv("X11VNC_LOOP_MODE_BG")) {
if (! quiet) {
@@ -3856,6 +3880,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 LIBVNCSERVER_HAVE_XKEYBOARD
/*