summaryrefslogtreecommitdiffstats
path: root/x11vnc/x11vnc.c
diff options
context:
space:
mode:
authorrunge <runge>2007-05-22 01:24:48 +0000
committerrunge <runge>2007-05-22 01:24:48 +0000
commite3fc6fc68c7cd64c7cbcc2a86082b87411f9396d (patch)
tree603dd84dad7eca4d896b9c9a7120e0b88d337030 /x11vnc/x11vnc.c
parente9353e8d2919a6f2947602cb3c42317d82fb26d8 (diff)
downloadlibtdevnc-e3fc6fc68c7cd64c7cbcc2a86082b87411f9396d.tar.gz
libtdevnc-e3fc6fc68c7cd64c7cbcc2a86082b87411f9396d.zip
x11vnc: set things up (NCACHE = -1) to not have -ncache on by default.
Diffstat (limited to 'x11vnc/x11vnc.c')
-rw-r--r--x11vnc/x11vnc.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index cdf31ab..56ad395 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -1493,7 +1493,7 @@ void ncache_beta_tester_message(void) {
char msg[] =
"\n"
-"***************************************************************************\n"
+"******************************************************************************\n"
"\n"
"Hello! Exciting News!!\n"
"\n"
@@ -1526,6 +1526,20 @@ char msg[] =
"waiting for connections:\n"
;
+char msg2[] =
+"\n"
+"******************************************************************************\n"
+"Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?\n"
+"\n"
+"The scheme stores pixel data offscreen on the VNC viewer side for faster\n"
+"retrieval. It should work with any VNC viewer. Try it by running:\n"
+"\n"
+" x11vnc -ncache 10 ...\n"
+"\n"
+"more info: http://www.karlrunge.com/x11vnc/#faq-client-caching\n"
+"\n"
+;
+
if (raw_fb_str && !macosx_console) {
return;
}
@@ -1535,9 +1549,13 @@ char msg[] =
#ifdef NO_NCACHE
return;
#endif
-
- fprintf(stderr, msg, ncache);
+ if (ncache == 0) {
+ fprintf(stderr, msg2);
+ ncache0 = ncache = 0;
+ } else {
+ fprintf(stderr, msg, ncache);
+ }
}
#define SHOW_NO_PASSWORD_WARNING \
@@ -1565,6 +1583,7 @@ int main(int argc, char* argv[]) {
int got_httpdir = 0, try_http = 0;
int orig_use_xdamage = use_xdamage;
XImage *fb0 = NULL;
+ int ncache_msg = 0;
/* used to pass args we do not know about to rfbGetScreen(): */
int argc_vnc_max = 1024;
@@ -3144,10 +3163,15 @@ int main(int argc, char* argv[]) {
if (ncache < 0) {
ncache_beta_tester = 1;
+ ncache_msg = 1;
+ if (ncache == -1) {
+ ncache = 0;
+ }
ncache = -ncache;
if (try_http || got_httpdir) {
/* JVM usually not set to handle all the memory */
ncache = 0;
+ ncache_msg = 0;
}
}
@@ -3920,7 +3944,7 @@ int main(int argc, char* argv[]) {
}
set_vnc_desktop_name();
- if (ncache_beta_tester && ncache != 0) {
+ if (ncache_beta_tester && (ncache != 0 || ncache_msg)) {
ncache_beta_tester_message();
}