diff options
author | runge <runge> | 2006-06-18 23:59:45 +0000 |
---|---|---|
committer | runge <runge> | 2006-06-18 23:59:45 +0000 |
commit | 64e731a9da82e3cc614e274d6fca6f855d0359b7 (patch) | |
tree | 540bca0a021f3e74b768a747bc3d75435848ca0d /x11vnc/solid.c | |
parent | 363ae71df0f25b018136d19eed20be954e1dd088 (diff) | |
download | libtdevnc-64e731a9da82e3cc614e274d6fca6f855d0359b7.tar.gz libtdevnc-64e731a9da82e3cc614e274d6fca6f855d0359b7.zip |
x11vnc: --grabkbd, -grabptr, -env, -allowedcmds, unixpw+WAIT user fred:options
Diffstat (limited to 'x11vnc/solid.c')
-rw-r--r-- | x11vnc/solid.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/x11vnc/solid.c b/x11vnc/solid.c index 25d92e2..16e1628 100644 --- a/x11vnc/solid.c +++ b/x11vnc/solid.c @@ -54,7 +54,7 @@ static int dt_cmd(char *cmd) { } /* dt */ - if (no_external_cmds) { + if (no_external_cmds || !cmd_ok("dt")) { rfbLog("cannot run external commands in -nocmds mode:\n"); rfbLog(" \"%s\"\n", cmd); rfbLog(" dt_cmd: returning 1\n"); @@ -522,7 +522,11 @@ static void solid_gnome(char *color) { if (! orig_color) { char *q; - orig_color = strdup(cmd_output(get_color)); + if (cmd_ok("dt")) { + orig_color = strdup(cmd_output(get_color)); + } else { + orig_color = ""; + } if (*orig_color == '\0') { orig_color = strdup("#FFFFFF"); } @@ -532,7 +536,11 @@ static void solid_gnome(char *color) { } if (! orig_option) { char *q; - orig_option = strdup(cmd_output(get_option)); + if (cmd_ok("dt")) { + orig_option = strdup(cmd_output(get_option)); + } else { + orig_color = ""; + } if (*orig_option == '\0') { orig_option = strdup("stretched"); } |