summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunge <runge>2006-01-15 03:58:48 +0000
committerrunge <runge>2006-01-15 03:58:48 +0000
commit5993dd757e5af00af6565b3411ea10fd46eafbdf (patch)
tree7450fdde25310857c88221a719f026a1a09336f7
parent60918e6664cd62ea3d71b48cdfda8b89ab82029c (diff)
downloadlibtdevnc-5993dd75.tar.gz
libtdevnc-5993dd75.zip
x11vnc: add -8to24 option for some multi-depth displays.
-rw-r--r--ChangeLog3
-rw-r--r--x11vnc/8to24.c797
-rw-r--r--x11vnc/8to24.h12
-rw-r--r--x11vnc/ChangeLog4
-rw-r--r--x11vnc/Makefile.am2
-rw-r--r--x11vnc/README1087
-rw-r--r--x11vnc/connections.c8
-rw-r--r--x11vnc/cursor.c1
-rw-r--r--x11vnc/help.c42
-rw-r--r--x11vnc/options.c1
-rw-r--r--x11vnc/options.h1
-rw-r--r--x11vnc/remote.c18
-rw-r--r--x11vnc/scan.c22
-rw-r--r--x11vnc/screen.c34
-rwxr-xr-xx11vnc/tkx11vnc5
-rw-r--r--x11vnc/tkx11vnc.h5
-rw-r--r--x11vnc/userinput.c22
-rw-r--r--x11vnc/util.c56
-rw-r--r--x11vnc/util.h4
-rw-r--r--x11vnc/x11vnc.148
-rw-r--r--x11vnc/x11vnc.c3
-rw-r--r--x11vnc/x11vnc.h1
-rw-r--r--x11vnc/x11vnc_defs.c3
23 files changed, 1639 insertions, 540 deletions
diff --git a/ChangeLog b/ChangeLog
index 5107959..cc39fd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2006-01-14 Karl Runge <runge@karlrunge.com>
+ * x11vnc: add -8to24 option for some multi-depth displays.
+
2006-01-12 Karl Runge <runge@karlrunge.com>
* configure.ac: add switches for most X extensions.
diff --git a/x11vnc/8to24.c b/x11vnc/8to24.c
new file mode 100644
index 0000000..5bea044
--- /dev/null
+++ b/x11vnc/8to24.c
@@ -0,0 +1,797 @@
+/* -- 8to24.c -- */
+#include "x11vnc.h"
+#include "cleanup.h"
+#include "scan.h"
+#include "util.h"
+#include "win_utils.h"
+
+int multivis_count = 0;
+
+void check_for_multivis(void);
+void bpp8to24(int, int, int, int);
+void mark_8bpp(void);
+
+static int check_depth(Window win, Window top, int doall);
+static int check_depth_win(Window win, Window top, XWindowAttributes attr);
+
+/* struct for keeping info about the 8bpp windows: */
+typedef struct window8 {
+ Window win;
+ Window top;
+ int depth;
+ int x, y;
+ int w, h;
+ int map_state;
+ Colormap cmap;
+ Bool map_installed;
+ int fetched;
+} window8bpp_t;
+
+/* fixed size array. Will primarily hold visable 8bpp windows */
+#define MAX_8BPP_WINDOWS 64
+static window8bpp_t windows_8bpp[MAX_8BPP_WINDOWS];
+
+static int db24 = 0;
+
+void check_for_multivis(void) {
+ XWindowAttributes attr;
+ int doall = 0;
+ int k, i, cnt, diff;
+ static int first = 1;
+ static double last_update = 0.0;
+ static double last_clear = 0.0;
+ double now = dnow();
+ static Window *stack_old = NULL;
+ static int stack_old_len = 0;
+
+ if (first) {
+ int i;
+ /* initialize 8bpp window table: */
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ windows_8bpp[i].win = None;
+ windows_8bpp[i].top = None;
+ windows_8bpp[i].map_state = IsUnmapped;
+ windows_8bpp[i].cmap = (Colormap) 0;
+ windows_8bpp[i].fetched = 0;
+ }
+ first = 0;
+ doall = 1; /* fetch everything first time */
+ }
+
+ /*
+ * allocate an "old stack" list of all toplevels. we compare
+ * this to the current stack to guess stacking order changes.
+ */
+ if (!stack_old || stack_old_len < stack_list_len) {
+ int n = stack_list_len;
+ if (n < 256) {
+ n = 256;
+ }
+ if (stack_old) {
+ free(stack_old);
+ }
+ stack_old = (Window *) malloc(n*sizeof(Window));
+ stack_old_len = n;
+ }
+
+ /* fill the old stack with visable windows: */
+ cnt = 0;
+ for (k=0; k < stack_list_num; k++) {
+ if (stack_list[k].valid &&
+ stack_list[k].map_state == IsViewable) {
+ stack_old[cnt++] = stack_list[k].win;
+ }
+ }
+
+ /* snapshot + update the current stacking order: */
+ snapshot_stack_list(0, 0.25);
+ if (doall || now > last_update + 0.25) {
+ update_stack_list();
+ last_update = now;
+ }
+
+ /* look for differences in the visable toplevels: */
+ diff = 0;
+ cnt = 0;
+ for (k=0; k < stack_list_num; k++) {
+ if (stack_list[k].valid && stack_list[k].map_state == IsViewable) {
+ if (stack_old[cnt] != stack_list[k].win) {
+ diff = 1;
+ break;
+ }
+ cnt++;
+ }
+ }
+
+ /*
+ * if there are 8bpp visable and a stacking order change
+ * refresh vnc with coverage of the 8bpp regions:
+ */
+ if (diff && multivis_count) {
+if (db24 || 0) fprintf(stderr, "check_for_multivis stack diff: mark_all %f\n", now - x11vnc_start);
+ if (0) mark_rect_as_modified(0, 0, dpy_x, dpy_y, 0);
+ if (1) mark_8bpp();
+ }
+
+ multivis_count = 0;
+
+ /*
+ * every 10 seconds we try to clean out and also refresh the window
+ * info in the the 8bpp window table:
+ */
+ if (now > last_clear + 10) {
+ last_clear = now;
+ X_LOCK;
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ Window w = windows_8bpp[i].win;
+if ((db24 || 0) && w != None) fprintf(stderr, " windows_8bpp: 0x%lx i=%02d ms: %d\n", windows_8bpp[i].win, i, windows_8bpp[i].map_state);
+ if (w == None || ! valid_window(w, &attr, 1)) {
+ /* catch windows that went away: */
+ windows_8bpp[i].win = None;
+ windows_8bpp[i].top = None;
+ windows_8bpp[i].map_state = IsUnmapped;
+ windows_8bpp[i].cmap = (Colormap) 0;
+ windows_8bpp[i].fetched = 0;
+ }
+ }
+ X_UNLOCK;
+ }
+
+ /* loop over all toplevels, both 8 and 24 depths: */
+ for (k=0; k < stack_list_num; k++) {
+ Window r, parent;
+ Window *list0;
+ Status rc;
+ unsigned int nc0;
+ int i1;
+
+ Window win = stack_list[k].win;
+
+ if (win == None) {
+ continue;
+ }
+
+ if (stack_list[k].map_state != IsViewable) {
+ int i;
+ /*
+ * if the toplevel became unmapped, mark it
+ * for the children as well...
+ */
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ if (windows_8bpp[i].top == win) {
+ windows_8bpp[i].map_state =
+ stack_list[k].map_state;
+ }
+ }
+ }
+
+ if (check_depth(win, win, doall)) {
+ /*
+ * returns 1 if no need to recurse down e.g. IT
+ * is 8bpp and we assume all lower one are too.
+ */
+ continue;
+ }
+
+ /* we recurse up to two levels down from stack_list windows */
+ X_LOCK;
+ rc = XQueryTree(dpy, win, &r, &parent, &list0, &nc0);
+ X_UNLOCK;
+ if (! rc) {
+ continue;
+ }
+
+ /* loop over grandchildren of rootwin: */
+ for (i1=0; i1 < (int) nc0; i1++) {
+ Window win1 = list0[i1];
+ Window *list1;
+ unsigned int nc1;
+ int i2;
+
+ if (check_depth(win1, win, doall)) {
+ continue;
+ }
+ X_LOCK;
+ rc = XQueryTree(dpy, win1, &r, &parent, &list1, &nc1);
+ X_UNLOCK;
+ if (! rc) {
+ continue;
+ }
+ /* loop over great-grandchildren of rootwin: */
+ for (i2=0; i2< (int) nc1; i2++) {
+ Window win2 = list1[i2];
+
+ if (check_depth(win2, win, doall)) {
+ continue;
+ }
+ /* more? Which wm does this? */
+ }
+ if (nc1) {
+ X_LOCK;
+ XFree(list1);
+ X_UNLOCK;
+ }
+ }
+ if (nc0) {
+ X_LOCK;
+ XFree(list0);
+ X_UNLOCK;
+ }
+ }
+}
+
+static int check_depth(Window win, Window top, int doall) {
+ XWindowAttributes attr;
+
+ X_LOCK;
+ /* first see if it is (still) a valid window: */
+ if (! valid_window(win, &attr, 1)) {
+ X_UNLOCK;
+ return 1; /* indicate done */
+ }
+ X_UNLOCK;
+ if (! doall && attr.map_state != IsViewable) {
+ /*
+ * store results anyway... this may lead to table filling up,
+ * but currently this allows us to update state of onetime mapped
+ * windows.
+ */
+ check_depth_win(win, top, attr);
+ return 1; /* indicate done */
+ } else if (check_depth_win(win, top, attr)) {
+ return 1; /* indicate done */
+ } else {
+ return 0; /* indicate not done */
+ }
+}
+
+static int check_depth_win(Window win, Window top, XWindowAttributes attr) {
+
+ /*
+ * only store windows with depth not equal to the default visual's depth
+ * note some windows can have depth == 0 ... (skip them).
+ */
+ if (attr.depth != depth && attr.depth > 0) {
+
+ int i, j = -1, none = -1, nomap = -1;
+ int new = 0;
+ if (attr.map_state == IsViewable) {
+ /* count the visable ones: */
+ multivis_count++;
+if (db24 || 0) fprintf(stderr, "multivis: 0x%lx %d\n", win, attr.depth);
+ }
+
+ /* try to find a table slot for this window: */
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ if (none < 0 && windows_8bpp[i].win == None) {
+ /* found first None */
+ none = i;
+ }
+ if (windows_8bpp[i].win == win) {
+ /* found myself */
+ j = i;
+ break;
+ }
+ if (nomap < 0 && windows_8bpp[i].win != None &&
+ windows_8bpp[i].map_state != IsViewable) {
+ /* found first unmapped */
+ nomap = i;
+ }
+ }
+ if (j < 0) {
+ if (attr.map_state != IsViewable) {
+ /* no slot and not visable: not worth keeping */
+ return 1;
+ } else if (none >= 0) {
+ /* put it in the first None slot */
+ j = none;
+ new = 1;
+ } else if (nomap >=0) {
+ /* put it in the first unmapped slot */
+ j = nomap;
+ }
+ /* otherwise we cannot store it... */
+ }
+
+if (db24 || 0) fprintf(stderr, "multivis: 0x%lx ms: %d j: %d no: %d nm: %d\n", win, attr.map_state, j, none, nomap);
+
+ /* store if if we found a slot j: */
+ if (j >= 0) {
+ Window w;
+ int x, y;
+
+if (db24 || 0) fprintf(stderr, "multivis: STORE 0x%lx j: %3d ms: %d\n", win, j, attr.map_state);
+ windows_8bpp[j].win = win;
+ windows_8bpp[j].top = top;
+ windows_8bpp[j].depth = attr.depth;
+ windows_8bpp[j].map_state = attr.map_state;
+ windows_8bpp[j].cmap = attr.colormap;
+ windows_8bpp[j].map_installed = attr.map_installed;
+ windows_8bpp[j].w = attr.width;
+ windows_8bpp[j].h = attr.height;
+
+ /* translate x y to be WRT the root window (not parent) */
+ xtranslate(win, window, 0, 0, &x, &y, &w, 1);
+ windows_8bpp[j].x = x;
+ windows_8bpp[j].y = y;
+
+ windows_8bpp[j].fetched = 1;
+
+ if (new) {
+if (db24) fprintf(stderr, "new: 0x%lx\n", win);
+ /* mark it immediately if a new one: */
+ mark_rect_as_modified(x, y, x + attr.width,
+ y + attr.height, 0);
+ }
+ } else {
+ /*
+ * Error: could not find a slot.
+ * perhaps keep age and expire old ones??
+ */
+if (db24 || 1) fprintf(stderr, "multivis: CANNOT STORE 0x%lx j=%d\n", win, j);
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+if (db24 || 0) fprintf(stderr, " ------------ 0x%lx i=%d\n", windows_8bpp[i].win, i);
+ }
+
+ }
+ return 1;
+ }
+ return 0;
+}
+
+void bpp8to24(int x1, int y1, int x2, int y2) {
+ char *src;
+ char *dst;
+ int pixelsize = bpp/8;
+ int line, i, h, k, w;
+# define CMAPMAX 64
+ Colormap cmaps[CMAPMAX];
+ int ncmaps, cmap_max = CMAPMAX;
+ sraRegionPtr rect, disp, region8bpp;
+ XWindowAttributes attr;
+ static int last_map_count = 0, call_count = 0;
+ static double last_validate = 0.0;
+ int validate = 1;
+
+ if (! cmap8to24 || !cmap8to24_fb) {
+ /* hmmm, why were we called? */
+ return;
+ }
+
+ call_count++;
+
+ /* initialize color map list */
+ ncmaps = 0;
+ for (i=0; i < cmap_max; i++) {
+ cmaps[i] = (Colormap) 0;
+ }
+
+ /* create regions for finding overlap, etc. */
+ disp = sraRgnCreateRect(0, 0, dpy_x, dpy_y);
+ rect = sraRgnCreateRect(x1, y1, x2, y2);
+ region8bpp = sraRgnCreate();
+
+ X_LOCK;
+ XFlush(dpy); /* make sure X server is up to date WRT input, etc */
+ X_UNLOCK;
+
+ if (last_map_count > MAX_8BPP_WINDOWS/4) {
+ /* table is filling up... skip validating sometimes: */
+ int skip = 3;
+ if (last_map_count > MAX_8BPP_WINDOWS/2) {
+ skip = 6;
+ }
+ if (last_map_count > 3*MAX_8BPP_WINDOWS/4) {
+ skip = 12;
+ }
+ if (call_count % skip != 0) {
+ validate = 0;
+fprintf(stderr, " bpp8to24: No validate: %d -- %d\n", skip, last_map_count);
+ } else {
+fprintf(stderr, " bpp8to24: yesvalidate: %d -- %d\n", skip, last_map_count);
+ }
+ }
+ last_map_count = 0;
+
+ /* loop over the table of 8bpp windows: */
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ sraRegionPtr tmp_reg, tmp_reg2;
+ Window w = windows_8bpp[i].win;
+ Window c;
+ int x, y;
+
+ if (wireframe_in_progress) {
+ break; /* skip updates during wireframe drag */
+ }
+
+ if (w == None) {
+ continue;
+ }
+
+if (db24 || 0) fprintf(stderr, "bpp8to24: 0x%lx ms=%d i=%d\n", w, windows_8bpp[i].map_state, i);
+ if (validate) {
+ /*
+ * this could be slow: validating 8bpp windows each
+ * time...
+ */
+ last_validate = dnow();
+
+ X_LOCK;
+ if (! valid_window(w, &attr, 1)) {
+ X_UNLOCK;
+ windows_8bpp[i].win = None;
+ windows_8bpp[i].top = None;
+ windows_8bpp[i].map_state = IsUnmapped;
+ windows_8bpp[i].cmap = (Colormap) 0;
+ windows_8bpp[i].fetched = 0;
+ continue;
+ }
+ X_UNLOCK;
+ if (attr.map_state != IsViewable) {
+ continue;
+ }
+
+ X_LOCK;
+ xtranslate(w, window, 0, 0, &x, &y, &c, 1);
+ X_UNLOCK;
+ } else {
+ /* this would be faster: no call to X server: */
+ if (windows_8bpp[i].map_state != IsViewable) {
+ continue;
+ }
+ x = windows_8bpp[i].x;
+ y = windows_8bpp[i].y;
+ attr.width = windows_8bpp[i].w;
+ attr.height = windows_8bpp[i].h;
+ attr.map_state = windows_8bpp[i].map_state;
+ attr.colormap = windows_8bpp[i].cmap;
+
+ }
+ last_map_count++;
+
+ /* tmp region for this 8bpp rectangle: */
+ tmp_reg = sraRgnCreateRect(x, y, x + attr.width,
+ y + attr.height);
+
+ /* clip to display screen: */
+ sraRgnAnd(tmp_reg, disp);
+
+ /* find overlap with mark region in rect: */
+ sraRgnAnd(tmp_reg, rect);
+ if (sraRgnEmpty(tmp_reg)) {
+ /* skip if no overlap: */
+ sraRgnDestroy(tmp_reg);
+ continue;
+ }
+
+ /* loop over all toplevels, top to bottom clipping: */
+ for (k = stack_list_num - 1; k >= 0; k--) {
+ Window swin = stack_list[k].win;
+ int sx, sy, sw, sh;
+
+if (db24) fprintf(stderr, "Stack win: 0x%lx %d iv=%d\n", swin, k, stack_list[k].map_state);
+
+ if (swin == windows_8bpp[i].top) {
+ /* found our top level: we clip the rest. */
+if (db24) fprintf(stderr, "found top: 0x%lx %d iv=%d\n", swin, k, stack_list[k].map_state);
+ break;
+ }
+ if (stack_list[k].map_state != IsViewable) {
+ /* skip unmapped ones: */
+ continue;
+ }
+
+ /* make a temp rect for this toplevel: */
+ sx = stack_list[k].x;
+ sy = stack_list[k].y;
+ sw = stack_list[k].width;
+ sh = stack_list[k].height;
+
+ tmp_reg2 = sraRgnCreateRect(sx, sy, sx + sw, sy + sh);
+ sraRgnAnd(tmp_reg2, disp);
+
+ /* subtrace it from the 8bpp window region */
+ sraRgnSubtract(tmp_reg, tmp_reg2);
+ sraRgnDestroy(tmp_reg2);
+ }
+
+ if (sraRgnEmpty(tmp_reg)) {
+ /* skip this 8bpp if completely clipped away: */
+ sraRgnDestroy(tmp_reg);
+if (db24) fprintf(stderr, "Empty tmp_reg\n");
+ continue;
+ }
+
+ /* otherwise, store any new colormaps: */
+ if (ncmaps < cmap_max && attr.colormap != (Colormap) 0) {
+ int m, sawit = 0;
+ for (m=0; m < ncmaps; m++) {
+ if (cmaps[m] == attr.colormap) {
+ sawit = 1;
+ break;
+ }
+ }
+ if (! sawit) {
+ /* store only new ones: */
+ cmaps[ncmaps++] = attr.colormap;
+ }
+ }
+
+ /* now include this region with the full 8bpp region: */
+ sraRgnOr(region8bpp, tmp_reg);
+ sraRgnDestroy(tmp_reg);
+ }
+
+ /* copy from main_fb to cmap8to24_fb regardless of 8bpp windows: */
+ src = main_fb + main_bytes_per_line * y1 + pixelsize * x1;
+ dst = cmap8to24_fb + main_bytes_per_line * y1 + pixelsize * x1;
+ h = y2 - y1;
+ w = x2 - x1;
+
+ for (line = 0; line < h; line++) {
+ memcpy(dst, src, w * pixelsize);
+ src += main_bytes_per_line;
+ dst += main_bytes_per_line;
+ }
+
+if (db24) fprintf(stderr, "bpp8to24 w=%d h=%d m=%p c=%p r=%p \n", w, h, main_fb, cmap8to24_fb, rfb_fb);
+
+ /*
+ * now go back and tranform and 8bpp regions to TrueColor in
+ * cmap8to24_fb. we have to guess the best colormap to use if
+ * there is more than one...
+ */
+#define NCOLOR 256
+ if (! sraRgnEmpty(region8bpp) && ncmaps) {
+ sraRectangleIterator *iter;
+ sraRect rect;
+ int i, j, ncells;
+ int cmap_failed[CMAPMAX];
+ static XColor color[CMAPMAX][NCOLOR];
+ static unsigned int rgb[CMAPMAX][NCOLOR];
+ XErrorHandler old_handler;
+
+#if 0
+ /* not working properly for depth 24... */
+ X_LOCK;
+ ncells = CellsOfScreen(ScreenOfDisplay(dpy, scr));
+ X_UNLOCK;
+#else
+ ncells = NCOLOR;
+#endif
+ /* ncells should "always" be 256. */
+ if (ncells > NCOLOR) {
+ ncells = NCOLOR;
+ } else if (ncells == 8) {
+ /* hmmm. see set_colormap() */
+ ncells = NCOLOR;
+ }
+
+ /*
+ * first, grab all of the associated colormaps from the
+ * X server. Hopefully just 1 or 2...
+ */
+ for (j=0; j<ncmaps; j++) {
+
+if (db24) fprintf(stderr, "cmap %d\n", (int) cmaps[j]);
+
+ /* initialize XColor array: */
+ for (i=0; i < ncells; i++) {
+ color[j][i].pixel = i;
+ color[j][i].pad = 0;
+ }
+
+ /* try to query the colormap, trap errors */
+ X_LOCK;
+ trapped_xerror = 0;
+ old_handler = XSetErrorHandler(trap_xerror);
+ XQueryColors(dpy, cmaps[j], color[j], ncells);
+ XSetErrorHandler(old_handler);
+ X_UNLOCK;
+ if (trapped_xerror) {
+ /*
+ * results below will be indefinite...
+ * need to exclude this one.
+ */
+ trapped_xerror = 0;
+ cmap_failed[j] = 1;
+ continue;
+ }
+ trapped_xerror = 0;
+ cmap_failed[j] = 0;
+
+ /* now map each index to depth 24 RGB */
+ for (i=0; i < ncells; i++) {
+ unsigned int red, green, blue;
+ /* strip out highest 8 bits of values: */
+ red = (color[j][i].red & 0xff00) >> 8;
+ green = (color[j][i].green & 0xff00) >> 8;
+ blue = (color[j][i].blue & 0xff00) >> 8;
+
+ /*
+ * the maxes should be at 255 already,
+ * but just in case...
+ */
+ red = (main_red_max * red )/255;
+ green = (main_green_max * green)/255;
+ blue = (main_blue_max * blue )/255;
+
+ /* shift them over and or together for value */
+ red = red << main_red_shift;
+ green = green << main_green_shift;
+ blue = blue << main_blue_shift;
+
+ rgb[j][i] = red | green | blue;
+ }
+ }
+
+ /* loop over the rectangles making up region8bpp */
+ iter = sraRgnGetIterator(region8bpp);
+ while (sraRgnIteratorNext(iter, &rect)) {
+ double score, max_score = -1.0;
+ int n, m, best;
+
+ if (rect.x1 > rect.x2) {
+ int tmp = rect.x2;
+ rect.x2 = rect.x1;
+ rect.x1 = tmp;
+ }
+ if (rect.y1 > rect.y2) {
+ int tmp = rect.y2;
+ rect.y2 = rect.y1;
+ rect.y1 = tmp;
+ }
+
+if (db24 || 0) fprintf(stderr, "ncmaps: %d\n", ncmaps);
+
+ /*
+ * try to pick the "best" colormap to use for
+ * this rectangle (often wrong... let them
+ * iconify or move the trouble windows, etc.)
+ */
+ best = -1;
+
+ for (m=0; m < MAX_8BPP_WINDOWS; m++) {
+ int mx1, my1, mx2, my2;
+ int k, failed = 0;
+ if (windows_8bpp[m].win == None) {
+ continue;
+ }
+ if (windows_8bpp[m].map_state != IsViewable) {
+ continue;
+ }
+
+ /* see if XQueryColors failed: */
+ for (k=0; k<ncmaps; k++) {
+ if (windows_8bpp[m].cmap == cmaps[k]
+ && cmap_failed[k]) {
+ failed = 1;
+ }
+ }
+ if (failed) {
+ continue;
+ }
+
+ /* rectangle coords for this 8bpp win: */
+ mx1 = windows_8bpp[m].x;
+ my1 = windows_8bpp[m].y;
+ mx2 = windows_8bpp[m].x + windows_8bpp[m].w;
+ my2 = windows_8bpp[m].y + windows_8bpp[m].h;
+
+ /* use overlap as score: */
+ score = rect_overlap(mx1, my1, mx2, my2,
+ rect.x1, rect.y1, rect.x2, rect.y2);
+
+ if (score > max_score) {
+ max_score = score;
+ best = m;
+ }
+
+if (db24 || 0) fprintf(stderr, "cmap_score: 0x%x %.3f %.3f\n", (int) windows_8bpp[m].cmap, score, max_score);
+
+ }
+
+ if (best < 0) {
+ /* hmmm, use the first one then... */
+ best = 0;
+ } else {
+ int ok = 0;
+ /*
+ * find the cmap corresponding to best window
+ * note we reset best from the windows_8bpp
+ * index to the cmaps[].
+ */
+ for (m=0; m < ncmaps; m++) {
+ if (cmaps[m] == windows_8bpp[best].cmap) {
+ ok = 1;
+ best = m;
+ }
+ }
+ if (! ok) {
+ best = 0;
+ }
+ }
+
+
+if (db24) fprintf(stderr, "transform %d %d %d %d\n", rect.x1, rect.y1, rect.x2, rect.y2);
+
+ /* now tranform the pixels in this rectangle: */
+ n = main_bytes_per_line * rect.y1 + pixelsize * rect.x1;
+
+ src = cmap8to24_fb + n;
+ h = rect.y2 - rect.y1;
+ w = rect.x2 - rect.x1;
+
+ for (line = 0; line < h; line++) {
+ /* line by line ... */
+ for (j = 0; j < w; j++) {
+ /* pixel by pixel... */
+ unsigned int *ui;
+ unsigned int hi, idx;
+
+ /* grab 32 bit value */
+ ui = (unsigned int *) (src + pixelsize * j);
+
+ /* extract top 8 bits (FIXME: masks?) */
+ hi = (*ui) & 0xff000000;
+
+ /* map to lookup index; rewrite pixel: */
+ idx = hi >> 24;
+ *ui = hi | rgb[best][idx];
+ }
+ src += main_bytes_per_line;
+ }
+ }
+ sraRgnReleaseIterator(iter);
+ }
+
+ /* cleanup */
+ sraRgnDestroy(disp);
+ sraRgnDestroy(rect);
+ sraRgnDestroy(region8bpp);
+}
+
+void mark_8bpp(void) {
+ int i, cnt = 0;
+
+ if (! cmap8to24 || !cmap8to24_fb) {
+ return;
+ }
+
+ /* for each mapped 8bpp window, mark it changed: */
+
+ for (i=0; i < MAX_8BPP_WINDOWS; i++) {
+ int x1, y1, x2, y2, w, h, f = 32;
+ f = 0; /* skip fuzz, may bring in other windows... */
+
+ if (windows_8bpp[i].win == None) {
+ continue;
+ }
+ if (windows_8bpp[i].map_state != IsViewable) {
+ continue;
+ }
+
+ x1 = windows_8bpp[i].x;
+ y1 = windows_8bpp[i].y;
+ w = windows_8bpp[i].w;
+ h = windows_8bpp[i].h;
+
+ /* apply a fuzz f around each one... constrain to screen */
+ x2 = x1 + w;
+ y2 = y1 + h;
+ x1 = nfix(x1 - f, dpy_x);
+ y1 = nfix(y1 - f, dpy_y);
+ x2 = nfix(x2 + f, dpy_x);
+ y2 = nfix(y2 + f, dpy_y);
+
+if (db24 || 0) fprintf(stderr, "mark_8bpp: 0x%lx %d %d %d %d\n", windows_8bpp[i].win, x1, y1, x2, y2);
+
+ mark_rect_as_modified(x1, y1, x2, y2, 0);
+ cnt++;
+ }
+ if (cnt) {
+ /* push it to viewers if possible. */
+ rfbPE(-1);
+ }
+}
+
diff --git a/x11vnc/8to24.h b/x11vnc/8to24.h
new file mode 100644
index 0000000..9861908
--- /dev/null
+++ b/x11vnc/8to24.h
@@ -0,0 +1,12 @@
+#ifndef _X11VNC_8TO24_H
+#define _X11VNC_8TO24_H
+
+/* -- 8to24.h -- */
+
+extern int multivis_count;
+
+extern void check_for_multivis(void);
+extern void bpp8to24(int, int, int, int);
+extern void mark_8bpp(void);
+
+#endif /* _X11VNC_8TO24_H */
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog
index dcab5b4..6b72675 100644
--- a/x11vnc/ChangeLog
+++ b/x11vnc/ChangeLog
@@ -1,3 +1,7 @@
+2006-01-14 Karl Runge <runge@karlrunge.com>
+ * x11vnc: add -8to24 option for some multi-depth displays (but use
+ of -overlay is preferred is supported).
+
2006-01-12 Karl Runge <runge@karlrunge.com>
* fix -DSMALL_FOOTPRINT=N builds.
diff --git a/x11vnc/Makefile.am b/x11vnc/Makefile.am
index 6c8c977..35b3ba9 100644
--- a/x11vnc/Makefile.am
+++ b/x11vnc/Makefile.am
@@ -13,7 +13,7 @@ endif
if HAVE_X
bin_PROGRAMS=x11vnc
-x11vnc_SOURCES = cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c options.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c user.c userinput.c util.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c allowed_input_t.h blackout_t.h cleanup.h connections.h cursor.h enums.h gui.h help.h inet.h keyboard.h options.h params.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h tkx11vnc.h user.h userinput.h util.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h
+x11vnc_SOURCES = 8to24.c cleanup.c connections.c cursor.c gui.c help.c inet.c keyboard.c options.c pointer.c rates.c remote.c scan.c screen.c selection.c solid.c user.c userinput.c util.c win_utils.c x11vnc.c x11vnc_defs.c xdamage.c xevents.c xinerama.c xkb_bell.c xrandr.c xrecord.c xwrappers.c 8to24.h allowed_input_t.h blackout_t.h cleanup.h connections.h cursor.h enums.h gui.h help.h inet.h keyboard.h options.h params.h pointer.h rates.h remote.h scan.h screen.h scrollevent_t.h selection.h solid.h tkx11vnc.h user.h userinput.h util.h win_utils.h winattr_t.h x11vnc.h xdamage.h xevents.h xinerama.h xkb_bell.h xrandr.h xrecord.h xwrappers.h
INCLUDES=@X_CFLAGS@
x11vnc_LDADD=@X_LIBS@ $(LD_CYGIPC) $(LDADD)
endif
diff --git a/x11vnc/README b/x11vnc/README
index 7e7bc33..93745a6 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Wed Jan 11 23:08:25 EST 2006
+x11vnc README file Date: Sat Jan 14 22:04:39 EST 2006
The following information is taken from these URLs:
@@ -1604,7 +1604,8 @@ display :0
On some hardware (Sun/SPARC, Sgi), the [201]-overlay option discussed
a couple paragraphs down may solve this for you (you may want to skip
- to it directly).
+ to it directly). On other hardware the less robust [202]-8to24 option
+ may help.
Run xdpyinfo(1) to see what the default visual is and what the depths
of the other visuals are. Does the default visual have a depth of 8?
@@ -1640,7 +1641,7 @@ TrueColor defdepth 24
The -overlay mode: Another option is if the system with overlay
visuals is a Sun system running Solaris or Sgi running IRIX you can
- use the [202]-overlay x11vnc option (Aug/2004) to have x11vnc use the
+ use the [203]-overlay x11vnc option (Aug/2004) to have x11vnc use the
Solaris XReadScreen(3X11) function to poll the "true view" of the
whole screen at depth 24 TrueColor. XReadDisplay(3X11) is used on
IRIX. This is useful for Legacy applications (older versions of
@@ -1650,28 +1651,51 @@ TrueColor defdepth 24
described in the previous paragraph is not sufficient for these apps.
Misc. notes on -overlay mode: An amusing by-product of -overlay mode
- is that mouse cursor shape is correct. The -overlay mode may be
- somewhat slower than normal mode due to the extra framebuffer
- manipulations that must be performed. Also, on Solaris there is a bug
- in that for some popup menus, the windows they overlap will have
- painting errors (flashing colors) while the popup is up (a workaround
- is to disable SaveUnders by passing -su to Xsun, e.g. in your
- /etc/dt/config/Xservers file).
+ is that the mouse cursor shape is correct! (i.e. XFIXES is not
+ needed). The -overlay mode may be somewhat slower than normal mode due
+ to the extra framebuffer manipulations that must be performed. Also,
+ on Solaris there is a bug in that for some popup menus, the windows
+ they overlap will have painting errors (flashing colors) while the
+ popup is up (a workaround is to disable SaveUnders by passing -su to
+ Xsun, e.g. in your /etc/dt/config/Xservers file).
+
+
+ The -8to24 mode: The [204]-8to24 x11vnc option (Jan/2006) is a kludge
+ to try to dynamically rewrite the pixel values so that the 8bpp part
+ is mapped onto depth 24 TrueColor and overwrites bits 1-24 of the
+ pixel. This is less robust than the -overlay mode because it is done
+ by x11vnc outside of the X server. So only use it on OS's that do not
+ support -overlay. The -8to24 mode will only work if the default visual
+ is depth 24. Then it scans for any windows within 3 levels of the root
+ window that are 8bpp (i.e. legacy application). For the ones it finds
+ it tries to use the correct indexed colormap to rewrite bits 1-24 of
+ the pixels.
+
+ This scheme is approximate and can often lead to painting errors. You
+ can manually correct most painting errors by pressing 3 Alt_L's in a
+ row, or by using something like: [205]-fixscreen V=3.0 to
+ automatically refresh the screen every 3 seconds. In general the
+ scheme uses many resources and may give rise to sluggish behavior. If
+ multiple windows are using different 8bpp indexed colormaps all but
+ one window may need to be iconified for the colors to be correct. Note
+ that there is no analogous -24to8 mode for use on multi-depth displays
+ with default visuals of 8bpp.
Colors still not working correctly? Run xwininfo on the application
with the incorrect colors to verify that the depth of its visual is
different from the default visual depth (gotten from xdpyinfo). One
- possible workaround in this case is to use the [203]-id option to
+ possible workaround in this case is to use the [206]-id option to
point x11vnc at the application window itself. If the application is
complicated (lots of toplevel windows and popup menus) this may not be
acceptable, and may even crash x11vnc (but not the application).
It is theoretically possible to solve this problem in general (see
xwd(1) for example), but it does not seem trivial or sufficiently fast
- for x11vnc to be able to do so in real time. Fortunately the
- [204]-overlay option works for Solaris machines with overlay visuals
- where most of this problem occurs.
+ for x11vnc to be able to do so in real time. The [207]-8to24 method
+ does this approximately. Fortunately the [208]-overlay option works
+ for Solaris machines with overlay visuals where most of this problem
+ occurs.
Q-17: How do I figure out the window id to supply to the -id windowid
@@ -1681,9 +1705,9 @@ TrueColor defdepth 24
the desired application window. After clicking, it will print out much
information, including the window id (e.g. 0x6000010). Also, the
visual and depth of the window printed out is often useful in
- debugging x11vnc [205]color problems.
+ debugging x11vnc [209]color problems.
- Also, as of Dec/2004 libvncserver CVS you can use "[206]-id pick" to
+ Also, as of Dec/2004 libvncserver CVS you can use "[210]-id pick" to
have x11vnc run xwininfo(1) for you and after you click the window it
extracts the windowid. Besides "pick" there is also "id:root" to allow
you to go back to root window when doing remote-control.
@@ -1701,7 +1725,7 @@ TrueColor defdepth 24
you should be able to see these transient windows.
If things are not working and you still want to do the single window
- polling, try the [207]-sid windowid option ("shifted" windowid).
+ polling, try the [211]-sid windowid option ("shifted" windowid).
Q-19: My X display is depth 24 at 24bpp (instead of the normal depth
@@ -1751,15 +1775,15 @@ TrueColor defdepth 24
since you will be polling the X display over the network as opposed to
over the local hardware. To do this, run x11vnc on a UNIX machine as
close as possible network-wise (e.g. same switch) to the Xterminal
- machine. Use the [208]-display option to point the display to that of
+ machine. Use the [212]-display option to point the display to that of
the Xterminal (you'll of course need basic X11 permission to do that)
- and also supply the [209]-noshm option (this enables the polling over
+ and also supply the [213]-noshm option (this enables the polling over
the network).
The response will likely be sluggish (maybe only one "frame" per
second). This mode is not recommended except for "quick checks" of
hard to get to X servers. Use something like "-wait 150" to cut down
- on the polling rate. You may also need [210]-flipbyteorder if the
+ on the polling rate. You may also need [214]-flipbyteorder if the
colors get messed up due to endian byte order differences.
Q-21: How do I get my X permissions (MIT-MAGIC-COOKIE file) correct
@@ -1783,7 +1807,7 @@ TrueColor defdepth 24
copied to the Xterminal. If $HOME/.Xauthority is exported via NFS
(this is insecure of course, but has been going on for decades), then
x11vnc can simply pick it up via NFS (you may need to use the
- [211]-auth option to point to the correct file). Other options include
+ [215]-auth option to point to the correct file). Other options include
copying the auth file using scp, or something like:
central-server> xauth nextract - xterm123:0 | ssh xterm123 xauth nmerge -
@@ -1795,7 +1819,7 @@ TrueColor defdepth 24
details.
If the display name in the cookie file needs to be changed between the
- two hosts, see [212]this note on the "xauth add ..." command.
+ two hosts, see [216]this note on the "xauth add ..." command.
A less secure option is to run something like "xhost +127.0.0.1" while
sitting at the Xterminal box to allow cookie-free local access for
@@ -1809,7 +1833,7 @@ TrueColor defdepth 24
occasional app more efficiently locally on the Xterminal box (e.g.
realplayer).
- Not recommended, but as a last resort, you could have x11vnc [213]poll
+ Not recommended, but as a last resort, you could have x11vnc [217]poll
the Xterminal Display over the network. For this you would run a
"x11vnc -noshm ..." process on the central-server (and hope the
network admin doesn't get angry...)
@@ -1840,17 +1864,17 @@ TrueColor defdepth 24
As of Dec/2004 in the libvncserver CVS there is a remote control
feature. It can change a huge amount of things on the fly: see the
- [214]-remote and [215]-query options. To shut down the running x11vnc
+ [218]-remote and [219]-query options. To shut down the running x11vnc
server just type "x11vnc -R stop". To disconnect all clients do
"x11vnc -R disconnect:all", etc.
- If the [216]-forever option has not been supplied, x11vnc will
+ If the [220]-forever option has not been supplied, x11vnc will
automatically exit after the first client disconnects. In general you
will have to kill the x11vnc process This can be done via: "kill
NNNNN" (where NNNNN is the x11vnc process id number found from ps(1)),
or "pkill x11vnc", or "killall x11vnc" (Linux only).
- If you have not put x11vnc in the background via the [217]-bg option
+ If you have not put x11vnc in the background via the [221]-bg option
or shell & operator, then simply press Ctrl-C in the shell where
x11vnc is running to stop it.
@@ -1860,15 +1884,15 @@ TrueColor defdepth 24
down state in the Xserver. Tapping the stuck key (either via a new
x11vnc or at the physical console) will release it from the stuck
state. If the keyboard seems to be acting strangely it is often fixed
- by tapping Ctrl, Shift, and Alt. Alternatively, the [218]-clear_mods
- option and [219]-clear_keys option can be used to release pressed keys
+ by tapping Ctrl, Shift, and Alt. Alternatively, the [222]-clear_mods
+ option and [223]-clear_keys option can be used to release pressed keys
at startup and exit.
Q-23: Can I change settings in x11vnc without having to restart it?
Can I remote control it?
- Look at the [220]-remote (same as -R) and [221]-query (same as -Q)
+ Look at the [224]-remote (same as -R) and [225]-query (same as -Q)
options added in the Dec/2004 libvncserver CVS. They allow nearly
everything to be changed dynamically and settings to be queried.
Examples: "x11vnc -R shared", "x11vnc -R forever", "x11vnc -R
@@ -1880,7 +1904,7 @@ TrueColor defdepth 24
be possible.
There is also a simple Tcl/Tk gui based on this remote control
- mechanism. See the [222]-gui option for more info. You will need to
+ mechanism. See the [226]-gui option for more info. You will need to
have Tcl/Tk (i.e. /usr/bin/wish) installed for it to work. It can also
run in the system tray: "-gui tray" or as a standalone icon window:
"-gui icon".
@@ -1895,12 +1919,12 @@ TrueColor defdepth 24
vncpasswd(1) program from those packages. The libvncserver package
also comes with a simple program: storepasswd in the examples
directory. And as of Jun/2004 in the libvncserver CVS x11vnc supports
- the -storepasswd "pass" "file" [223]option, which is the the same
+ the -storepasswd "pass" "file" [227]option, which is the the same
functionality of storepasswd. Be sure to quote the "pass" if it
contains shell meta characters, spaces, etc. Example:
x11vnc -storepasswd 'sword*fish' $HOME/myvncpasswd
- You then use the password via the x11vnc option: [224]-rfbauth
+ You then use the password via the x11vnc option: [228]-rfbauth
$HOME/myvncpasswd
Compared to vncpasswd(1) the latter two methods are a somewhat unsafe
@@ -1909,7 +1933,7 @@ TrueColor defdepth 24
out for the command winding up in your shell's history file (history
-c is often a way to clear it).
- x11vnc also has the [225]-passwdfile and -passwd/-viewpasswd plain
+ x11vnc also has the [229]-passwdfile and -passwd/-viewpasswd plain
text (i.e. not obscured like the -rfbauth VNC passwords) password
options.
@@ -1920,7 +1944,7 @@ TrueColor defdepth 24
You can use the vncpasswd program from RealVNC or TightVNC mentioned
above..
- Alternatively, this script should keep your [226]-storepasswd more
+ Alternatively, this script should keep your [230]-storepasswd more
private:
#!/bin/sh
# usage: x11vnc_pw [file] (default: ~/.vnc/passwd)
@@ -1955,13 +1979,13 @@ ls -l "$file"
and the other for view-only access to the display?
Yes, as of May/2004 in the libvncserver CVS there is the
- [227]-viewpasswd option to supply the view-only password. Note the
- full-access password option [228]-passwd must be supplied at the same
+ [231]-viewpasswd option to supply the view-only password. Note the
+ full-access password option [232]-passwd must be supplied at the same
time. E.g.: -passwd sword -viewpasswd fish.
To avoid specifying the passwords on the command line (where they
could be observed via the ps(1) command by any user) you can use the
- [229]-passwdfile option to specify a file containing plain text
+ [233]-passwdfile option to specify a file containing plain text
passwords. Presumably this file is readable only by you, and ideally
it is located on the machine x11vnc is run on (to avoid being snooped
on over the network). The first line of this file is the full-access
@@ -1969,7 +1993,7 @@ ls -l "$file"
it is taken as the view-only password. (use "__EMPTY__" to supply an
empty one).
- View-only passwords currently do not work for the [230]-rfbauth
+ View-only passwords currently do not work for the [234]-rfbauth
password option (standard VNC password storing mechanism). FWIW, note
that although the output (usually placed in $HOME/.vnc/passwd) by the
vncpasswd or storepasswd programs (or from x11vnc -storepasswd) looks
@@ -1983,7 +2007,7 @@ ls -l "$file"
some users just be able to move the mouse, but not click or type
anything?
- As of Feb/2005, the [231]-input option allows you to do this. "K",
+ As of Feb/2005, the [235]-input option allows you to do this. "K",
"M", and "B" stand for Keystroke, Mouse-motion, and Button-clicks,
respectively. The setting: "-input M" makes attached viewers only able
to move the mouse. "-input KMB,M" lets normal clients do everything
@@ -1999,15 +2023,15 @@ ls -l "$file"
These defaults are simple safety measures to avoid someone unknowingly
leaving his X11 desktop exposed (to the internet, say) for long
- periods of time. Use the [232]-forever option (aka -many) to have
+ periods of time. Use the [236]-forever option (aka -many) to have
x11vnc wait for more connections after the first client disconnects.
- Use the [233]-shared option to have x11vnc allow multiple clients to
+ Use the [237]-shared option to have x11vnc allow multiple clients to
connect simultaneously.
- Recommended additional safety measures include using ssh ([234]see
+ Recommended additional safety measures include using ssh ([238]see
above), stunnel, or a VPN to authenticate and encrypt the viewer
- connections or to at least use the -rfbauth passwd-file [235]option to
- use VNC password protection (or [236]-passwdfile) It is up to YOU to
+ connections or to at least use the -rfbauth passwd-file [239]option to
+ use VNC password protection (or [240]-passwdfile) It is up to YOU to
apply these security measures, they will not be done for you
automatically.
@@ -2015,7 +2039,7 @@ ls -l "$file"
Q-29: Can I limit which machines incoming VNC clients can connect
from?
- Yes, look at the [237]-allow and [238]-localhost options to limit
+ Yes, look at the [241]-allow and [242]-localhost options to limit
connections by hostname or IP address. E.g.
x11vnc -allow 192.168.0.1,192.168.0.2
@@ -2027,7 +2051,7 @@ ls -l "$file"
Note that -localhost is the same as "-allow 127.0.0.1"
For more control, build libvncserver with libwrap support
- [239](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5)
+ [243](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5)
for complete details.
@@ -2047,7 +2071,7 @@ ls -l "$file"
is "vnc", e.g.:
vnc: 192.168.100.3 .example.com
- Note that if you run x11vnc out of [240]inetd you do not need to build
+ Note that if you run x11vnc out of [244]inetd you do not need to build
x11vnc with libwrap support because the /usr/sbin/tcpd reference in
/etc/inetd.conf handles the tcp_wrappers stuff.
@@ -2056,16 +2080,16 @@ ls -l "$file"
internal LAN) rather than having it listen on all network interfaces
and relying on -allow to filter unwanted connections out?
- As of Mar/2005 in the libvncserver CVS, there is the "[241]-listen
+ As of Mar/2005 in the libvncserver CVS, there is the "[245]-listen
ipaddr" option that enables this. For ipaddr either supply the desired
network interface's IP address (or use a hostname that resolves to it)
or use the string "localhost". For additional filtering simultaneously
- use the "[242]-allow host1,..." option to allow only specific hosts
+ use the "[246]-allow host1,..." option to allow only specific hosts
in.
This option is useful if you want to insure that no one can even begin
a dialog with x11vnc from untrusted network interfaces (e.g. ppp0).
- The option [243]-localhost now implies "-listen localhost" since that
+ The option [247]-localhost now implies "-listen localhost" since that
is what most people expect it to do.
@@ -2073,24 +2097,24 @@ ls -l "$file"
interface, how I can occasionally allow in a non-localhost via the -R
allowonce remote control command?
- To do this specify "[244]-allow localhost". Unlike [245]-localhost
+ To do this specify "[248]-allow localhost". Unlike [249]-localhost
this will leave x11vnc listening on all interfaces (but of course only
allowing in local connections, e.g. ssh redirs). Then you can later
run "x11vnc -R allowonce:somehost" or use to gui to permit a one-shot
connection from a remote host.
Note that if you do a lot of changing of the listening interface
- ([246]-listen option) via remote control or gui, you may need to also
- manually adjust the [247]-allow list if you unexpectedly get into a
+ ([250]-listen option) via remote control or gui, you may need to also
+ manually adjust the [251]-allow list if you unexpectedly get into a
state where the allow list cannot match any hosts that would be coming
- in on the listening interface. If you just toggle [248]-localhost on
+ in on the listening interface. If you just toggle [252]-localhost on
and off x11vnc should see to it that you never get into such a state.
Q-33: How can I tunnel my connection to x11vnc via an encrypted SSH
channel between two Unix machines?
- See the description earlier on this page on [249]how to tunnel VNC via
+ See the description earlier on this page on [253]how to tunnel VNC via
SSH from Unix to Unix. A number of ways are described along with some
issues you may encounter.
@@ -2101,7 +2125,7 @@ ls -l "$file"
Q-34: How can I tunnel my connection to x11vnc via an encrypted SSH
channel from Windows using an SSH client like Putty?
- [250]Above we described how to tunnel VNC via SSH from Unix to Unix,
+ [254]Above we described how to tunnel VNC via SSH from Unix to Unix,
you may want to review it. To do this from Windows using Putty it
would go something like this:
* In the Putty dialog window under 'Session' enter the hostname or
@@ -2124,8 +2148,8 @@ ls -l "$file"
process in a BAT file including launching the VNC viewer by using the
plink Putty utility. Send us the script if you get that working.
- For extra protection feel free to run x11vnc with the [251]-localhost
- and [252]-rfbauth/[253]-passwdfile options.
+ For extra protection feel free to run x11vnc with the [255]-localhost
+ and [256]-rfbauth/[257]-passwdfile options.
If the machine you SSH into via Putty is not the same machine with the
X display you wish to view (e.g. your company provides incoming SSH
@@ -2133,11 +2157,11 @@ ls -l "$file"
dialog setting to: 'Destination: otherhost:5900', Once logged in,
you'll need to do a second login (ssh or rsh) to the workstation
machine 'otherhost' and then start up x11vnc on it. This can also be
- automated by [254]chaining ssh's.
+ automated by [258]chaining ssh's.
- As discussed [255]above another option is to first start the VNC
+ As discussed [259]above another option is to first start the VNC
viewer in "listen" mode, and then launch x11vnc with the
- "[256]-connect localhost" option to establish the reverse connection.
+ "[260]-connect localhost" option to establish the reverse connection.
In this case a Remote port redirection (not Local) is needed for port
5500 instead of 5900 (i.e. 'Source port: 5500' and
'Destination: localhost:5500' for a Remote connection).
@@ -2148,7 +2172,7 @@ ls -l "$file"
some clients view-only? How about running an arbitrary program to make
the decisions?
- Yes, look at the "[257]-accept command" option, it allows you to
+ Yes, look at the "[261]-accept command" option, it allows you to
specify an external command that is run for each new client. (use
quotes around the command if it contains spaces, etc.). If the
external command returns 0 the client is accepted, otherwise the
@@ -2167,7 +2191,7 @@ ls -l "$file"
own simple popup window. To accept the client press "y" or click mouse
on the "Yes" button. To reject the client press "n" or click mouse on
the "No" button. To accept the client View-only, press "v" or click
- mouse on the "View" button. If the [258]-viewonly option has been
+ mouse on the "View" button. If the [262]-viewonly option has been
supplied, the "View" action will not be present: the whole display is
view only in that case.
@@ -2183,7 +2207,7 @@ ls -l "$file"
program to prompt the user whether the client should be accepted or
not. This requires that you have xmessage installed and available via
PATH. In case it is not already on your system, the xmessage program
- is available at [259]ftp://ftp.x.org/
+ is available at [263]ftp://ftp.x.org/
To include view-only decisions for the external commands, prefix the
command something like this: "yes:0,no:*,view:3 mycommand ..." This
@@ -2222,7 +2246,7 @@ elif [ $rc = 4 ]; then
fi
exit 1
- Stefan Radman has written a nice dtksh script [260]dtVncPopup for use
+ Stefan Radman has written a nice dtksh script [264]dtVncPopup for use
in CDE environments to do the same sort of thing. Information on how
to use it is found at the top of the file. He encourages you to
provide feedback to him to help improve the script.
@@ -2231,7 +2255,7 @@ exit 1
popup is being run, so attached clients will not receive screen
updates, etc during this period.
- To run a command when a client disconnects, use the "[261]-gone
+ To run a command when a client disconnects, use the "[265]-gone
command" option. This is for the user's convenience only: the return
code of the command is not interpreted by x11vnc. The same environment
variables are set as in "-accept command" (except that RFB_MODE will
@@ -2246,13 +2270,13 @@ exit 1
such support.
One approximate method involves starting x11vnc with the
- [262]-localhost option. This basically requires the viewer user to log
+ [266]-localhost option. This basically requires the viewer user to log
into the workstation where x11vnc is running via their Unix username
and password, and then somehow set up a port redirection of his
vncviewer connection to make it appear to emanate from the local
machine. As discussed above, ssh is useful for this: "ssh -l username
-L 5900:localhost:5900 hostname ..." See the ssh wrapper scripts
- mentioned [263]elsewhere on this page. Of course a malicious user
+ mentioned [267]elsewhere on this page. Of course a malicious user
could allow other users to get in through his channel, but that is a
problem with every method. Another thing to watch out for is a
malicious user on the viewer side (where ssh is running) trying to
@@ -2261,7 +2285,7 @@ exit 1
Regarding limiting the set of Unix usernames who can connect, the
traditional way would be to further require a VNC password to supplied
(-rfbauth, -passwd, etc). A scheme that avoids a second password
- involves using the [264]-accept option that runs a program to examine
+ involves using the [268]-accept option that runs a program to examine
the connection information to determine which user is connecting from
the local machine. For example, the program could use the ident
service on the local machine (normally ident should not be trusted
@@ -2294,7 +2318,7 @@ exit 1 # reject it
display manager like gdm(1). Can I have x11vnc later switch to a
different user?
- As of Feb/2005 x11vnc has the [265]-users option that allows things
+ As of Feb/2005 x11vnc has the [269]-users option that allows things
like this. Please read the documentation on it (also in the x11vnc
-help output) carefully for features and caveats. It's use can often
decrease security unless care is taken.
@@ -2316,7 +2340,7 @@ exit 1 # reject it
In any event, as of Jun/2004 there is an experimental utility to make
it more difficult for nosey people to see your x11vnc activities. The
- source for it is [266]blockdpy.c The idea behind it is simple (but
+ source for it is [270]blockdpy.c The idea behind it is simple (but
obviously not bulletproof): when a VNC client attaches to x11vnc put
the display monitor in the DPMS "off" state, if the DPMS state ever
changes immediately start up the screen-lock program. The x11vnc user
@@ -2332,8 +2356,8 @@ exit 1 # reject it
bulletproof. A really robust solution would likely require X server
and perhaps even video hardware support.
- The blockdpy utility is launched by the [267]-accept option and told
- to exit via the [268]-gone option (the vnc client user should
+ The blockdpy utility is launched by the [271]-accept option and told
+ to exit via the [272]-gone option (the vnc client user should
obviously re-lock the screen before disconnecting!). Instructions can
be found in the source code for the utility at the above link.
@@ -2341,7 +2365,7 @@ exit 1 # reject it
Q-39: Can I have x11vnc automatically lock the screen when I
disconnect the VNC viewer?
- Yes, a user mentions he uses the [269]-gone option under CDE to run a
+ Yes, a user mentions he uses the [273]-gone option under CDE to run a
screen lock program:
x11vnc -display :0 -forever -gone 'dtaction LockDisplay'
@@ -2350,7 +2374,7 @@ exit 1 # reject it
x11vnc -display :0 -forever -gone 'kdesktop_lock'
x11vnc -display :0 -forever -gone 'xlock &'
- Here is a scheme using the [270]-afteraccept option (in version 0.7.3)
+ Here is a scheme using the [274]-afteraccept option (in version 0.7.3)
to unlock the screen after the first valid VNC login and to lock the
screen after the last valid VNC login disconnects:
x11vnc -display :0 -forever -shared -afteraccept ./myxlocker -gone ./myxlocke
@@ -2389,11 +2413,11 @@ fi
need to have sufficient permissions to connect to the X display.
Here are some ideas:
- * Use the description under "Continuously" in the [271]FAQ on x11vnc
+ * Use the description under "Continuously" in the [275]FAQ on x11vnc
and Display Managers
- * Use the description in the [272]FAQ on x11vnc and inetd(1)
+ * Use the description in the [276]FAQ on x11vnc and inetd(1)
* Start x11vnc from your $HOME/.xsession (or $HOME/.xinitrc)
- * Although less reliable, see the [273]x11vnc_loop rc.local hack
+ * Although less reliable, see the [277]x11vnc_loop rc.local hack
below.
The display manager scheme will not be specific to which user has the
@@ -2424,7 +2448,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
while running x11vnc as root, e.g. for the gnome display manager, gdm:
x11vnc -auth /var/gdm/:0.Xauth -display :0
- (the [274]-auth option sets the XAUTHORITY variable for you).
+ (the [278]-auth option sets the XAUTHORITY variable for you).
There will be a similar thing for xdm using however a different auth
directory path (perhaps something like
@@ -2449,7 +2473,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
auth file should be in /var/dt), you'll also need to add something
like Dtlogin*grabServer:False to the Xconfig file
(/etc/dt/config/Xconfig or /usr/dt/config/Xconfig on Solaris, see
- [275]the example at the end of this FAQ). Then restart dtlogin, e.g.:
+ [279]the example at the end of this FAQ). Then restart dtlogin, e.g.:
/etc/init.d/dtlogin stop; /etc/init.d/dtlogin start or reboot.
Continuously. Have x11vnc reattach each time the X server is
@@ -2512,7 +2536,7 @@ rever -bg
Then restart: /usr/sbin/gdm-restart (or reboot). The
KillInitClients=false setting is important: without it x11vnc will be
- killed immediately after the user logs in. Here are [276]full details
+ killed immediately after the user logs in. Here are [280]full details
on how to configure gdm
_________________________________________________________________
@@ -2554,13 +2578,13 @@ rever -bg
If you do not want to deal with any display manager startup scripts,
here is a kludgey script that can be run manually or out of a boot
- file like rc.local: [277]x11vnc_loop It will need some local
+ file like rc.local: [281]x11vnc_loop It will need some local
customization before running. Because the XAUTHORITY auth file must be
guessed by this script, use of the display manager script method
described above is greatly preferred.
If the machine is a traditional Xterminal you may want to read
- [278]this FAQ.
+ [282]this FAQ.
Q-42: Can I run x11vnc out of inetd(1)? How about xinetd(1)?
@@ -2570,7 +2594,7 @@ rever -bg
5900 stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/x11vnc_sh
- where the shell script /usr/local/bin/x11vnc_sh uses the [279]-inetd
+ where the shell script /usr/local/bin/x11vnc_sh uses the [283]-inetd
option and looks something like (you'll need to customize to your
settings).
#!/bin/sh
@@ -2583,7 +2607,7 @@ rever -bg
and that confuses it greatly, causing it to abort). If you do not use
a wrapper script as above but rather call x11vnc directly in
/etc/inetd.conf and do not redirect stderr to a file, then you must
- specify the -q (aka [280]-quiet) option: "/usr/local/bin/x11vnc -q
+ specify the -q (aka [284]-quiet) option: "/usr/local/bin/x11vnc -q
-inetd ...". When you supply both -q and -inet and no "-o logfile"
then stderr will automatically be closed (to prevent, e.g. library
stderr messages leaking out to the viewer). The recommended practice
@@ -2591,7 +2615,7 @@ rever -bg
script with "2>logfile" redirection because the errors and warnings
printed out are very useful in troubleshooting problems.
- Note also the need to set XAUTHORITY via [281]-auth to point to the
+ Note also the need to set XAUTHORITY via [285]-auth to point to the
MIT-COOKIE auth file to get permission to connect to the X display
(setting and exporting the XAUTHORITY variable accomplishes the same
thing). See the x11vnc_loop file in the previous question for more
@@ -2659,7 +2683,7 @@ service x11vncservice
web browser?
To have x11vnc serve up a Java VNC viewer applet to any web browsers
- that connect to it, run x11vnc with this [282]option:
+ that connect to it, run x11vnc with this [286]option:
-httpdir /path/to/the/java/classes/dir
(this directory will contain the files index.vnc and, for example,
@@ -2678,7 +2702,7 @@ service x11vncservice
then you can connect to that URL with any Java enabled browser. Feel
free to customize the default index.vnc file in the classes directory.
- As of May/2005 the [283]-http option will try to guess where the Java
+ As of May/2005 the [287]-http option will try to guess where the Java
classes jar file is by looking a expected locations.
Also note that if you wanted to, you could also start the Java viewer
@@ -2692,7 +2716,7 @@ service x11vncservice
As of Mar/2004 in the libvncserver CVS x11vnc supports reverse
connections. On Unix one starts the VNC viewer in listen mode:
vncviewer -listen (see your documentation for Windows, etc), and then
- starts up x11vnc with the [284]-connect option. To connect immediately
+ starts up x11vnc with the [288]-connect option. To connect immediately
at x11vnc startup time use the "-connect host:port" option (use commas
for a list of hosts to connect to). The ":port" is optional (default
is 5500). If a file is specified instead: -connect /path/to/some/file
@@ -2700,7 +2724,7 @@ service x11vncservice
hosts to connect to.
To use the vncconnect(1) program (from the core VNC package at
- www.realvnc.com) specify the [285]-vncconnect option to x11vnc (Note:
+ www.realvnc.com) specify the [289]-vncconnect option to x11vnc (Note:
as of Dec/2004 -vncconnect is now the default). vncconnect(1) must be
pointed to the same X11 DISPLAY as x11vnc (since it uses X properties
to communicate with x11vnc). If you do not have or do not want to get
@@ -2744,7 +2768,7 @@ xprop -root -f VNC_CONNECT 8s -set VNC_CONNECT "$1"
There are some annoyances WRT Xvfb though. The default keyboard
mapping seems to be very poor. One should run x11vnc with
- [286]-add_keysyms option to have keysyms added automatically. Also, to
+ [290]-add_keysyms option to have keysyms added automatically. Also, to
add the Shift_R and Control_R modifiers something like this is needed:
#!/bin/sh
xmodmap -e "keycode any = Shift_R"
@@ -2766,11 +2790,11 @@ xmodmap -e "add Control = Control_L Control_R"
The main drawback to this method (besides requiring extra
configuration and possibly root permission) is that it also does the
- Linux Virtual Console/Terminal (VC/VT) [287]switching even though it
+ Linux Virtual Console/Terminal (VC/VT) [291]switching even though it
does not need to (since it doesn't use a real framebuffer). There are
some "dual headed" (actually multi-headed/multi-user) patches to the X
server that turn off the VT usage in the X server. Update: As of
- Jul/2005 we have an LD_PRELOAD script [288]Xdummy that allows you to
+ Jul/2005 we have an LD_PRELOAD script [292]Xdummy that allows you to
use a stock (i.e. unpatched) Xorg or XFree86 server with the "dummy"
driver and not have any VT switching problems! Currently Xdummy needs
to be run as root, but with some luck that may be relaxed in the
@@ -2802,7 +2826,7 @@ startx -- /path/to/Xdummy :1
An X server can be started on the headless machine (sometimes this
requires configuring the X server to not fail if it cannot detect a
keyboard or mouse, see the next paragraph). Then you can export that X
- display via x11vnc (e.g. see [289]this FAQ) and access it from
+ display via x11vnc (e.g. see [293]this FAQ) and access it from
anywhere on the network via a VNC viewer.
Some tips on getting X servers to start on machines without keyboard
@@ -2845,7 +2869,7 @@ startx -- /path/to/Xdummy :1
19/03/2004 10:10:58 error creating tile-row shm for len=4
19/03/2004 10:10:58 reverting to single_copytile mode
- Here is a shell script [290]shm_clear to list and prompt for removal
+ Here is a shell script [294]shm_clear to list and prompt for removal
of your unattached shm segments (attached ones are skipped). I use it
while debugging x11vnc (I use "shm_clear -y" to assume "yes" for each
prompt). If x11vnc is regularly not cleaning up its shm segments,
@@ -2879,36 +2903,36 @@ ied)
in /etc/system. See the next paragraph for more workarounds.
To minimize the number of shm segments used by x11vnc try using the
- [291]-onetile option (corresponds to only 3 shm segments used, and
+ [295]-onetile option (corresponds to only 3 shm segments used, and
adding -fs 1.0 knocks it down to 2). If you are having much trouble
with shm segments, consider disabling shm completely via the
- [292]-noshm option. Performance will be somewhat degraded but when
+ [296]-noshm option. Performance will be somewhat degraded but when
done over local machine sockets it should be acceptable (see an
- [293]earlier question discussing -noshm).
+ [297]earlier question discussing -noshm).
Q-48: How can I make x11vnc use less system resources?
- The [294]-nap and "[295]-wait n" (where n is the sleep between polls
+ The [298]-nap and "[299]-wait n" (where n is the sleep between polls
in milliseconds, the default is 30 or so) option are good places to
start. Reducing the X server bits per pixel depth (e.g. to 16bpp or
even 8bpp) will further decrease memory I/O and network I/O. The
ShadowFB will make x11vnc's screen polling less severe. Using the
- [296]-onetile option will use less memory and use fewer shared memory
- slots (add [297]-fs 1.0 for one less slot).
+ [300]-onetile option will use less memory and use fewer shared memory
+ slots (add [301]-fs 1.0 for one less slot).
Q-49: How can I make x11vnc use MORE system resources?
- You can try [298]-threads and dial down the wait time (e.g. -wait 1)
- and possibly dial down [299]-defer as well. Note that if you try to
+ You can try [302]-threads and dial down the wait time (e.g. -wait 1)
+ and possibly dial down [303]-defer as well. Note that if you try to
increase the "frame rate" too much you can bog down the server end
with the extra work it needs to do compressing the framebuffer data,
etc.
That said, it is possible to "stream" video via x11vnc if the video
window is small enough. E.g. a 256x192 xawtv TV capture window (using
- the x11vnc [300]-id option) can be streamed over a LAN or wireless at
+ the x11vnc [304]-id option) can be streamed over a LAN or wireless at
a reasonable frame rate.
@@ -2924,16 +2948,16 @@ ied)
* Use a smaller desktop size (e.g. 1024x768 instead of 1280x1024)
* Make sure the desktop background is a solid color (the background
is resent every time it is re-exposed). Consider using the
- [301]-solid [color] option to try to do this automatically.
+ [305]-solid [color] option to try to do this automatically.
* Configure your window manager or desktop "theme" to not use fancy
images, shading, and gradients for the window decorations, etc.
Disable window animations, etc. Maybe your desktop has a "low
bandwidth" theme you can easily switch into and out of.
* Avoid small scrolls of large windows using the Arrow keys or
scrollbar. Try to use PageUp/PageDown instead. (not so much of a
- problem in x11vnc 0.7.2 if [302]-scrollcopyrect is active and
+ problem in x11vnc 0.7.2 if [306]-scrollcopyrect is active and
detecting scrolls for the application).
- * If the [303]-wireframe option is not available (earlier than
+ * If the [307]-wireframe option is not available (earlier than
x11vnc 0.7.2 or you have disabled it via -nowireframe) then
Disable Opaque Moves and Resizes in the window manager/desktop.
* However if -wireframe is active (on by default in x11vnc 0.7.2)
@@ -2953,7 +2977,7 @@ ied)
noticed.
VNC viewer parameters:
- * Use a [304]TightVNC enabled viewer! (Actually, RealVNC 4.x viewer
+ * Use a [308]TightVNC enabled viewer! (Actually, RealVNC 4.x viewer
with ZRLE encoding is not too bad either; some claim it is
faster).
* Make sure the tight (or zrle) encoding is being used (look at
@@ -2976,28 +3000,28 @@ ied)
file.
x11vnc parameters:
- * Try using [305]-nodragging (no screen updates when dragging mouse,
+ * Try using [309]-nodragging (no screen updates when dragging mouse,
but sometimes you miss visual feedback)
- * Make sure the [306]-wireframe option is active (it should be on by
+ * Make sure the [310]-wireframe option is active (it should be on by
default) and you have Opaque Moves/Resizes Enabled in the window
manager.
- * Make sure the [307]-scrollcopyrect option is active (it should be
+ * Make sure the [311]-scrollcopyrect option is active (it should be
on by default). This detects scrolls in many (but not all)
applications an applies the CopyRect encoding for a big speedup.
- * Set [308]-fs 1.0 (disables fullscreen updates)
- * Try increasing [309]-wait or [310]-defer (reduces the maximum
+ * Set [312]-fs 1.0 (disables fullscreen updates)
+ * Try increasing [313]-wait or [314]-defer (reduces the maximum
"frame rate", but won't help much for large screen changes)
- * Try the [311]-progressive pixelheight mode with the block
+ * Try the [315]-progressive pixelheight mode with the block
pixelheight 100 or so (delays sending vertical blocks since they
may change while viewer is receiving earlier ones)
- * If you just want to watch one (simple) window use [312]-id (cuts
+ * If you just want to watch one (simple) window use [316]-id (cuts
down extraneous polling and updates, but can be buggy or
insufficient)
- * Set [313]-nosel (disables all clipboard selection exchange)
- * Use [314]-nocursor and [315]-nocursorpos (repainting the remote
+ * Set [317]-nosel (disables all clipboard selection exchange)
+ * Use [318]-nocursor and [319]-nocursorpos (repainting the remote
cursor position and shape takes resources and round trips)
* On very slow links (e.g. <= 28.8) you may need to increase the
- [316]-readtimeout n setting if it sometimes takes more than 20sec
+ [320]-readtimeout n setting if it sometimes takes more than 20sec
to paint the full screen, etc.
@@ -3019,7 +3043,7 @@ ied)
Note that the DAMAGE extension does not speed up the actual reading of
pixels from the video card framebuffer memory, by, say, mirroring them
- in main memory. So reading the fb is still painfully [317]slow (e.g.
+ in main memory. So reading the fb is still painfully [321]slow (e.g.
5MB/sec), and so even using X DAMAGE when large changes occur on the
screen the bulk of the time is still spent retrieving them. Not ideal,
but use of the ShadowFB XFree86/Xorg option speeds up the reading
@@ -3037,27 +3061,27 @@ ied)
DAMAGE rectangles to contain real damage. The larger rectangles are
only used as hints to focus the traditional scanline polling (i.e. if
a scanline doesn't intersect a recent DAMAGE rectangle, the scan is
- skipped). You can use the "[318]-xd_area A" option to adjust the size
+ skipped). You can use the "[322]-xd_area A" option to adjust the size
of the trusted DAMAGE rectangles. The default is 20000 pixels (e.g. a
140x140 square, etc). Use "-xd_area 0" to disable the cutoff and trust
all DAMAGE rectangles.
- The option "[319]-xd_mem f" may also be of use in tuning the
- algorithm. To disable using DAMAGE entirely use "[320]-noxdamage".
+ The option "[323]-xd_mem f" may also be of use in tuning the
+ algorithm. To disable using DAMAGE entirely use "[324]-noxdamage".
Q-52: When I drag windows around with the mouse or scroll up and down
things really bog down (unless I do the drag in a single, quick
motion). Is there anything to do to improve things?
- This problem is primarily due to [321]slow hardware read rates from
+ This problem is primarily due to [325]slow hardware read rates from
video cards: as you scroll or move a large window around the screen
changes are much too rapid for x11vnc to keep up them (it can usually
only read the video card at about 5-10 MB/sec, so it can take a good
fraction of a second to read the changes induce from moving a large
window, if this to be done a number of times in succession the window
or scroll appears to "lurch" forward). See the description in the
- [322]-pointer_mode option for more info. The next bottleneck is
+ [326]-pointer_mode option for more info. The next bottleneck is
compressing all of these changes and sending them out to connected
viewers, however the VNC protocol is pretty much self-adapting with
respect to that (updates are only packaged and sent when viewers ask
@@ -3067,26 +3091,26 @@ ied)
tree. The default should now be much better than before and dragging
small windows around should no longer be a huge pain. If for some
reason these changes make matters worse, you can go back to the old
- way via the "[323]-pointer_mode 1" option.
+ way via the "[327]-pointer_mode 1" option.
- Also added was the [324]-nodragging option that disables all screen
+ Also added was the [328]-nodragging option that disables all screen
updates while dragging with the mouse (i.e. mouse motion with a button
held down). This gives the snappiest response, but might be undesired
in some circumstances when you want to see the visual feedback while
dragging (e.g. menu traversal or text selection).
- As of Dec/2004 in the libvncserver CVS the [325]-pointer_mode n option
+ As of Dec/2004 in the libvncserver CVS the [329]-pointer_mode n option
was introduced. n=1 is the original mode, n=2 an improvement, etc..
See the -pointer_mode n help for more info.
- Also, in some circumstances the [326]-threads option can improve
+ Also, in some circumstances the [330]-threads option can improve
response considerably. Be forewarned that if more than one vncviewer
is connected at the same time then libvncserver may not be thread safe
(try to get the viewers to use different VNC encodings, e.g. tight and
ZRLE).
As of Apr/2005 in the libvncserver CVS two new options (see the
- [327]wireframe FAQ and [328]scrollcopyrect FAQ below) provide schemes
+ [331]wireframe FAQ and [332]scrollcopyrect FAQ below) provide schemes
to sweep this problem under the rug for window moves or resizes and
for some (but not all) window scrolls.
@@ -3102,8 +3126,8 @@ ied)
shown. When the window move/resize stops, it returns to normal
processing: you should only see the window appear in the new position.
This spares you from interacting with a "lurching" window between all
- of the intermediate steps. BTW the lurching is due to [329]slow video
- card read rates (see [330]here too). A displacement, even a small one,
+ of the intermediate steps. BTW the lurching is due to [333]slow video
+ card read rates (see [334]here too). A displacement, even a small one,
of a large window requires a non-negligible amount of time, a good
fraction of a second, to read in from the hardware framebuffer.
@@ -3111,7 +3135,7 @@ ied)
for -wireframe to do any good.
The mode is currently on by default because most people are inflicted
- with the problem. It can be disabled with the [331]-nowireframe option
+ with the problem. It can be disabled with the [335]-nowireframe option
(aka -nowf). Why might one want to turn off the wireframing? Since
x11vnc is merely guessing when windows are being moved/resized, it may
guess poorly for your window-manager or desktop, or even for the way
@@ -3156,13 +3180,13 @@ ied)
* Maximum time to show a wireframe animation.
* Minimum time between sending wireframe outlines.
- See the [332]"-wireframe tweaks" option for more details. On a slow
+ See the [336]"-wireframe tweaks" option for more details. On a slow
link, e.g. dialup modem, the parameters may be automatically adjusted
for better response.
CopyRect encoding: In addition to the above there is the
- [333]"-wirecopyrect mode" option. It is also on by default. This
+ [337]"-wirecopyrect mode" option. It is also on by default. This
instructs x11vnc to not only show the wireframe animation, but to also
instruct all connected VNC viewers to locally translate the window
image data from the original position to the new position on the
@@ -3210,7 +3234,7 @@ ied)
requiring the image data to be transmitted over the network. For fast
links the speedup is primarily due to x11vnc not having to read the
scrolled framebuffer data from the X server (recall that reading from
- the hardware framebuffer is [334]slow).
+ the hardware framebuffer is [338]slow).
To do this x11vnc uses the RECORD X extension to snoop the X11
protocol between the X client with the focus window and the X server.
@@ -3232,10 +3256,10 @@ ied)
the X server display: if one falls too far behind it could become a
mess...
- The initial implementation of [335]-scrollcopyrect option is useful in
+ The initial implementation of [339]-scrollcopyrect option is useful in
that it detects many scrolls and thus gives a much nicer working
- environment (especially when combined with the [336]-wireframe
- [337]-wirecopyrect [338]options, which are also on by default; and if
+ environment (especially when combined with the [340]-wireframe
+ [341]-wirecopyrect [342]options, which are also on by default; and if
you are willing to enable the ShadowFB things are very fast). The fact
that there aren't long delays or lurches during scrolling is the
primary improvement.
@@ -3268,10 +3292,10 @@ ied)
One can tap the Alt_L key (Left "Alt" key) 3 times in a row to
signal x11vnc to refresh the screen to all viewers. Your
VNC-viewer may have its own screen refresh hot-key or button. See
- also: [339]-fixscreen
+ also: [343]-fixscreen
* Some applications, notably OpenOffice, do XCopyArea scrolls in
weird ways that assume ancestor window clipping is taking place.
- See the [340]-scr_skip option for ways to tweak this on a
+ See the [344]-scr_skip option for ways to tweak this on a
per-application basis.
* Selecting text while dragging the mouse may be slower, especially
if the Button-down event happens near the window's edge. This is
@@ -3288,7 +3312,7 @@ ied)
because it fails to detect scrolls in it. Sometimes clicking
inside the application window or selecting some text in it to
force the focus helps.
- * When using the [341]-scale option there will be a quick CopyRect
+ * When using the [345]-scale option there will be a quick CopyRect
scroll, but it needs to be followed by a slower "cleanup" update.
This is because for a fixed finite screen resolution (e.g. 75 dpi)
scaling and copyrect-ing are not exactly independent. Scaling
@@ -3301,7 +3325,7 @@ ied)
If you find the -scrollcopyrect behavior too approximate or
distracting you can go back to the standard polling-only update method
- with the [342]-noscrollcopyrect (or -noscr for short). If you find
+ with the [346]-noscrollcopyrect (or -noscr for short). If you find
some extremely bad and repeatable behavior for -scrollcopyrect please
report a bug.
@@ -3340,16 +3364,16 @@ ied)
this is because the cursor shape is often downloaded to the graphics
hardware (video card), but I could be mistaken.
- A simple kludge is provided by the "[343]-cursor X" option that
+ A simple kludge is provided by the "[347]-cursor X" option that
changes the cursor when the mouse is on the root background (or any
window has the same cursor as the root background). Note that desktops
like GNOME or KDE often cover up the root background, so this won't
- work for those cases. Also see the "[344]-cursor some" option for
+ work for those cases. Also see the "[348]-cursor some" option for
additional kludges.
Note that as of Aug/2004 in the libvncserver CVS, on Solaris using the
SUN_OVL overlay extension and IRIX, x11vnc can show the correct mouse
- cursor when the [345]-overlay option is supplied. See [346]this FAQ
+ cursor when the [349]-overlay option is supplied. See [350]this FAQ
for more info.
Also as of Dec/2004 in the libvncserver CVS XFIXES X extension support
@@ -3357,7 +3381,7 @@ ied)
XFIXES fixes the problem of the cursor-shape being write-only: x11vnc
can now query the X server for the current shape and send it back to
the connected viewers. XFIXES is available on recent Linux Xorg based
- distros and [347]Solaris 10.
+ distros and [351]Solaris 10.
The only XFIXES issue is the handling of alpha channel transparency in
cursors. If a cursor has any translucency then in general it must be
@@ -3365,7 +3389,7 @@ ied)
situations where the cursor transparency can also handled exactly:
when the VNC Viewer requires the cursor shape be drawn into the VNC
framebuffer or if you apply a patch to your VNC Viewer to extract
- hidden alpha channel data under 32bpp. [348]Details can be found here.
+ hidden alpha channel data under 32bpp. [352]Details can be found here.
Q-56: When using XFIXES cursorshape mode, some of the cursors look
@@ -3398,17 +3422,17 @@ ied)
for most cursor themes and you don't have to worry about it.
In case it still looks bad for your cursor theme, there are (of
- course!) some tunable parameters. The "[349]-alphacut n" option lets
+ course!) some tunable parameters. The "[353]-alphacut n" option lets
you set the threshold "n" (between 0 and 255): cursor pixels with
alpha values below n will be considered completely transparent while
values equal to or above n will be completely opaque. The default is
- 240. The "[350]-alphafrac f" option tries to correct individual
+ 240. The "[354]-alphafrac f" option tries to correct individual
cursors that did not fare well with the default -alphacut value: if a
cursor has less than fraction f (between 0.0 and 1.0) of its pixels
selected by the default -alphacut, the threshold is lowered until f of
its pixels are selected. The default fraction is 0.33.
- Finally, there is an option [351]-alpharemove that is useful for
+ Finally, there is an option [355]-alpharemove that is useful for
themes where many cursors are light colored (e.g. "whiteglass").
XFIXES returns the cursor data with the RGB values pre-multiplied by
the alpha value. If the white cursors look too grey, specify
@@ -3434,11 +3458,11 @@ ied)
send the alpha channel data to libvncserver. However, this data will
only be used for VNC clients that do not support the
CursorShapeUpdates VNC extension (or have disabled it). It can be
- disabled for all clients with the [352]-nocursorshape x11vnc option.
+ disabled for all clients with the [356]-nocursorshape x11vnc option.
In this case the cursor is drawn, correctly blended with the
background, into the VNC framebuffer before being sent out to the
client. So the alpha blending is done on the x11vnc side. Use the
- [353]-noalphablend option to disable this behavior (always approximate
+ [357]-noalphablend option to disable this behavior (always approximate
transparent cursors with opaque RGB values).
The CursorShapeUpdates VNC extension complicates matters because the
@@ -3466,9 +3490,9 @@ ied)
Q-58: Why does the mouse arrow just stay in one corner in my
vncviewer, whereas my cursor (that does move) is just a dot?
- This default takes advantage of a [354]tightvnc extension
+ This default takes advantage of a [358]tightvnc extension
(CursorShapeUpdates) that allows specifying a cursor image shape for
- the local VNC viewer. You may disable it with the [355]-nocursor
+ the local VNC viewer. You may disable it with the [359]-nocursor
option to x11vnc if your viewer does not have this extension.
Note: as of Aug/2004 in the libvncserver CVS this should be fixed: the
@@ -3482,18 +3506,18 @@ ied)
clients (i.e. passive viewers can see the mouse cursor being moved
around by another viewer)?
- Use the [356]-cursorpos option when starting x11vnc. A VNC viewer must
+ Use the [360]-cursorpos option when starting x11vnc. A VNC viewer must
support the Cursor Positions Updates for the user to see the mouse
motions (the TightVNC viewers support this). As of Aug/2004 in the
- libvncserver CVS -cursorpos is the default. See also [357]-nocursorpos
- and [358]-nocursorshape.
+ libvncserver CVS -cursorpos is the default. See also [361]-nocursorpos
+ and [362]-nocursorshape.
Q-60: Is it possible to swap the mouse buttons (e.g. left-handed
operation), or arbitrarily remap them? How about mapping button clicks
to keystrokes, e.g. to partially emulate Mouse wheel scrolling?
- You can remap the mouse buttons via something like: [359]-buttonmap
+ You can remap the mouse buttons via something like: [363]-buttonmap
13-31 (or perhaps 12-21). Also, note that xmodmap(1) lets you directly
adjust the X server's button mappings, but in some circumstances it
might be more desirable to have x11vnc do it.
@@ -3501,7 +3525,7 @@ ied)
One user had an X server with only one mouse button(!) and was able to
map all of the VNC client mouse buttons to it via: -buttonmap 123-111.
- Note that the [360]-debug_pointer option prints out much info for
+ Note that the [364]-debug_pointer option prints out much info for
every mouse/pointer event and is handy in solving problems.
To map mouse button clicks to keystrokes you can use the alternate
@@ -3523,7 +3547,7 @@ ied)
Exactly what keystroke "scrolling" events they should be bound to
depends on one's taste. If this method is too approximate, one could
- consider not using [361]-buttonmap but rather configuring the X server
+ consider not using [365]-buttonmap but rather configuring the X server
to think it has a mouse with 5 buttons even though the physical mouse
does not. (e.g. 'Option "ZAxisMapping" "4 5"').
@@ -3553,7 +3577,7 @@ ied)
Q-61: How can I get my AltGr and Shift modifiers to work between
keyboards for different languages?
- The option [362]-modtweak should help here. It is a mode that monitors
+ The option [366]-modtweak should help here. It is a mode that monitors
the state of the Shift and AltGr Modifiers and tries to deduce the
correct keycode to send, possibly by sending fake modifier key presses
and releases in addition to the actual keystroke.
@@ -3562,17 +3586,17 @@ ied)
default (use -nomodtweak to get the old behavior). This was done
because it was noticed on newer XFree86 setups even on bland "us"
keyboards like "pc104 us" XFree86 included a "ghost" key with both "<"
- and ">" it. This key does not exist on the keyboard (see [363]this FAQ
+ and ">" it. This key does not exist on the keyboard (see [367]this FAQ
for more info). Without -modtweak there was then an ambiguity in the
reverse map keysym => keycode, making it so the "<" symbol could not
be typed.
- Also see the [364]FAQ about the -xkb option for a more powerful method
+ Also see the [368]FAQ about the -xkb option for a more powerful method
of modifier tweaking for use on X servers with the XKEYBOARD
extension.
When trying to resolve keyboard mapping problems, note that the
- [365]-debug_keyboard option prints out much info for every keystroke
+ [369]-debug_keyboard option prints out much info for every keystroke
and so can be useful debugging things.
@@ -3584,9 +3608,9 @@ ied)
(e.g. pc105 in the XF86Config file when it should be something else,
say pc104).
- Short Cut: Try the [366]-xkb or [367]-sloppy_keys options and see if
+ Short Cut: Try the [370]-xkb or [371]-sloppy_keys options and see if
that helps the situation. The discussion below is a bit outdated (e.g.
- [368]-modtweak is now the default) but is useful reference for various
+ [372]-modtweak is now the default) but is useful reference for various
tricks and so is kept.
@@ -3629,17 +3653,17 @@ ied)
-remap less-comma
These are convenient in that they do not modify the actual X server
- settings. The former ([369]-modtweak) is a mode that monitors the
+ settings. The former ([373]-modtweak) is a mode that monitors the
state of the Shift and AltGr modifiers and tries to deduce the correct
keycode sequence to send. Since Jul/2004 -modtweak is now the default.
- The latter ([370]-remap less-comma) is an immediate remapping of the
+ The latter ([374]-remap less-comma) is an immediate remapping of the
keysym less to the keysym comma when it comes in from a client (so
when Shift is down the comma press will yield "<").
- See also the [371]FAQ about the -xkb option as a possible workaround
+ See also the [375]FAQ about the -xkb option as a possible workaround
using the XKEYBOARD extension.
- Note that the [372]-debug_keyboard option prints out much info for
+ Note that the [376]-debug_keyboard option prints out much info for
every keystroke to aid debugging keyboard problems.
@@ -3647,13 +3671,13 @@ ied)
(i.e. an extra comma).
This is likely because you press "Shift" then "<" but then released
- the Shift key before releasing the "<". Because of a [373]keymapping
+ the Shift key before releasing the "<". Because of a [377]keymapping
ambiguity the last event "< up" is interpreted as "," because that key
unshifted is the comma.
- This should not happen in [374]-xkb mode, because it works hard to
+ This should not happen in [378]-xkb mode, because it works hard to
resolve the ambiguities. If you do not want to use -xkb, try the
- option [375]-sloppy_keys to attempt a similar type of algorithm.
+ option [379]-sloppy_keys to attempt a similar type of algorithm.
Q-64: I'm using an "international" keyboard (e.g. German "de", or
@@ -3677,7 +3701,7 @@ ied)
In both cases no AltGr is sent to the VNC server, but we know AltGr is
needed on the physical international keyboard to type a "@".
- This all worked fine with x11vnc running with the [376]-modtweak
+ This all worked fine with x11vnc running with the [380]-modtweak
option (it figures out how to adjust the Modifier keys (Shift or
AltGr) to get the "@"). However it fails under recent versions of
XFree86 (and the X.org fork). These run the XKEYBOARD extension by
@@ -3695,7 +3719,7 @@ ied)
* there is a new option -xkb to use the XKEYBOARD extension API to
do the Modifier key tweaking.
- The [377]-xkb option seems to fix all of the missing keys: "@", "<",
+ The [381]-xkb option seems to fix all of the missing keys: "@", "<",
">", etc.: it is recommended that you try it if you have this sort of
problem. Let us know if there are any remaining problems (see the next
paragraph for some known problems). If you specify the -debug_keyboard
@@ -3703,7 +3727,7 @@ ied)
debugging output (send it along with any problems you report).
Update: as of Jun/2005 x11vnc will try to automatically enable
- [378]-xkb if it appears that would be beneficial (e.g. if it sees any
+ [382]-xkb if it appears that would be beneficial (e.g. if it sees any
of "@", "<", ">", "[" and similar keys are mapped in a way that needs
the -xkb to access them). To disable this automatic check use -noxkb.
@@ -3718,7 +3742,7 @@ ied)
was attached to keycode 93 (no physical key generates this
keycode) while ISO_Level3_Shift was attached to keycode 113. The
keycode skipping option was used to disable the ghost key:
- [379]-skip_keycodes 93
+ [383]-skip_keycodes 93
* In implementing -xkb we noticed that some characters were still
not getting through, e.g. "~" and "^". This is not really an
XKEYBOARD problem. What was happening was the VNC viewer was
@@ -3735,16 +3759,16 @@ ied)
What to do? In general the VNC protocol has not really solved this
problem: what should be done if the VNC viewer sends a keysym not
recognized by the VNC server side? Workarounds can possibly be
- created using the [380]-remap x11vnc option:
+ created using the [384]-remap x11vnc option:
-remap asciitilde-dead_tilde,asciicircum-dead_circumflex
etc. Use -remap filename if the list is long. Please send us your
workarounds for this problem on your keyboard. Perhaps we can have
x11vnc adjust automatically at some point. Also see the
- [381]-add_keysyms option in the next paragraph.
- Update: for convenience "[382]-remap DEAD" does many of these
+ [385]-add_keysyms option in the next paragraph.
+ Update: for convenience "[386]-remap DEAD" does many of these
mappings at once.
- * To complement the above workaround using the [383]-remap, an
- option [384]-add_keysyms was added. This option instructs x11vnc
+ * To complement the above workaround using the [387]-remap, an
+ option [388]-add_keysyms was added. This option instructs x11vnc
to bind any unknown Keysyms coming in from VNC viewers to unused
Keycodes in the X server. This modifies the global state of the X
server. When x11vnc exits it removes the extra keymappings it
@@ -3763,7 +3787,7 @@ ied)
Short answer: disable key autorepeating by running the command "xset r
off" on the Xserver where x11vnc is run (restore via "xset r on") or
- use the new (Jul/2004) [385]-norepeat x11vnc option. You will still
+ use the new (Jul/2004) [389]-norepeat x11vnc option. You will still
have autorepeating because that is taken care of on your VNC viewer
side.
@@ -3787,7 +3811,7 @@ ied)
off", does the problem go away?
The workaround is to manually apply "xset r off" and "xset r on" as
- needed, or to use the [386]-norepeat (which has since Dec/2004 been
+ needed, or to use the [390]-norepeat (which has since Dec/2004 been
made the default). Note that with X server autorepeat turned off the
VNC viewer side of the connection will (nearly always) do its own
autorepeating so there is no big loss here, unless someone is also
@@ -3798,7 +3822,7 @@ ied)
keystrokes!!
Are you using x11vnc to log in to an X session? (as described in
- [387]this FAQ) If so, x11vnc is starting before your session and it
+ [391]this FAQ) If so, x11vnc is starting before your session and it
disables autorepeat when you connect, but then after you log in your
session startup (GNOME, KDE, ...) could be resetting the autorepeat to
be on. Or it could be something inside your desktop trying to be
@@ -3822,7 +3846,7 @@ ied)
machine where I run the VNC viewer does not. Is there a way I can map
a local unused key to send an AltGr? How about a Compose key as well?
- Something like "[388]-remap Super_R-Mode_switch" x11vnc option may
+ Something like "[392]-remap Super_R-Mode_switch" x11vnc option may
work. Note that Super_R is the "Right Windoze(tm) Flaggie" key; you
may want to choose another. The -debug_keyboard option comes in handy
in finding keysym names (so does xev(1)).
@@ -3845,7 +3869,7 @@ ied)
Since xmodmap(1) modifies the X server mappings you may not want to do
this (because it affects local work on that machine). Something like
- the [389]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones
+ the [393]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones
needs, and does not modify the X server environment. Note that you
cannot send Alt_L in this case, maybe -remap Super_L-Meta_L would be a
better choice if the Super_L key is typically unused in Unix.
@@ -3856,7 +3880,7 @@ ied)
This can be done directly in some X servers using AccessX and
Pointer_EnableKeys, but is a bit awkward. It may be more convenient to
- have x11vnc do the remapping. This can be done via the [390]-remap
+ have x11vnc do the remapping. This can be done via the [394]-remap
option using the fake "keysyms" Button1, Button2, etc. as the "to"
keys (i.e. the ones after the "-")
@@ -3865,7 +3889,7 @@ ied)
button "paste" because (using XFree86/Xorg Emulate3Buttons) you have
to click both buttons on the touch pad at the same time. This
remapping:
- [391]-remap Super_R-Button2
+ [395]-remap Super_R-Button2
maps the Super_R "flag" key press to the Button2 click, thereby making
X pasting a bit easier.
@@ -3895,7 +3919,7 @@ ied)
There may also be scaling viewers out there (e.g. TightVNC or UltraVNC
on Windows) that automatically shrink or expand the remote framebuffer
to fit the local display. Especially for hand-held devices. See also
- [392]this FAQ on x11vnc scaling.
+ [396]this FAQ on x11vnc scaling.
Q-71: Does x11vnc support server-side framebuffer scaling? (E.g. to
@@ -3903,7 +3927,7 @@ ied)
As of Jun/2004 in the libvncserver CVS x11vnc provides basic
server-side scaling. It is a global scaling of the desktop, not a
- per-client setting. To enable it use the "[393]-scale fraction"
+ per-client setting. To enable it use the "[397]-scale fraction"
option. "fraction" can either be a floating point number (e.g. -scale
0.5) or the alternative m/n fraction notation (e.g. -scale 2/3). Note
that if fraction is greater than one the display is magnified.
@@ -3924,7 +3948,7 @@ ied)
One can also use the ":nb" with an integer scale factor (say "-scale
2:nb") to use x11vnc as a screen magnifier for vision impaired
- [394]applications. Since with integer scale factors the framebuffers
+ [398]applications. Since with integer scale factors the framebuffers
become huge and scaling operations time consuming, be sure to use
":nb" for the fastest response.
@@ -3950,12 +3974,12 @@ ied)
If one desires per-client scaling for something like 1:1 from a
workstation and 1:2 from a smaller device (e.g. handheld), currently
the only option is to run two (or more) x11vnc processes with
- different scalings listening on separate ports ([395]-rfbport option,
+ different scalings listening on separate ports ([399]-rfbport option,
etc.).
BTW, whenever you run two or more x11vnc's on the same X display and
- use the [396]GUI, then to avoid all of the x11vnc's simultaneously
- answering the gui you will need to use something like [397]"-connect
+ use the [400]GUI, then to avoid all of the x11vnc's simultaneously
+ answering the gui you will need to use something like [401]"-connect
file1 -gui ..." with different connect files for each x11vnc you want
to control via the gui (or remote-control). The "-connect file1" usage
gives separate communication channels between a x11vnc proces and the
@@ -3964,7 +3988,7 @@ ied)
Update: As of Mar/2005 in the libvncserver CVS x11vnc now scales the
mouse cursor with the same scale factor as the screen. If you don't
- want that, use the [398]"-scale_cursor frac" option to set the cursor
+ want that, use the [402]"-scale_cursor frac" option to set the cursor
scaling to a different factor (e.g. use "-scale_cursor 1" to keep the
cursor at its natural unscaled size).
@@ -3986,16 +4010,16 @@ ied)
screen is not rectangular (e.g. 1280x1024 and 1024x768 monitors joined
together), then there will be "non-existent" areas on the screen. The
X server will return "garbage" image data for these areas and so they
- may be distracting to the viewer. The [399]-blackout x11vnc option
+ may be distracting to the viewer. The [403]-blackout x11vnc option
allows you to blacken-out rectangles by manually specifying their
WxH+X+Y geometries. If your system has the libXinerama library, the
- [400]-xinerama x11vnc option can be used to have it automatically
+ [404]-xinerama x11vnc option can be used to have it automatically
determine the rectangles to be blackened out. (Note on 8bpp
PseudoColor displays the fill color may not be black).
Some users have reported that the mouse does not behave properly for
their Xinerama display: i.e. the mouse cannot be moved to all regions
- of the large display. If this happens try using the [401]-xwarppointer
+ of the large display. If this happens try using the [405]-xwarppointer
option. This instructs x11vnc to fake mouse pointer motions using the
XWarpPointer function instead of the XTestFakeMotionEvent XTEST
function. (This may be due to a bug in the X server for XTEST when
@@ -4020,23 +4044,23 @@ ied)
Note: if you are running on Solaris 8 or earlier you can easily hit up
against the maximum of 6 shm segments per process (for Xsun in this
case) from running multiple x11vnc processes. You should modify
- /etc/system as mentioned in another [402]FAQ to increase the limit. It
- is probably also a good idea to run with the [403]-onetile option in
+ /etc/system as mentioned in another [406]FAQ to increase the limit. It
+ is probably also a good idea to run with the [407]-onetile option in
this case (to limit each x11vnc to 3 shm segments), or even
- [404]-noshm to use no shm segments.
+ [408]-noshm to use no shm segments.
Q-74: Can x11vnc show only a portion of the display? (E.g. for a
special purpose rfb application).
- As of Mar/2005 in the libvncserver CVS x11vnc has the "[405]-clip
+ As of Mar/2005 in the libvncserver CVS x11vnc has the "[409]-clip
WxH+X+Y" option to select a rectangle of width W, height H and offset
(X, Y). Thus the VNC screen will be the clipped sub-region of the
display and be only WxH in size. One user used -clip to split up a
- large [406]Xinerama screen into two more managable smaller screens.
+ large [410]Xinerama screen into two more managable smaller screens.
This also works to view a sub-region of a single application window if
- the [407]-id or [408]-sid options are used. The offset is measured
+ the [411]-id or [412]-sid options are used. The offset is measured
from the upper left corner of the selected window.
@@ -4045,7 +4069,7 @@ ied)
crash.
As of Dec/2004 in the libvncserver CVS x11vnc supports XRANDR. You
- enable it with the [409]-xrandr option to make x11vnc monitor XRANDR
+ enable it with the [413]-xrandr option to make x11vnc monitor XRANDR
events and also trap X server errors if the screen change occurred in
the middle of an X call like XGetImage. Once it traps the screen
change it will create a new framebuffer using the new screen.
@@ -4055,7 +4079,7 @@ ied)
then the viewer will automatically resize. Otherwise, the new
framebuffer is fit as best as possible into the original viewer size
(portions of the screen may be clipped, unused, etc). For these
- viewers you can try the [410]-padgeom option to make the region big
+ viewers you can try the [414]-padgeom option to make the region big
enough to hold all resizes and rotations.
If you specify "-xrandr newfbsize" then vnc viewers that do not
@@ -4109,9 +4133,9 @@ ied)
* Fullscreen mode
The way VMWare does Fullscreen mode on Linux is to display the Guest
- desktop in a separate Virtual Console (e.g. VC 8) (see [411]this FAQ
+ desktop in a separate Virtual Console (e.g. VC 8) (see [415]this FAQ
on VC's for background). Unfortunately, this Fullscreen VC is not an X
- server. So x11vnc cannot access it (however, [412]see this for a
+ server. So x11vnc cannot access it (however, [416]see this for a
possible partial workaround). x11vnc works fine with "Normal X
application window" and "Quick-Switch mode" because these use X.
@@ -4128,13 +4152,13 @@ ied)
response. One can also cut the display depth (e.g. to 16bpp) in this
2nd X session to improve video performance. This 2nd X session
emulates Fullscreen mode to some degree and can be viewed via x11vnc
- as long as the VMWare X session [413]is in the active VC.
+ as long as the VMWare X session [417]is in the active VC.
Also note that with a little bit of playing with "xwininfo -all
-children" output one can extract the (non-toplevel) windowid of the
of the Guest desktop only when VMWare is running as a normal X
application. Then one can export just the guest desktop (i.e. without
- the VMWare menu buttons) by use of the [414]-id windowid option. The
+ the VMWare menu buttons) by use of the [418]-id windowid option. The
caveats are the X session VMWare is in must be in the active VC and
the window must be fully visible, so this mode is not terribly
convenient, but could be useful in some circumstances (e.g. running
@@ -4215,7 +4239,7 @@ ied)
screen to either shm or a mapped file. The format of these is XWD and
so the initial header should be skipped. BTW, since XWD is not
strictly RGB the view will only be approximate. Of course for the case
- of Xvfb x11vnc can poll it much better via the [415]X API, but you get
+ of Xvfb x11vnc can poll it much better via the [419]X API, but you get
the idea.
By default in -rawfb mode x11vnc will actually close any X display it
@@ -4268,7 +4292,7 @@ ied)
keystrokes into the Linux console (e.g. the virtual consoles:
/dev/tty1, /dev/tty2, etc) in x11vnc/misc/vcinject.pl. It is based on
the vncterm/LinuxVNC.c program also in the libvncserver CVS. So to
- view and interact with VC #2 (assuming it is the [416]active VC) one
+ view and interact with VC #2 (assuming it is the [420]active VC) one
can run something like:
x11vnc -rawfb map:/dev/fb0@1024x768x16 -pipeinput './vcinject.pl 2'
@@ -4281,7 +4305,7 @@ ied)
more accurate and faster LinuxVNC program. The only advantage x11vnc
-rawfb might have is that it can presumably allow interaction with a
non-text application, e.g. one based on svgalib. For example the
- [417]VMWare Fullscreen mode is actually viewable under -rawfb. But
+ [421]VMWare Fullscreen mode is actually viewable under -rawfb. But
this isn't much use until one figures out how to inject keystrokes and
mouse events...
@@ -4313,10 +4337,10 @@ ied)
As of Jan/2004 in the libvncserver CVS x11vnc supports the "CutText"
part of the rfb protocol. Furthermore, x11vnc is able to hold the
PRIMARY selection (Xvnc does not seem to do this). If you don't want
- the Clipboard/Selection exchanged use the [418]-nosel option. If you
+ the Clipboard/Selection exchanged use the [422]-nosel option. If you
don't want the PRIMARY selection to be polled for changes use the
- [419]-noprimary option. You can also fine-tune it a bit with the
- [420]-seldir dir option.
+ [423]-noprimary option. You can also fine-tune it a bit with the
+ [424]-seldir dir option.
You may need to watch out for desktop utilities such as KDE's
"Klipper" that do odd things with the selection, clipboard, and
@@ -4331,7 +4355,7 @@ ied)
not on by default in Solaris, see Xserver(1) for how to turn it on via
+kb), and so you won't hear them if the extension is not present.
- If you don't want to hear the beeps use the [421]-nobell option. If
+ If you don't want to hear the beeps use the [425]-nobell option. If
you want to hear the audio from the remote applications, consider
trying a redirector such as esd.
@@ -4347,7 +4371,7 @@ ied)
Click on the PayPal button below for more info.
Also, in general I always enjoy hearing from x11vnc users, how they
use it, what new features they would like, etc. Please send me an
- [422]email!
+ [426]email!
[PayPal]
@@ -4554,227 +4578,231 @@ References
199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor
200. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp
201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 205. http://www.karlrunge.com/x11vnc/index.html#faq-overlays
+ 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-8to24
+ 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-8to24
+ 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen
206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid
- 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
- 209. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder
- 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 212. http://www.karlrunge.com/x11vnc/index.html#xauth_pain
- 213. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
- 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
- 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
- 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
- 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
- 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods
- 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys
- 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
- 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
- 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
- 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
- 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 225. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
- 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
- 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd
- 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd
- 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
- 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input
- 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
- 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared
- 234. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 235. http://www.karlrunge.com/x11vnc/index.html#faq-passwd
- 236. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
- 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 239. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers
- 240. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
- 241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
- 242. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 244. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
- 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 249. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 250. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 253. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
- 254. http://www.karlrunge.com/x11vnc/index.html#gateway_double_ssh
- 255. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 256. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
- 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly
- 259. ftp://ftp.x.org/
- 260. http://www.karlrunge.com/x11vnc/dtVncPopup
- 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 263. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
- 266. http://www.karlrunge.com/x11vnc/blockdpy.c
- 267. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-afteraccept
- 271. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously
- 272. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
- 273. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop
- 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 275. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris
- 276. http://www.jirka.org/gdm-documentation/x241.html
- 277. http://www.karlrunge.com/x11vnc/x11vnc_loop
- 278. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth
- 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd
- 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
- 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir
- 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-http
- 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
- 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect
- 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
- 287. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
- 288. http://www.karlrunge.com/x11vnc/Xdummy
- 289. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously
- 290. http://www.karlrunge.com/x11vnc/shm_clear
- 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 293. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
- 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap
- 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
- 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
- 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
- 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
- 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
- 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
- 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
- 304. http://www.tightvnc.com/
- 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
- 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
- 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
- 308. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
- 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
- 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
- 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive
- 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
- 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
- 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
- 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-readtimeout
- 317. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
- 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area
- 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem
- 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage
+ 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-8to24
+ 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 209. http://www.karlrunge.com/x11vnc/index.html#faq-overlays
+ 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid
+ 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
+ 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder
+ 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 216. http://www.karlrunge.com/x11vnc/index.html#xauth_pain
+ 217. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
+ 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods
+ 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys
+ 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
+ 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 229. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
+ 231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd
+ 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd
+ 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input
+ 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared
+ 238. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 239. http://www.karlrunge.com/x11vnc/index.html#faq-passwd
+ 240. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 242. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 243. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers
+ 244. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
+ 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
+ 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 253. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 254. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 256. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 258. http://www.karlrunge.com/x11vnc/index.html#gateway_double_ssh
+ 259. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly
+ 263. ftp://ftp.x.org/
+ 264. http://www.karlrunge.com/x11vnc/dtVncPopup
+ 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 267. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 270. http://www.karlrunge.com/x11vnc/blockdpy.c
+ 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-afteraccept
+ 275. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously
+ 276. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 277. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop
+ 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 279. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris
+ 280. http://www.jirka.org/gdm-documentation/x241.html
+ 281. http://www.karlrunge.com/x11vnc/x11vnc_loop
+ 282. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth
+ 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd
+ 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
+ 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir
+ 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-http
+ 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect
+ 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 291. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 292. http://www.karlrunge.com/x11vnc/Xdummy
+ 293. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously
+ 294. http://www.karlrunge.com/x11vnc/shm_clear
+ 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 297. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap
+ 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
+ 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
+ 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
+ 308. http://www.tightvnc.com/
+ 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
+ 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
+ 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive
+ 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-readtimeout
321. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
- 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
- 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
- 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
- 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
- 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
- 327. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe
- 328. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect
- 329. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode
- 330. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
- 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
- 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
- 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
+ 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area
+ 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem
+ 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage
+ 325. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
+ 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 328. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 331. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe
+ 332. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect
+ 333. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode
334. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
- 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
+ 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
336. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
- 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wirecopyrect
- 338. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe
- 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen
- 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scr_skip
- 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
- 342. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
- 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
- 344. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
- 345. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 346. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode
- 347. http://www.karlrunge.com/x11vnc/index.html#solaris10-build
- 348. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
- 349. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut
- 350. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac
- 351. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove
- 352. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
- 353. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend
- 354. http://www.tightvnc.com/
- 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
- 356. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos
- 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
- 358. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
- 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
- 360. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer
- 361. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
- 362. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 363. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
- 364. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
- 365. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
- 366. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
- 367. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sloppy_keys
- 368. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 369. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 370. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 371. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
- 372. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
- 373. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
- 374. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
- 375. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sloppy_keys
- 376. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 377. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
+ 338. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow
+ 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
+ 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
+ 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wirecopyrect
+ 342. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe
+ 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen
+ 344. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scr_skip
+ 345. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
+ 346. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
+ 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 348. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 349. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 350. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode
+ 351. http://www.karlrunge.com/x11vnc/index.html#solaris10-build
+ 352. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
+ 353. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut
+ 354. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac
+ 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove
+ 356. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
+ 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend
+ 358. http://www.tightvnc.com/
+ 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 360. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos
+ 361. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 362. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
+ 363. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 364. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer
+ 365. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 366. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 367. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
+ 368. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 369. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 370. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 371. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sloppy_keys
+ 372. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 373. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 374. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 375. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 376. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 377. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
378. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
- 379. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes
- 380. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 381. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
- 382. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 383. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 384. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
- 385. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
- 386. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
- 387. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
- 388. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 389. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 390. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 391. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 392. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
- 393. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
- 394. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html
- 395. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
- 396. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
- 397. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
- 398. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor
- 399. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout
- 400. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama
- 401. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
- 402. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
- 403. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 404. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 405. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip
- 406. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama
- 407. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 408. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 409. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr
- 410. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom
- 411. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
- 412. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb
- 413. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
- 414. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 415. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb
- 416. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
- 417. http://www.karlrunge.com/x11vnc/index.html#faq-vmware
- 418. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
- 419. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary
- 420. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-seldir
- 421. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell
- 422. mailto:xvml@karlrunge.com
+ 379. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sloppy_keys
+ 380. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 381. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 382. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 383. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes
+ 384. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 385. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 386. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 387. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 388. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 389. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 390. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 391. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
+ 392. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 393. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 394. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 395. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 396. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
+ 397. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
+ 398. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html
+ 399. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
+ 400. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 401. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 402. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor
+ 403. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout
+ 404. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama
+ 405. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
+ 406. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
+ 407. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 408. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 409. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip
+ 410. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama
+ 411. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 412. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 413. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr
+ 414. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom
+ 415. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 416. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb
+ 417. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 418. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 419. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb
+ 420. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 421. http://www.karlrunge.com/x11vnc/index.html#faq-vmware
+ 422. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 423. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary
+ 424. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-seldir
+ 425. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell
+ 426. mailto:xvml@karlrunge.com
=======================================================================
@@ -4787,7 +4815,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
-x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-01-11
+x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-01-14
x11vnc options:
-display disp -auth file
@@ -4795,77 +4823,78 @@ x11vnc options:
-clip WxH+X+Y -flashcmap
-shiftcmap n -notruecolor
-visual n -overlay
- -overlay_nocursor -scale fraction
- -scale_cursor frac -viewonly
- -shared -once
- -forever -loop
- -timeout n -inetd
- -nofilexfer -http
- -connect string -vncconnect
- -novncconnect -allow host1[,host2..]
- -localhost -nolookup
- -input string -viewpasswd string
- -passwdfile filename -nopw
- -storepasswd pass file -accept string
- -afteraccept string -gone string
- -users list -noshm
- -flipbyteorder -onetile
- -solid [color] -blackout string
- -xinerama -xtrap
- -xrandr [mode] -padgeom WxH
- -o logfile -flag file
- -rc filename -norc
- -h, -help -?, -opts
- -V, -version -dbg
- -q -bg
- -modtweak -nomodtweak
- -xkb -noxkb
- -skip_keycodes string -sloppy_keys
- -skip_dups -noskip_dups
- -add_keysyms -noadd_keysyms
- -clear_mods -clear_keys
- -remap string -norepeat
- -repeat -nofb
- -nobell -nosel
- -noprimary -seldir string
- -cursor [mode] -nocursor
- -arrow n -noxfixes
- -alphacut n -alphafrac fraction
- -alpharemove -noalphablend
- -nocursorshape -cursorpos
- -nocursorpos -xwarppointer
- -buttonmap string -nodragging
- -wireframe [str] -nowireframe
- -wirecopyrect mode -nowirecopyrect
- -debug_wireframe -scrollcopyrect mode
- -noscrollcopyrect -scr_area n
- -scr_skip list -scr_inc list
- -scr_keys list -scr_term list
- -scr_keyrepeat lo-hi -scr_parms string
- -fixscreen string -debug_scroll
- -noxrecord -grab_buster
- -nograb_buster -debug_grabs
- -pointer_mode n -input_skip n
- -speeds rd,bw,lat -wmdt string
- -debug_pointer -debug_keyboard
- -defer time -wait time
- -wait_ui factor -nowait_bog
- -slow_fb time -readtimeout n
- -nap -nonap
- -sb time -noxdamage
- -xd_area A -xd_mem f
- -sigpipe string -threads
- -nothreads -fs f
- -gaps n -grow n
- -fuzz n -debug_tiles
- -snapfb -rawfb string
- -pipeinput cmd -gui [gui-opts]
- -remote command -query variable
- -QD variable -sync
- -noremote -yesremote
- -unsafe -safer
- -privremote -nocmds
- -deny_all
+ -overlay_nocursor -8to24
+ -scale fraction -scale_cursor frac
+ -viewonly -shared
+ -once -forever
+ -loop -timeout n
+ -inetd -nofilexfer
+ -http -connect string
+ -vncconnect -novncconnect
+ -allow host1[,host2..] -localhost
+ -nolookup -input string
+ -viewpasswd string -passwdfile filename
+ -nopw -storepasswd pass file
+ -accept string -afteraccept string
+ -gone string -users list
+ -noshm -flipbyteorder
+ -onetile -solid [color]
+ -blackout string -xinerama
+ -xtrap -xrandr [mode]
+ -padgeom WxH -o logfile
+ -flag file -rc filename
+ -norc -h, -help
+ -?, -opts -V, -version
+ -dbg -q
+ -bg -modtweak
+ -nomodtweak -xkb
+ -noxkb -skip_keycodes string
+ -sloppy_keys -skip_dups
+ -noskip_dups -add_keysyms
+ -noadd_keysyms -clear_mods
+ -clear_keys -remap string
+ -norepeat -repeat
+ -nofb -nobell
+ -nosel -noprimary
+ -seldir string -cursor [mode]
+ -nocursor -arrow n
+ -noxfixes -alphacut n
+ -alphafrac fraction -alpharemove
+ -noalphablend -nocursorshape
+ -cursorpos -nocursorpos
+ -xwarppointer -buttonmap string
+ -nodragging -wireframe [str]
+ -nowireframe -wirecopyrect mode
+ -nowirecopyrect -debug_wireframe
+ -scrollcopyrect mode -noscrollcopyrect
+ -scr_area n -scr_skip list
+ -scr_inc list -scr_keys list
+ -scr_term list -scr_keyrepeat lo-hi
+ -scr_parms string -fixscreen string
+ -debug_scroll -noxrecord
+ -grab_buster -nograb_buster
+ -debug_grabs -pointer_mode n
+ -input_skip n -speeds rd,bw,lat
+ -wmdt string -debug_pointer
+ -debug_keyboard -defer time
+ -wait time -wait_ui factor
+ -nowait_bog -slow_fb time
+ -readtimeout n -nap
+ -nonap -sb time
+ -noxdamage -xd_area A
+ -xd_mem f -sigpipe string
+ -threads -nothreads
+ -fs f -gaps n
+ -grow n -fuzz n
+ -debug_tiles -snapfb
+ -rawfb string -pipeinput cmd
+ -gui [gui-opts] -remote command
+ -query variable -QD variable
+ -sync -noremote
+ -yesremote -unsafe
+ -safer -privremote
+ -nocmds -deny_all
+
libvncserver options:
-rfbport port TCP port for RFB protocol
@@ -4897,7 +4926,7 @@ libvncserver-tight-extension options:
% x11vnc -help
-x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-01-11
+x11vnc: allow VNC connections to real X11 displays. 0.8 lastmod: 2006-01-14
Typical usage is:
@@ -5027,6 +5056,38 @@ Options:
-overlay_nocursor Sets -overlay, but does not try to draw the exact mouse
cursor shape using the overlay mechanism.
+-8to24 If -overlay is not supported on your OS, and you have a
+ legacy 8bpp app that you want to view on a multi-depth
+ display with default depth 24 (and is 32 bpp), try
+ this option. This option may not work on all X servers
+ and hardware (tested on XFree86/Xorg mga driver).
+
+ It enables a hack where x11vnc monitors windows within 3
+ levels from the root window. If it finds any that are
+ 8bpp it will apply a transformation for pixel data in
+ these regions where it extracts the 8bpp index color
+ value from bits 25-32 and maps them on to TrueColor
+ values and inserts them into bits 1-24 (i.e. overwrites
+ bits 1-24). This method appears to work, but may still
+ have bugs and note that it does hog resources. If there
+ are multiple 8bpp windows using different colormaps,
+ one may have to iconify all but one for the colors to
+ be correct.
+
+ There may also be painting errors for clipping
+ and switching between windows of depths 8 and 24.
+ Heuristics are applied to try to minimize the painting
+ errors. One can also press 3 Alt_L's in a row to
+ refresh the screen if the error does not repair itself.
+ Also the option, say, -fixscreen V=3.0 may be use
+ to periodically refresh the screen (at the cost of
+ bandwidth).
+
+ Note that -8to24 does not work on displays with 8bpp
+ default visual with depth 24 applications. The Xserver
+ -cc option can be used to switch the default depth on
+ multidepth setups.
+
-scale fraction Scale the framebuffer by factor "fraction". Values
less than 1 shrink the fb, larger ones expand it. Note:
image may not be sharp and response may be slower.
@@ -6461,6 +6522,8 @@ n
overlay_cursor in -overlay mode, enable cursor drawing.
overlay_nocursor disable cursor drawing. same as
nooverlay_cursor.
+ 8to24 enable -8to24 mode (if applicable).
+ no8to24 disable -8to24 mode.
visual:vis set -visual to "vis"
scale:frac set -scale to "frac"
scale_cursor:f set -scale_cursor to "f"
@@ -6714,10 +6777,10 @@ n
nowaitmapped clip flashcmap noflashcmap shiftcmap
truecolor notruecolor overlay nooverlay overlay_cursor
overlay_yescursor nooverlay_nocursor nooverlay_cursor
- nooverlay_yescursor overlay_nocursor visual scale
- scale_cursor viewonly noviewonly shared noshared
- forever noforever once timeout filexfer deny lock
- nodeny unlock connect allowonce allow localhost
+ nooverlay_yescursor overlay_nocursor 8to24 no8to24
+ visual scale scale_cursor viewonly noviewonly shared
+ noshared forever noforever once timeout filexfer deny
+ lock nodeny unlock connect allowonce allow localhost
nolocalhost listen lookup nolookup accept afteraccept
gone shm noshm flipbyteorder noflipbyteorder onetile
noonetile solid_color solid nosolid blackout xinerama
diff --git a/x11vnc/connections.c b/x11vnc/connections.c
index b444208..800d443 100644
--- a/x11vnc/connections.c
+++ b/x11vnc/connections.c
@@ -1512,7 +1512,7 @@ void check_connect_inputs(void) {
}
void check_gui_inputs(void) {
- int i, nmax = 0, n = 0, nfds;
+ int i, gnmax = 0, n = 0, nfds;
int socks[ICON_MODE_SOCKS];
fd_set fds;
struct timeval tv;
@@ -1522,8 +1522,8 @@ void check_gui_inputs(void) {
for (i=0; i<ICON_MODE_SOCKS; i++) {
if (icon_mode_socks[i] >= 0) {
socks[n++] = i;
- if (icon_mode_socks[i] > nmax) {
- nmax = icon_mode_socks[i];
+ if (icon_mode_socks[i] > gnmax) {
+ gnmax = icon_mode_socks[i];
}
}
}
@@ -1539,7 +1539,7 @@ void check_gui_inputs(void) {
tv.tv_sec = 0;
tv.tv_usec = 0;
- nfds = select(nmax+1, &fds, NULL, NULL, &tv);
+ nfds = select(gnmax+1, &fds, NULL, NULL, &tv);
if (nfds <= 0) {
return;
}
diff --git a/x11vnc/cursor.c b/x11vnc/cursor.c
index a840cc7..ec50e28 100644
--- a/x11vnc/cursor.c
+++ b/x11vnc/cursor.c
@@ -1783,4 +1783,3 @@ int check_x11_pointer(void) {
return set_cursor(x, y, get_which_cursor());
}
-
diff --git a/x11vnc/help.c b/x11vnc/help.c
index 0d6ddd5..f68b92b 100644
--- a/x11vnc/help.c
+++ b/x11vnc/help.c
@@ -147,6 +147,38 @@ void print_help(int mode) {
"-overlay_nocursor Sets -overlay, but does not try to draw the exact mouse\n"
" cursor shape using the overlay mechanism.\n"
"\n"
+"-8to24 If -overlay is not supported on your OS, and you have a\n"
+" legacy 8bpp app that you want to view on a multi-depth\n"
+" display with default depth 24 (and is 32 bpp), try\n"
+" this option. This option may not work on all X servers\n"
+" and hardware (tested on XFree86/Xorg mga driver).\n"
+"\n"
+" It enables a hack where x11vnc monitors windows within 3\n"
+" levels from the root window. If it finds any that are\n"
+" 8bpp it will apply a transformation for pixel data in\n"
+" these regions where it extracts the 8bpp index color\n"
+" value from bits 25-32 and maps them on to TrueColor\n"
+" values and inserts them into bits 1-24 (i.e. overwrites\n"
+" bits 1-24). This method appears to work, but may still\n"
+" have bugs and note that it does hog resources. If there\n"
+" are multiple 8bpp windows using different colormaps,\n"
+" one may have to iconify all but one for the colors to\n"
+" be correct.\n"
+"\n"
+" There may also be painting errors for clipping\n"
+" and switching between windows of depths 8 and 24.\n"
+" Heuristics are applied to try to minimize the painting\n"
+" errors. One can also press 3 Alt_L's in a row to\n"
+" refresh the screen if the error does not repair itself.\n"
+" Also the option, say, -fixscreen V=3.0 may be use\n"
+" to periodically refresh the screen (at the cost of\n"
+" bandwidth).\n"
+"\n"
+" Note that -8to24 does not work on displays with 8bpp\n"
+" default visual with depth 24 applications. The Xserver\n"
+" -cc option can be used to switch the default depth on\n"
+" multidepth setups.\n"
+"\n"
"-scale fraction Scale the framebuffer by factor \"fraction\". Values\n"
" less than 1 shrink the fb, larger ones expand it. Note:\n"
" image may not be sharp and response may be slower.\n"
@@ -1590,6 +1622,8 @@ void print_help(int mode) {
" overlay_cursor in -overlay mode, enable cursor drawing.\n"
" overlay_nocursor disable cursor drawing. same as\n"
" nooverlay_cursor.\n"
+" 8to24 enable -8to24 mode (if applicable).\n"
+" no8to24 disable -8to24 mode.\n"
" visual:vis set -visual to \"vis\"\n"
" scale:frac set -scale to \"frac\"\n"
" scale_cursor:f set -scale_cursor to \"f\"\n"
@@ -1849,10 +1883,10 @@ void print_help(int mode) {
" nowaitmapped clip flashcmap noflashcmap shiftcmap\n"
" truecolor notruecolor overlay nooverlay overlay_cursor\n"
" overlay_yescursor nooverlay_nocursor nooverlay_cursor\n"
-" nooverlay_yescursor overlay_nocursor visual scale\n"
-" scale_cursor viewonly noviewonly shared noshared\n"
-" forever noforever once timeout filexfer deny lock\n"
-" nodeny unlock connect allowonce allow localhost\n"
+" nooverlay_yescursor overlay_nocursor 8to24 no8to24\n"
+" visual scale scale_cursor viewonly noviewonly shared\n"
+" noshared forever noforever once timeout filexfer deny\n"
+" lock nodeny unlock connect allowonce allow localhost\n"
" nolocalhost listen lookup nolookup accept afteraccept\n"
" gone shm noshm flipbyteorder noflipbyteorder onetile\n"
" noonetile solid_color solid nosolid blackout xinerama\n"
diff --git a/x11vnc/options.c b/x11vnc/options.c
index 6646aac..3d548e0 100644
--- a/x11vnc/options.c
+++ b/x11vnc/options.c
@@ -88,6 +88,7 @@ int first_conn_timeout = 0; /* -timeout */
int flash_cmap = 0; /* follow installed colormaps */
int shift_cmap = 0; /* ncells < 256 and needs shift of pixel values */
int force_indexed_color = 0; /* whether to force indexed color for 8bpp */
+int cmap8to24 = 0; /* -8to24 */
int launch_gui = 0; /* -gui */
int use_modifier_tweak = 1; /* use the shift/altgr modifier tweak */
diff --git a/x11vnc/options.h b/x11vnc/options.h
index ae5ef43..b734f59 100644
--- a/x11vnc/options.h
+++ b/x11vnc/options.h
@@ -63,6 +63,7 @@ extern int first_conn_timeout;
extern int flash_cmap;
extern int shift_cmap;
extern int force_indexed_color;
+extern int cmap8to24;
extern int launch_gui;
extern int use_modifier_tweak;
diff --git a/x11vnc/remote.c b/x11vnc/remote.c
index 2a82ca8..64e915e 100644
--- a/x11vnc/remote.c
+++ b/x11vnc/remote.c
@@ -979,6 +979,24 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog(" -R cursor:... to re-enable any cursors.\n");
}
+ } else if (!strcmp(p, "8to24")) {
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, cmap8to24);
+ goto qry;
+ }
+ rfbLog("remote_cmd: turning on -8to24 mode.\n");
+ cmap8to24 = 1;
+ do_new_fb(0);
+
+ } else if (!strcmp(p, "no8to24")) {
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, !cmap8to24);
+ goto qry;
+ }
+ rfbLog("remote_cmd: turning off -8to24 mode.\n");
+ cmap8to24 = 0;
+ do_new_fb(0);
+
} else if (strstr(p, "visual") == p) {
COLON_CHECK("visual:")
if (query) {
diff --git a/x11vnc/scan.c b/x11vnc/scan.c
index 45fbd3f..e956dc9 100644
--- a/x11vnc/scan.c
+++ b/x11vnc/scan.c
@@ -6,6 +6,7 @@
#include "xdamage.h"
#include "xrandr.h"
#include "win_utils.h"
+#include "8to24.h"
#include "screen.h"
#include "pointer.h"
#include "cleanup.h"
@@ -1158,6 +1159,7 @@ void scale_rect(double factor, int blend, int interpolate, int Bpp,
}
void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
+ char *src_fb = main_fb;
if (!screen || !rfb_fb || !main_fb) {
return;
@@ -1181,8 +1183,12 @@ void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
}
}
+ if (cmap8to24 && cmap8to24_fb) {
+ src_fb = cmap8to24_fb;
+ }
+
scale_rect(scale_fac, scaling_blend, scaling_interpolate, bpp/8,
- main_fb, main_bytes_per_line, rfb_fb, rfb_bytes_per_line,
+ src_fb, main_bytes_per_line, rfb_fb, rfb_bytes_per_line,
dpy_x, dpy_y, scaled_x, scaled_y, X1, Y1, X2, Y2, 1);
}
@@ -1212,8 +1218,17 @@ void mark_rect_as_modified(int x1, int y1, int x2, int y2, int force) {
if (rfb_fb == main_fb || force) {
rfbMarkRectAsModified(screen, x1, y1, x2, y2);
- } else if (scaling) {
+ return;
+ }
+
+ if (cmap8to24) {
+ bpp8to24(x1, y1, x2, y2);
+ }
+
+ if (scaling) {
scale_and_mark_rect(x1, y1, x2, y2);
+ } else {
+ rfbMarkRectAsModified(screen, x1, y1, x2, y2);
}
}
@@ -2416,6 +2431,9 @@ int scan_for_updates(int count_only) {
/* check for changed colormap */
set_colormap(0);
}
+ if (cmap8to24 && scan_count % 4 == 0) {
+ check_for_multivis();
+ }
if (use_xdamage) {
/* first pass collecting DAMAGE events: */
collect_xdamage(scan_count, 0);
diff --git a/x11vnc/screen.c b/x11vnc/screen.c
index ae81ec4..f6d61fc 100644
--- a/x11vnc/screen.c
+++ b/x11vnc/screen.c
@@ -544,8 +544,9 @@ static void nofb_hook(rfbClientPtr cl) {
void do_new_fb(int reset_mem) {
XImage *fb;
- char *old_main = main_fb;
- char *old_rfb = rfb_fb;
+ char *old_main = main_fb;
+ char *old_rfb = rfb_fb;
+ char *old_8to24 = cmap8to24_fb;
/* for threaded we really should lock libvncserver out. */
if (use_threads) {
@@ -569,12 +570,15 @@ void do_new_fb(int reset_mem) {
initialize_polling_images();
}
- if (old_main != old_rfb && old_main) {
+ if (old_main) {
free(old_main);
}
- if (old_rfb) {
+ if (old_rfb && old_rfb != old_main) {
free(old_rfb);
}
+ if (old_8to24 && old_8to24 != old_main && old_8to24 != old_rfb) {
+ free(old_8to24);
+ }
fb0 = fb;
}
@@ -1754,12 +1758,31 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
if (nofb) {
main_fb = NULL;
rfb_fb = main_fb;
+ cmap8to24_fb = NULL;
screen->displayHook = nofb_hook;
} else {
main_fb = fb->data;
+ rfb_fb = NULL;
+ cmap8to24_fb = NULL;
+
+ if (cmap8to24) {
+ if (screen->serverFormat.bitsPerPixel != 32 ||
+ screen->serverFormat.depth != 24) {
+ if (!quiet) rfbLog("disabling -8to24 mode:"
+ " bpp != 32 or depth != 24\n");
+ cmap8to24 = 0;
+ }
+ }
+ if (cmap8to24) {
+ int n = main_bytes_per_line * fb->height;
+ cmap8to24_fb = (char *) malloc(n);
+ memset(cmap8to24_fb, 0, n);
+ }
if (scaling) {
rfb_fb = (char *) malloc(rfb_bytes_per_line * height);
memset(rfb_fb, 0, rfb_bytes_per_line * height);
+ } else if (cmap8to24) {
+ rfb_fb = cmap8to24_fb;
} else {
rfb_fb = main_fb;
}
@@ -1768,6 +1791,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
if (!quiet) {
fprintf(stderr, " main_fb: %p\n", main_fb);
fprintf(stderr, " rfb_fb: %p\n", rfb_fb);
+ fprintf(stderr, " 8to24_fb: %p\n", cmap8to24_fb);
fprintf(stderr, "\n");
}
@@ -1780,7 +1804,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
setup_cursors_and_push();
- if (scaling) {
+ if (scaling || cmap8to24) {
mark_rect_as_modified(0, 0, dpy_x, dpy_y, 0);
}
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index aabfa0a..5429144 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -121,6 +121,7 @@ Screen
=GAL OverlayVisuals::
overlay
overlay_nocursor
+ 8to24
=GAL LOFF
=GAL 8-Bit-Color::
flashcmap
@@ -1446,7 +1447,7 @@ proc parse_help {} {
if {! $sawopts} {
continue;
}
- if {[regexp {^-([A-z_][A-z_]*)} $line match name]} {
+ if {[regexp {^-([0-9A-z_][0-9A-z_]*)} $line match name]} {
set allnames($name) 1;
if {"$curropt" != "no$name" && "no$curropt" != "$name"} {
set curropt $name;
@@ -1525,7 +1526,7 @@ proc parse_remote_help {} {
if {! $sawopts} {
continue;
}
- if {[regexp {^([A-z_][A-z_:]*)} $line match name]} {
+ if {[regexp {^([0-9A-z_][0-9A-z_:]*)} $line match name]} {
regsub {:.*$} $name "" popt
lappend possopts $popt
if {"$curropt" != "no$name" && "no$curropt" != "$name"} {
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index c5aedf8..37d4c6b 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -132,6 +132,7 @@ char gui_code[] = "";
" =GAL OverlayVisuals::\n"
" overlay\n"
" overlay_nocursor\n"
+" 8to24\n"
" =GAL LOFF\n"
" =GAL 8-Bit-Color::\n"
" flashcmap\n"
@@ -1457,7 +1458,7 @@ char gui_code[] = "";
" if {! $sawopts} {\n"
" continue;\n"
" }\n"
-" if {[regexp {^-([A-z_][A-z_]*)} $line match name]} {\n"
+" if {[regexp {^-([0-9A-z_][0-9A-z_]*)} $line match name]} {\n"
" set allnames($name) 1;\n"
" if {\"$curropt\" != \"no$name\" && \"no$curropt\" != \"$name\"} {\n"
" set curropt $name;\n"
@@ -1536,7 +1537,7 @@ char gui_code[] = "";
" if {! $sawopts} {\n"
" continue;\n"
" }\n"
-" if {[regexp {^([A-z_][A-z_:]*)} $line match name]} {\n"
+" if {[regexp {^([0-9A-z_][0-9A-z_:]*)} $line match name]} {\n"
" regsub {:.*$} $name \"\" popt\n"
" lappend possopts $popt\n"
" if {\"$curropt\" != \"no$name\" && \"no$curropt\" != \"$name\"} {\n"
diff --git a/x11vnc/userinput.c b/x11vnc/userinput.c
index 062fea5..d72d5c7 100644
--- a/x11vnc/userinput.c
+++ b/x11vnc/userinput.c
@@ -14,6 +14,7 @@
#include "keyboard.h"
#include "solid.h"
#include "xrandr.h"
+#include "8to24.h"
/*
* user input handling heuristics
@@ -241,7 +242,7 @@ WIREFRAME_PARMS "0xff,2,0,30+6+6+6,Alt,0.05+0.3+2.0,8"
shade,linewidth,percent,T+B+L+R,mods,t1+t2+t3+t4
*/
#define LW_MAX 8
-static unsigned long wireframe_shade;
+static unsigned long wireframe_shade = 0xff;
static int wireframe_lw;
static double wireframe_frac;
static int wireframe_top, wireframe_bot, wireframe_left, wireframe_right;
@@ -3694,6 +3695,25 @@ if (db) fprintf(stderr, "send_copyrect: %d\n", sent_copyrect);
/* final push (for -nowirecopyrect) */
rfbPE(1000);
wireframe_in_progress = 0;
+
+ if (frame_changed && cmap8to24 && multivis_count) {
+ /* handle -8to24 tweak, mark area and check 8bpp... */
+ int x1, x2, y1, y2, f = 16;
+ x1 = nmin(box_x, orig_x) - f;
+ y1 = nmin(box_y, orig_y) - f;
+ x2 = nmax(box_x + box_w, orig_x + orig_w) + f;
+ y2 = nmax(box_y + box_h, orig_y + orig_h) + f;
+ x1 = nfix(x1, dpy_x);
+ x2 = nfix(x2, dpy_x);
+ y1 = nfix(y1, dpy_y);
+ y2 = nfix(y2, dpy_y);
+if (0) fprintf(stderr, "wireframe_in_progress over: %d %d %d %d\n", x1, y1, x2, y2);
+ check_for_multivis();
+ if (1) mark_rect_as_modified(x1, y1, x2, y2, 0);
+ if (0) mark_rect_as_modified(0, 0, dpy_x, dpy_y, 0);
+ if (0) rfbPE(-1);
+ }
+
urgent_update = 1;
if (use_xdamage) {
/* DAMAGE can queue ~1000 rectangles for a move */
diff --git a/x11vnc/util.c b/x11vnc/util.c
index 4d5dfe2..0d73ace 100644
--- a/x11vnc/util.c
+++ b/x11vnc/util.c
@@ -14,6 +14,8 @@ MUTEX(scrollMutex);
#endif
int nfix(int i, int n);
+int nmin(int n, int m);
+int nmax(int n, int m);
int nabs(int n);
double dabs(double x);
void lowercase(char *str);
@@ -42,6 +44,9 @@ double rfac(void);
void rfbPE(long usec);
void rfbCFD(long usec);
+double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
+ int X2, int Y2);
+
/*
* routine to keep 0 <= i < n, should use in more places...
@@ -55,6 +60,22 @@ int nfix(int i, int n) {
return i;
}
+int nmin(int n, int m) {
+ if (n < m) {
+ return n;
+ } else {
+ return m;
+ }
+}
+
+int nmax(int n, int m) {
+ if (n > m) {
+ return n;
+ } else {
+ return m;
+ }
+}
+
int nabs(int n) {
if (n < 0) {
return -n;
@@ -394,4 +415,39 @@ void rfbCFD(long usec) {
}
}
+double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
+ int X2, int Y2) {
+ double a, A, o;
+ sraRegionPtr r, R, overlap;
+ sraRectangleIterator *iter;
+ sraRect rt;
+
+ a = nabs((x2 - x1) * (y2 - y1));
+ A = nabs((X2 - X1) * (Y2 - Y1));
+
+ r = sraRgnCreateRect(x1, y1, x2, y2);
+ R = sraRgnCreateRect(X1, Y1, X2, Y2);
+
+ overlap = sraRgnCreateRect(x1, y1, x2, y2);
+
+ sraRgnAnd(overlap, R);
+
+ o = 0.0;
+ iter = sraRgnGetIterator(overlap);
+ while (sraRgnIteratorNext(iter, &rt)) {
+ o += nabs( (rt.x2 - rt.x1) * (rt.y2 - rt.y1) );
+ }
+ sraRgnReleaseIterator(iter);
+
+ sraRgnDestroy(r);
+ sraRgnDestroy(R);
+ sraRgnDestroy(overlap);
+
+ if (a < A) {
+ o = o/a;
+ } else {
+ o = o/A;
+ }
+ return o;
+}
diff --git a/x11vnc/util.h b/x11vnc/util.h
index e919cf3..92e5e00 100644
--- a/x11vnc/util.h
+++ b/x11vnc/util.h
@@ -4,6 +4,8 @@
/* -- util.h -- */
extern int nfix(int i, int n);
+extern int nmin(int n, int m);
+extern int nmax(int n, int m);
extern int nabs(int n);
extern double dabs(double x);
extern void lowercase(char *str);
@@ -31,6 +33,8 @@ extern double rfac(void);
extern void rfbPE(long usec);
extern void rfbCFD(long usec);
+extern double rect_overlap(int x1, int y1, int x2, int y2, int X1, int Y1,
+ int X2, int Y2);
#define NONUL(x) ((x) ? (x) : "")
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 82ba197..43086c6 100644
--- a/x11vnc/x11vnc.1
+++ b/x11vnc/x11vnc.1
@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2006" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
- version: 0.8, lastmod: 2006-01-11
+ version: 0.8, lastmod: 2006-01-14
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@@ -177,6 +177,40 @@ visual (e.g. some apps have \fB-use24\fR or \fB-visual\fR options).
Sets \fB-overlay,\fR but does not try to draw the exact mouse
cursor shape using the overlay mechanism.
.PP
+\fB-8to24\fR
+.IP
+If \fB-overlay\fR is not supported on your OS, and you have a
+legacy 8bpp app that you want to view on a multi-depth
+display with default depth 24 (and is 32 bpp), try
+this option. This option may not work on all X servers
+and hardware (tested on XFree86/Xorg mga driver).
+.IP
+It enables a hack where x11vnc monitors windows within 3
+levels from the root window. If it finds any that are
+8bpp it will apply a transformation for pixel data in
+these regions where it extracts the 8bpp index color
+value from bits 25-32 and maps them on to TrueColor
+values and inserts them into bits 1-24 (i.e. overwrites
+bits 1-24). This method appears to work, but may still
+have bugs and note that it does hog resources. If there
+are multiple 8bpp windows using different colormaps,
+one may have to iconify all but one for the colors to
+be correct.
+.IP
+There may also be painting errors for clipping
+and switching between windows of depths 8 and 24.
+Heuristics are applied to try to minimize the painting
+errors. One can also press 3 Alt_L's in a row to
+refresh the screen if the error does not repair itself.
+Also the option, say, \fB-fixscreen\fR V=3.0 may be use
+to periodically refresh the screen (at the cost of
+bandwidth).
+.IP
+Note that \fB-8to24\fR does not work on displays with 8bpp
+default visual with depth 24 applications. The Xserver
+\fB-cc\fR option can be used to switch the default depth on
+multidepth setups.
+.PP
\fB-scale\fR \fIfraction\fR
.IP
Scale the framebuffer by factor \fIfraction\fR. Values
@@ -1979,6 +2013,10 @@ overlay_cursor in \fB-overlay\fR mode, enable cursor drawing.
overlay_nocursor disable cursor drawing. same as
nooverlay_cursor.
.IP
+8to24 enable \fB-8to24\fR mode (if applicable).
+.IP
+no8to24 disable \fB-8to24\fR mode.
+.IP
visual:vis set \fB-visual\fR to "vis"
.IP
scale:frac set \fB-scale\fR to "frac"
@@ -2417,10 +2455,10 @@ refresh reset close disconnect id sid waitmapped
nowaitmapped clip flashcmap noflashcmap shiftcmap
truecolor notruecolor overlay nooverlay overlay_cursor
overlay_yescursor nooverlay_nocursor nooverlay_cursor
-nooverlay_yescursor overlay_nocursor visual scale
-scale_cursor viewonly noviewonly shared noshared
-forever noforever once timeout filexfer deny lock
-nodeny unlock connect allowonce allow localhost
+nooverlay_yescursor overlay_nocursor 8to24 no8to24
+visual scale scale_cursor viewonly noviewonly shared
+noshared forever noforever once timeout filexfer deny
+lock nodeny unlock connect allowonce allow localhost
nolocalhost listen lookup nolookup accept afteraccept
gone shm noshm flipbyteorder noflipbyteorder onetile
noonetile solid_color solid nosolid blackout xinerama
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index aba7808..d833aff 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -907,6 +907,7 @@ static void print_settings(int try_http, int bg, char *gui_str) {
fprintf(stderr, " flashcmap: %d\n", flash_cmap);
fprintf(stderr, " shiftcmap: %d\n", shift_cmap);
fprintf(stderr, " force_idx: %d\n", force_indexed_color);
+ fprintf(stderr, " cmap8to24: %d\n", cmap8to24);
fprintf(stderr, " visual: %s\n", visual_str ? visual_str
: "null");
fprintf(stderr, " overlay: %d\n", overlay);
@@ -1270,6 +1271,8 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-overlay_yescursor")) {
overlay = 1;
overlay_cursor = 2;
+ } else if (!strcmp(arg, "-8to24")) {
+ cmap8to24 = 1;
} else if (!strcmp(arg, "-visual")) {
CHECK_ARGC
visual_str = strdup(argv[++i]);
diff --git a/x11vnc/x11vnc.h b/x11vnc/x11vnc.h
index 9ad8325..fd46d09 100644
--- a/x11vnc/x11vnc.h
+++ b/x11vnc/x11vnc.h
@@ -315,6 +315,7 @@ extern char *main_fb; /* our copy of the X11 fb */
extern char *rfb_fb; /* same as main_fb unless transformation */
extern char *fake_fb; /* used under -padgeom */
extern char *snap_fb; /* used under -snapfb */
+extern char *cmap8to24_fb; /* used under -8to24 */
extern char *raw_fb;
extern char *raw_fb_addr;
extern int raw_fb_offset;
diff --git a/x11vnc/x11vnc_defs.c b/x11vnc/x11vnc_defs.c
index 13d6b85..d9c0488 100644
--- a/x11vnc/x11vnc_defs.c
+++ b/x11vnc/x11vnc_defs.c
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
-char lastmod[] = "0.8 lastmod: 2006-01-11";
+char lastmod[] = "0.8 lastmod: 2006-01-14";
/* X display info */
@@ -57,6 +57,7 @@ char *main_fb = NULL; /* our copy of the X11 fb */
char *rfb_fb = NULL; /* same as main_fb unless transformation */
char *fake_fb = NULL; /* used under -padgeom */
char *snap_fb = NULL; /* used under -snapfb */
+char *cmap8to24_fb = NULL; /* used under -8to24 */
char *raw_fb = NULL;
char *raw_fb_addr = NULL;
int raw_fb_offset = 0;