diff options
author | runge <runge> | 2005-06-14 03:50:55 +0000 |
---|---|---|
committer | runge <runge> | 2005-06-14 03:50:55 +0000 |
commit | 543e64d3c6fa79126be5a5ec5f214a1a96f87335 (patch) | |
tree | 78fe813c221133a13a92101d74621036194d06c7 | |
parent | 50568f1a81b9fd1f4e4db18767b73b98743128d5 (diff) | |
download | libtdevnc-543e64d3c6fa79126be5a5ec5f214a1a96f87335.tar.gz libtdevnc-543e64d3c6fa79126be5a5ec5f214a1a96f87335.zip |
main.c: XReadScreen check, fix 64bit use of cursors, x11vnc: first round of beta-testing fixes, RFE's.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | libvncserver/cursor.c | 48 | ||||
-rw-r--r-- | x11vnc/ChangeLog | 15 | ||||
-rw-r--r-- | x11vnc/README | 1890 | ||||
-rwxr-xr-x | x11vnc/tkx11vnc | 4 | ||||
-rw-r--r-- | x11vnc/tkx11vnc.h | 4 | ||||
-rw-r--r-- | x11vnc/x11vnc.1 | 178 | ||||
-rw-r--r-- | x11vnc/x11vnc.c | 1222 |
9 files changed, 2117 insertions, 1259 deletions
@@ -1,3 +1,8 @@ +2005-06-14 Karl Runge <runge@karlrunge.com> + * configure.ac: XReadScreen and XReadDisplay checks. + * libvncserver/cursor.c: fix unsigned long crash for 64bits. + * x11vnc: first round of beta-testing fixes, RFE's. + 2005-06-10 Johannes E. Schindelin <Johannes.Schindelin@gmx.de> * configure.ac: fix that annoying SUN /usr/ccs location of "ar" diff --git a/configure.ac b/configure.ac index c14fb3b..919f702 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,8 @@ AH_TEMPLATE(HAVE_LIBXFIXES, [XFIXES extension build environment present]) AH_TEMPLATE(HAVE_LIBXDAMAGE, [XDAMAGE extension build environment present]) AH_TEMPLATE(HAVE_LIBXTRAP, [DEC-XTRAP extension build environment present]) AH_TEMPLATE(HAVE_RECORD, [RECORD extension build environment present]) +AH_TEMPLATE(HAVE_SOLARIS_XREADSCREEN, [Solaris XReadScreen available]) +AH_TEMPLATE(HAVE_IRIX_XREADDISPLAY, [IRIX XReadDisplay available]) if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then AC_CHECK_LIB(X11, XGetImage, HAVE_X="true", HAVE_X="false", @@ -70,6 +72,14 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then [AC_DEFINE(HAVE_XSHM)], , $X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS) + AC_CHECK_LIB(Xext, XReadScreen, + [AC_DEFINE(HAVE_SOLARIS_XREADSCREEN)], , + $X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS) + + AC_CHECK_HEADER(X11/extensions/readdisplay.h, + [AC_DEFINE(HAVE_IRIX_XREADDISPLAY)], , + [#include <X11/Xlib.h>]) + AC_CHECK_LIB(Xtst, XTestGrabControl, X_PRELIBS="$X_PRELIBS -lXtst" [AC_DEFINE(HAVE_XTESTGRABCONTROL) HAVE_XTESTGRABCONTROL="true"], , diff --git a/libvncserver/cursor.c b/libvncserver/cursor.c index 4794140..eb976e2 100644 --- a/libvncserver/cursor.c +++ b/libvncserver/cursor.c @@ -525,7 +525,7 @@ void rfbShowCursor(rfbClientPtr cl) int gmax, gshift; int bmax, bshift; int amax = 255; /* alphaSource is always 8bits of info per pixel */ - unsigned long rmask, gmask, bmask; + unsigned int rmask, gmask, bmask; rmax = s->serverFormat.redMax; gmax = s->serverFormat.greenMax; @@ -544,8 +544,9 @@ void rfbShowCursor(rfbClientPtr cl) * we loop over the whole cursor ignoring c->mask[], * using the extracted alpha value instead. */ - char *dest, *src, *aptr; - unsigned long val, *dv, *sv; + char *dest; + unsigned char *src, *aptr; + unsigned int val, dval, sval; int rdst, gdst, bdst; /* fb RGB */ int asrc, rsrc, gsrc, bsrc; /* rich source ARGB */ @@ -553,23 +554,42 @@ void rfbShowCursor(rfbClientPtr cl) src = c->richSource + (j+j1)*c->width*bpp + (i+i1)*bpp; aptr = c->alphaSource + (j+j1)*c->width + (i+i1); - dv = (unsigned long *)dest; - sv = (unsigned long *)src; - - asrc = *((unsigned char *)aptr); - + asrc = *aptr; if (!asrc) { continue; } + if (bpp == 1) { + dval = *((unsigned char*) dest); + sval = *((unsigned char*) src); + } else if (bpp == 2) { + dval = *((unsigned short*) dest); + sval = *((unsigned short*) src); + } else if (bpp == 3) { + unsigned char *dst = (unsigned char *) dest; + dval = 0; + dval |= ((*(dst+0)) << 0); + dval |= ((*(dst+1)) << 8); + dval |= ((*(dst+2)) << 16); + sval = 0; + sval |= ((*(src+0)) << 0); + sval |= ((*(src+1)) << 8); + sval |= ((*(src+2)) << 16); + } else if (bpp == 4) { + dval = *((unsigned int*) dest); + sval = *((unsigned int*) src); + } else { + continue; + } + /* extract dest and src RGB */ - rdst = (*dv & rmask) >> rshift; /* fb */ - gdst = (*dv & gmask) >> gshift; - bdst = (*dv & bmask) >> bshift; + rdst = (dval & rmask) >> rshift; /* fb */ + gdst = (dval & gmask) >> gshift; + bdst = (dval & bmask) >> bshift; - rsrc = (*sv & rmask) >> rshift; /* richcursor */ - gsrc = (*sv & gmask) >> gshift; - bsrc = (*sv & bmask) >> bshift; + rsrc = (sval & rmask) >> rshift; /* richcursor */ + gsrc = (sval & gmask) >> gshift; + bsrc = (sval & bmask) >> bshift; /* blend in fb data. */ if (! c->alphaPreMultiplied) { diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog index 7bbd01d..ff368b3 100644 --- a/x11vnc/ChangeLog +++ b/x11vnc/ChangeLog @@ -1,3 +1,18 @@ +2005-06-14 Karl Runge <runge@karlrunge.com> + * -DNOGUI and -DVIEWONLY build options + * -noskip_dups the default (windows viewer sends no ups when + repeating) + * HAVE_SOLARIS_XREADSCREEN and HAVE_IRIX_XREADDISPLAY + * Alt+Button+Motion to wireframe. tunable in WIREFRAME_PARMS + * copyrect now the default under -scale (works OK, but must + send a cleanup update) + * fix -pedantic and Sun cc warnings and errors (unsigned, etc..) + * print out fatal error messages under -quiet + * -seldir to control and debug selection transfers. + * fix crashes on 64bit wrt unsigned long in rich cursors. + * fix kde guessing errors + * more scrolling and wireframe tweaks. + 2005-06-03 Karl Runge <runge@karlrunge.com> * make scrollcopyrect more or less usable under -scale * add -fixscreen for periodic cleanup of painting errors. diff --git a/x11vnc/README b/x11vnc/README index b9029bf..dda7b93 100644 --- a/x11vnc/README +++ b/x11vnc/README @@ -1,5 +1,5 @@ -x11vnc README file Date: Fri Jun 3 23:10:08 EDT 2005 +x11vnc README file Date: Mon Jun 13 23:51:46 EDT 2005 The following information is taken from these URLs: @@ -537,18 +537,34 @@ make I don't have any formal beta-testers for the releases of x11vnc, so I'd appreciate any additional testing very much! - I'd like to release version 0.7.2 in May/Jun 2005 sometime, here is - the current tarball: [50]x11vnc-0.7.2.tar.gz. Please kick the tires, - and report bugs, performance regressions, etc. to [51]me. - - Here is what is shaping up to be [52]the release notes for 0.7.2.. - Note that the [53]X DAMAGE feature will be on by default and so I am - interested if that causes any problems. I'd also like to have the new - "wireframe" move/resize stuff, the "wireframe copyrect", and the - "scroll detection copyrect" all on by default as well! The scroll - copyrect is currently the least stable, you can toggle it off via - "-noscr". Let me know of any issues you find for any of these new - features. Thanks! + I'd like to release version 0.7.2 in Jun/2005 sometime, here is the + current tarball: + + RC-2 lastmod: 2005-06-10 [50]x11vnc-0.7.2.tar.gz + + There are also some Linux and Solaris test binaries [51]here. Please + kick the tires and report bugs, performance regressions, undesired + behavior, etc. to [52]me. + + Here is what is shaping up to be [53]the release notes for 0.7.2.. + Note that the [54]X DAMAGE feature will be on by default and so I am + interested if that causes any problems. + + I'd also like to have the new [55]wireframe move/resize, the + [56]wireframe copyrect translation, and the [57]scroll + detection+copyrect features all on by default as well since when they + work they give a great speedup! (CopyRect is a VNC encoding and is + very fast because the viewer already has the image data that needs to + be copied: e.g. it just moves it to another part of its screen). The + scroll copyrect is currently the least stable, you can toggle it off + via "-noscr" or via the gui (all of the other new features can also be + toggled by cmdline option or gui, see -help output for more info). + + I sent [58]this email request to some folks. It contains additional + info for beta-testing. + + [59]Let me know of any bugs or undesired behavior you find for any of + these new features. Thanks! _________________________________________________________________ Some Notes: @@ -576,10 +592,10 @@ make a solid background while using x11vnc. You can turn the pretty background image back on when you are using the display directly. Update: As of Feb/2005 in the libvncserver CVS, x11vnc has the - [54]-solid [color] option that works on recent GNOME, KDE, and CDE and + [60]-solid [color] option that works on recent GNOME, KDE, and CDE and also on classic X (background image is on the root window). - I also find the [55]TightVNC encoding gives the best response for my + I also find the [61]TightVNC encoding gives the best response for my usage (Unix <-> Unix over cable modem). One needs a tightvnc-aware vncviewer to take advantage of this encoding. @@ -591,16 +607,16 @@ make is X11's default listening port). Had port 5900 been taken by some other application, x11vnc would have next tried 5901. That would mean the viewer command above should be changed to vncviewer - far-away.east:1. You can force the issue with the "[56]-rfbport NNNN" + far-away.east:1. You can force the issue with the "[62]-rfbport NNNN" option where NNNN is the desired port number. If that port is already taken, x11vnc will exit immediately. (also see the "SunRay Gotcha" note below) Options: x11vnc has (far too) many features that may be activated - via its [57]command line options. Useful options are, e.g., -scale to + via its [63]command line options. Useful options are, e.g., -scale to do server-side scaling, and -rfbauth passwd-file to use VNC password protection (the vncpasswd or storepasswd programs, or the x11vnc - [58]-storepasswd option can be used to create the password file). + [64]-storepasswd option can be used to create the password file). Algorithm: How does x11vnc do it? Rather brute-forcedly: it continuously polls the X11 framebuffer for changes using @@ -627,15 +643,15 @@ make first testing out the programs. You get an interesting "feedback" effect where vncviewer images keep popping up each one contained in the previous one and slightly shifted a bit by the window manager - decorations. There will be an [59]even more interesting effect if + decorations. There will be an [65]even more interesting effect if -scale is used. Also, if the XKEYBOARD is supported and the XBell "beeps" once, you get an infinite loop of beeps going off. Although all of this is mildly exciting it is not much use: you will normally run and display the viewer on a different machine! SunRay notes: You can run x11vnc on your (connected or disconnected) - [60]SunRay session (Please remember to use [61]-nap and maybe - [62]-wait 200 to avoid being a resource hog! It also helps to have a + [66]SunRay session (Please remember to use [67]-nap and maybe + [68]-wait 200 to avoid being a resource hog! It also helps to have a solid background color). You have to know the name of the machine your SunRay session X server is running on. You also need to know the X11 DISPLAY number for the session: on a SunRay it could be a large @@ -658,7 +674,7 @@ make sunray-server:0 (note the :0 corresponding to port 5900, it is not :137). If it cannot get 5900, it tries for 5901, and so on. You can also try to force the port (and thereby the VNC display) using the - [63]-rfbport NNNN option. + [69]-rfbport NNNN option. SunRay Gotcha #2: If you get an error like: shmget(tile) failed. @@ -671,7 +687,7 @@ make dies) the slot is not reclaimed. You can view the shm slots with the "ipcs -mA" command. If there are about 100 then you've probably hit this problem. They can be cleaned out (by the owner or by root) using - the ipcrm command. I wrote a script [64]shm_clear that finds the + the ipcrm command. I wrote a script [70]shm_clear that finds the orphans and lists or removes them. Longer term, have your SunRay sysadmin add something like this to /etc/system: set shmsys:shminfo_shmmax = 0x2000000 @@ -692,15 +708,24 @@ make video framebuffer for the screen image data). The difference can be a factor of 10 to 1000, and so it usually takes about 0.5-1 sec to read in the whole video hardware framebuffer (e.g. 5MB for - 1280x1024 at depth 24). So whenever activity changes most of the - screen (e.g. moving or iconifying a large window) there is a delay - of 0.5-1 sec while x11vnc reads the changed regions in. + 1280x1024 at depth 24 with a read rate of 5-10MB/sec). So whenever + activity changes most of the screen (e.g. moving or iconifying a + large window) there is a delay of 0.5-1 sec while x11vnc reads the + changed regions in. + Note: A quick way to get a 2X speedup is to switch from depth 24 + (32bpp) to depth 16 (16bpp). You get a 4X speedup going to 8bpp, + but the lack of color cells is usually unacceptable. To get a sense of the read and write speeds of your video card, you can run the benchmarks like: x11perf -getimage500, x11perf -putimage500, x11perf -shmput500 and for XFree86 displays with direct graphics access the dga command (press "b" to run the benchmark and then after a few seconds press "q" to quit). Even - this "dd if=/dev/fb0 of=/dev/null" often gives a good estimate. + this "dd if=/dev/fb0 of=/dev/null" often gives a good estimate. We + have seen a few cases where the hardware fb read speed is greater + than 65 MB/sec: on high end graphics workstations from SGI and + Sun, and also from a Linux user using nvidia proprietary drivers + for his nvidia video card. If you have a card with a fast read + speed please send us the details. On XFree86 it is actually possible to increase the framebuffer read speed considerably (5-100 times) by using the Shadow Framebuffer (a copy of the framebuffer is kept in main memory and @@ -724,10 +749,10 @@ make * Somewhat surprisingly, the X11 mouse (cursor) shape is write-only and cannot be queried from the X server. So in x11vnc the cursor shape stays fixed at an arrow. (see the "-cursor X" and "-cursor - some" [65]options, however, for a partial hack for the root + some" [71]options, however, for a partial hack for the root window, etc.). Also, on Solaris using the SUN_OVL overlay extension, x11vnc can show the correct mouse cursor when the - [66]-overlay option is also supplied. A similar thing is done on + [72]-overlay option is also supplied. A similar thing is done on IRIX as well when -overlay is supplied. As of Dec/2004 x11vnc supports the XFIXES extension (in Xorg and Solaris 10) to query the X server for the exact cursor shape, this works pretty well @@ -742,9 +767,9 @@ make Evidently a timing related bug and difficult to reproduce... * Using -threads can expose some bugs in libvncserver. - Please feel free to [67]contact me if you have any questions, + Please feel free to [73]contact me if you have any questions, problems, or comments about x11vnc, etc. - Also, some people ask if they can make a donation, see [68]this link + Also, some people ask if they can make a donation, see [74]this link for that. _________________________________________________________________ @@ -753,279 +778,282 @@ make [Building and Starting] - [69]Q-1: I can't get x11vnc to start up. It says "XOpenDisplay failed + [75]Q-1: I can't get x11vnc to start up. It says "XOpenDisplay failed (null)" or "Xlib: connection to ":0.0" refused by server Xlib: No protocol specified" and then exits. What do I need to do? - [70]Q-2: I can't get x11vnc and/or libvncserver to compile. + [76]Q-2: I can't get x11vnc and/or libvncserver to compile. - [71]Q-3: I just built x11vnc successfully, but when I use it my + [77]Q-3: I just built x11vnc successfully, but when I use it my keystrokes and mouse button clicks are ignored (I am able to move the mouse though). - [72]Q-4: Help, I need to run x11vnc on Solaris 2.5.1 (or other old + [78]Q-4: Help, I need to run x11vnc on Solaris 2.5.1 (or other old Unix/Linux) and it doesn't compile! - [73]Q-5: Where can I get a precompiled x11vnc binary for my Operating + [79]Q-5: Where can I get a precompiled x11vnc binary for my Operating System? - [74]Q-6: Where can I get a VNC Viewer binary (or source code) for the + [80]Q-6: Where can I get a VNC Viewer binary (or source code) for the Operating System I will be viewing from? - [75]Q-7: How can I see all of x11vnc's command line options and + [81]Q-7: How can I see all of x11vnc's command line options and documentation on how to use them? - [76]Q-8: I don't like typing arcane command line options every time I + [82]Q-8: I don't like typing arcane command line options every time I start x11vnc. What can I do? Is there a config file? Or a GUI? - [77]Q-9: Can I make x11vnc more quiet and also go into the background + [83]Q-9: Can I make x11vnc more quiet and also go into the background after starting up? - [78]Q-10: Sometimes when a VNC viewer dies abruptly, x11vnc also dies + [84]Q-10: Sometimes when a VNC viewer dies abruptly, x11vnc also dies with the error message like: "Broken pipe". I'm using the -forever mode and I want x11vnc to keep running. - [79]Q-11: Are there any build-time customizations possible, e.g. + [85]Q-11: Are there any build-time customizations possible, e.g. change defaults, create a smaller binary, etc? [Win2VNC Related] - [80]Q-12: I have two separate machine displays in front of me, one + [86]Q-12: I have two separate machine displays in front of me, one Windows the other X11: can I use x11vnc in combination with Win2VNC in dual-screen mode to pass the keystrokes and mouse motions to the X11 display? - [81]Q-13: I am running Win2VNC on my Windows machine and "x11vnc + [87]Q-13: I am running Win2VNC on my Windows machine and "x11vnc -nofb" on Unix to pass keyboard and mouse to the Unix monitor. Whenever I start Win2VNC it quickly disconnects and x11vnc says: rfbProcessClientNormalMessage: read: Connection reset by peer [Color Issues] - [82]Q-14: The X display I run x11vnc on is only 8 bits per pixel (bpp) + [88]Q-14: The X display I run x11vnc on is only 8 bits per pixel (bpp) PseudoColor (i.e. only 256 distinct colors). The x11vnc colors may start out OK, but after a while they are incorrect in certain windows. - [83]Q-15: Color problems: Why are the colors for some windows messed + [89]Q-15: Color problems: Why are the colors for some windows messed up in x11vnc? BTW, my X display has nice overlay/multi-depth visuals of different color depths: e.g. there are both depth 8 and 24 visuals available at the same time. - [84]Q-16: How do I figure out the window id to supply to the -id + [90]Q-16: How do I figure out the window id to supply to the -id windowid option? - [85]Q-17: Why don't menus or other transient windows come up when I am + [91]Q-17: Why don't menus or other transient windows come up when I am using the -id windowid option to view a single application window? - [86]Q-18: My X display is depth 24 at 24bpp (instead of the normal + [92]Q-18: My X display is depth 24 at 24bpp (instead of the normal depth 24 at 32bpp). I'm having lots of color and visual problems with x11vnc and/or vncviewer. What's up? [Xterminals] - [87]Q-19: Can I use x11vnc to view and interact with an Xterminal + [93]Q-19: Can I use x11vnc to view and interact with an Xterminal (e.g. NCD) that is not running UNIX and so x11vnc cannot be run on it directly? - [88]Q-20: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for + [94]Q-20: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for a Unix/Linux machine acting as an Xterminal? [Remote Control] - [89]Q-21: How do I stop x11vnc once it is running in the background? + [95]Q-21: How do I stop x11vnc once it is running in the background? - [90]Q-22: Can I change settings in x11vnc without having to restart + [96]Q-22: Can I change settings in x11vnc without having to restart it? Can I remote control it? [Security and Permissions] - [91]Q-23: How do I create a VNC password for use with x11vnc? + [97]Q-23: How do I create a VNC password for use with x11vnc? - [92]Q-24: Can I have two passwords for VNC viewers, one for full + [98]Q-24: Can I have two passwords for VNC viewers, one for full access and the other for view-only access to the display? - [93]Q-25: Can I fine tune what types of user input are allowed? E.g. + [99]Q-25: Can I fine tune what types of user input are allowed? E.g. have some users just be able to move the mouse, but not click or type anything? - [94]Q-26: Why does x11vnc exit as soon as the VNC viewer disconnects? + [100]Q-26: Why does x11vnc exit as soon as the VNC viewer disconnects? And why doesn't it allow more than one VNC viewer to connect at the same time? - [95]Q-27: Can I limit which machines incoming VNC clients can connect + [101]Q-27: Can I limit which machines incoming VNC clients can connect from? - [96]Q-28: How do I build x11vnc/libvncserver with libwrap + [102]Q-28: How do I build x11vnc/libvncserver with libwrap (tcp_wrappers) support? - [97]Q-29: Can I have x11vnc only listen on one network interface (e.g. - internal LAN) rather than having it listen on all network interfaces - and relying on -allow to filter unwanted connections out? + [103]Q-29: Can I have x11vnc only listen on one network interface + (e.g. internal LAN) rather than having it listen on all network + interfaces and relying on -allow to filter unwanted connections out? - [98]Q-30: Now that -localhost implies listening only on the loopback + [104]Q-30: Now that -localhost implies listening only on the loopback interface, how I can occasionally allow in a non-localhost via the allowonce remote control command? - [99]Q-31: How can I tunnel my connection to x11vnc via an encrypted + [105]Q-31: How can I tunnel my connection to x11vnc via an encrypted SSH channel between two Unix machines? - [100]Q-32: How can I tunnel my connection to x11vnc via an encrypted + [106]Q-32: How can I tunnel my connection to x11vnc via an encrypted SSH channel from Windows using an SSH client like Putty? - [101]Q-33: Can I prompt the user at the local X display whether the + [107]Q-33: Can I prompt the user at the local X display whether the incoming VNC client should be accepted or not? Can I decide to make some clients view-only? How about running an arbitrary program to make the decisions? - [102]Q-34: Does x11vnc support Unix usernames and passwords? Can I + [108]Q-34: Does x11vnc support Unix usernames and passwords? Can I further limit the set of Unix usernames who can connect to the VNC desktop? - [103]Q-35: I start x11vnc as root because it is launched via inetd(1) + [109]Q-35: I start x11vnc as root because it is launched via inetd(1) or a display manager like gdm(1). Can I have x11vnc later switch to a different user? - [104]Q-36: I use a screen-lock when I leave my workstation (e.g. + [110]Q-36: I use a screen-lock when I leave my workstation (e.g. xscreensaver or xlock). When I remotely access my workstation desktop via x11vnc I can unlock the desktop fine, but I am worried people will see my activities on the physical monitor. What can I do to prevent this, or at least make it more difficult? - [105]Q-37: Can I have x11vnc automatically lock the screen when I + [111]Q-37: Can I have x11vnc automatically lock the screen when I disconnect the VNC viewer? [Display Managers and Services] - [106]Q-38: How can I run x11vnc as a "service" that is always + [112]Q-38: How can I run x11vnc as a "service" that is always available? - [107]Q-39: How can I use x11vnc to connect to an X login screen like + [113]Q-39: How can I use x11vnc to connect to an X login screen like xdm, GNOME gdm, KDE kdm, or CDE dtlogin? (i.e. nobody is logged into an X session yet). - [108]Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? + [114]Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? - [109]Q-41: How do I make x11vnc work with the Java VNC viewer applet + [115]Q-41: How do I make x11vnc work with the Java VNC viewer applet in a web browser? - [110]Q-42: Are reverse connections (i.e. the VNC server connecting to + [116]Q-42: Are reverse connections (i.e. the VNC server connecting to the VNC viewer) using "vncviewer -listen" and vncconnect(1) supported? - [111]Q-43: Can I use x11vnc as a replacement for Xvnc? (i.e. not for a + [117]Q-43: Can I use x11vnc as a replacement for Xvnc? (i.e. not for a real display, but for a virtual one I keep around). - [112]Q-44: How can I use x11vnc on "headless" machines? Why might I + [118]Q-44: How can I use x11vnc on "headless" machines? Why might I want to? [Resource Usage and Performance] - [113]Q-45: I have lots of memory, but why does x11vnc fail with + [119]Q-45: I have lots of memory, but why does x11vnc fail with shmget: No space left on device or Minor opcode of failed request: 1 (X_ShmAttach)? - [114]Q-46: How can I make x11vnc use less system resources? + [120]Q-46: How can I make x11vnc use less system resources? - [115]Q-47: How can I make x11vnc use MORE system resources? + [121]Q-47: How can I make x11vnc use MORE system resources? - [116]Q-48: I use x11vnc over a slow link with high latency (e.g. + [122]Q-48: I use x11vnc over a slow link with high latency (e.g. dialup modem), is there anything I can do to speed things up? - [117]Q-49: When I drag windows around with the mouse or scroll up and + [123]Q-49: Does x11vnc support the X DAMAGE Xserver extension to find + modified regions of the screen quickly and efficiently? + + [124]Q-50: 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? - [118]Q-50: Why not do something like wireframe animations to avoid the + [125]Q-51: Why not do something like wireframe animations to avoid the windows "lurching" when being moved or resized? - [119]Q-51: Does x11vnc support the X DAMAGE Xserver extension to find - modified regions of the screen quickly and efficiently? - + [126]Q-52: Can x11vnc try to apply heuristics to detect when an window + is scrolling its contents and use the CopyRect encoding for a speedup? + [Mouse Cursor Shapes] - [120]Q-52: Why isn't the mouse cursor shape (the little icon shape + [127]Q-53: Why isn't the mouse cursor shape (the little icon shape where the mouse pointer is) correct as I move from window to window? - [121]Q-53: When using XFIXES cursorshape mode, some of the cursors + [128]Q-54: When using XFIXES cursorshape mode, some of the cursors look really bad with extra black borders around the cursor and other cruft. How can I improve their appearance? - [122]Q-54: In XFIXES mode, are there any hacks to handle cursor + [129]Q-55: In XFIXES mode, are there any hacks to handle cursor transparency ("alpha channel") exactly? [Mouse Pointer] - [123]Q-55: Why does the mouse arrow just stay in one corner in my + [130]Q-56: Why does the mouse arrow just stay in one corner in my vncviewer, whereas my cursor (that does move) is just a dot? - [124]Q-56: Can I take advantage of the TightVNC extension to the VNC + [131]Q-57: Can I take advantage of the TightVNC extension to the VNC protocol where Cursor Positions Updates are sent back to all connected clients (i.e. passive viewers can see the mouse cursor being moved around by another viewer)? - [125]Q-57: Is it possible to swap the mouse buttons (e.g. left-handed + [132]Q-58: 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? [Keyboard Issues] - [126]Q-58: How can I get my AltGr and Shift modifiers to work between + [133]Q-59: How can I get my AltGr and Shift modifiers to work between keyboards for different languages? - [127]Q-59: When I try to type a "<" (i.e. less than) instead I get ">" + [134]Q-60: When I try to type a "<" (i.e. less than) instead I get ">" (i.e. greater than)! Strangely, typing ">" works OK!! - [128]Q-60: I'm using an "international" keyboard (e.g. German "de", or + [135]Q-61: I'm using an "international" keyboard (e.g. German "de", or Danish "dk") and the -modtweak mode works well if the VNC viewer is run on a Unix/Linux machine with a similar keyboard. But if I run the VNC viewer on Unix/Linux with a different keyboard (e.g. "us") or Windows with any keyboard, I can't type some keys like: "@", "$", "<", ">", etc. How can I fix this? - [129]Q-61: When typing I sometimes get double, triple, or more of my + [136]Q-62: When typing I sometimes get double, triple, or more of my keystrokes repeated. I'm sure I only typed them once, what can I do? - [130]Q-62: The x11vnc -norepeat mode is in effect, but I still get + [137]Q-63: The x11vnc -norepeat mode is in effect, but I still get repeated keystrokes!! - [131]Q-63: The machine where I run x11vnc has an AltGr key, but the + [138]Q-64: The machine where I run x11vnc has an AltGr key, but the local 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? - [132]Q-64: I have a Sun machine I run x11vnc on. Its Sun keyboard has + [139]Q-65: I have a Sun machine I run x11vnc on. Its Sun keyboard has just one Alt key labelled "Alt" and two Meta keys labelled with little diamonds. The machine where I run the VNC viewer only has Alt keys. How can I send a Meta keypress? (e.g. emacs needs this) - [133]Q-65: Can I map a keystroke to a mouse button click on the remote + [140]Q-66: Can I map a keystroke to a mouse button click on the remote machine? [Screen Related Issues and Features] - [134]Q-66: The remote display is larger (in number of pixels) than the + [141]Q-67: The remote display is larger (in number of pixels) than the local display I am running the vncviewer on. I don't like the vncviewer scrollbars, what I can do? - [135]Q-67: Does x11vnc support server-side framebuffer scaling? (E.g. + [142]Q-68: Does x11vnc support server-side framebuffer scaling? (E.g. to make the desktop smaller). - [136]Q-68: Does x11vnc work with Xinerama? (i.e. multiple monitors + [143]Q-69: Does x11vnc work with Xinerama? (i.e. multiple monitors joined together to form one big, single screen). - [137]Q-69: Can I use x11vnc on a multi-headed display that is not + [144]Q-70: Can I use x11vnc on a multi-headed display that is not Xinerama (i.e. separate screens :0.0, :0.1, ... for each monitor)? - [138]Q-70: Can x11vnc show only a portion of the display? (E.g. for a + [145]Q-71: Can x11vnc show only a portion of the display? (E.g. for a special purpose rfb application). - [139]Q-71: Does x11vnc support the XRANDR (X Resize, Rotate and + [146]Q-72: Does x11vnc support the XRANDR (X Resize, Rotate and Reflection) extension? Whenever I rotate or resize the screen x11vnc just seems to crash. - [140]Q-72: Why is the view in my VNC viewer completely black? Or why + [147]Q-73: Why is the view in my VNC viewer completely black? Or why is everything flashing around randomly? - [141]Q-73: I use Linux Virtual Consoles (VC's) to implement 'Fast User + [148]Q-74: I use Linux Virtual Consoles (VC's) to implement 'Fast User Switching' between users' sessions (e.g. Betty is on Ctrl-Alt-F7, Bobby is on Ctrl-Alt-F8, and Sid is on Ctrl-Alt-F1: they use those keystrokes to switch between their sessions). How come the view in a @@ -1033,12 +1061,12 @@ make otherwise all messed up unless the X session x11vnc is attached to is in the active VC? - [142]Q-74: Can I use x11vnc to view my VMWare session remotely? + [149]Q-75: Can I use x11vnc to view my VMWare session remotely? - [143]Q-75: Can non-X devices (e.g. a raw framebuffer) be viewed and/or + [150]Q-76: Can non-X devices (e.g. a raw framebuffer) be viewed and/or controlled by x11vnc? - [144]Q-76: I am using x11vnc where my local machine has "popup/hidden + [151]Q-77: I am using x11vnc where my local machine has "popup/hidden taskbars" (e.g. GNOME or MacOS X) and the remote display where x11vnc runs also has "popup/hidden taskbars" (e.g. GNOME). When I move the mouse to the edge of the screen where the popups happen, the taskbars @@ -1046,13 +1074,13 @@ make [Misc: Clipboard, Beeps, Thanks, etc.] - [145]Q-77: Does the Clipboard/Selection get transferred between the + [152]Q-78: Does the Clipboard/Selection get transferred between the vncviewer and the X display? - [146]Q-78: Why don't I hear the "Beeps" in my X session (e.g. when + [153]Q-79: Why don't I hear the "Beeps" in my X session (e.g. when typing tput bel in an xterm)? - [147]Q-79: Thanks for your program and for your help! Can I make a + [154]Q-80: Thanks for your program and for your help! Can I make a donation? _________________________________________________________________ @@ -1065,7 +1093,7 @@ make For the former error, you need to specify the X display to connect to (it also needs to be on the same machine x11vnc is to run on). Set - your DISPLAY environment variable or use the [148]-display option to + your DISPLAY environment variable or use the [155]-display option to specify it. Nearly always the correct value will be ":0" For the latter error, you need to set up the X11 permissions @@ -1081,21 +1109,26 @@ make How to Solve: See the xauth(1), Xsecurity(7), and xhost(1) man pages for much info on X11 permissions. For example, you may need to set - your XAUTHORITY environment variable or use the [149]-auth option to + your XAUTHORITY environment variable or use the [156]-auth option to point to the correct cookie file (e.g. /home/joe/.Xauthority or /var/gdm/:0.Xauth), or simply be sure you run x11vnc as the correct - user (i.e. the user who owns the X session you wish to view). Running - x11vnc as root is not enough: you need to know where the XAUTHORITY - file for the desired X display is. Example: + user (i.e. the user who owns the X session you wish to view). If sshd + has set XAUTHORITY to point to a random file it has created for X + forwarding that will cause problems. Running x11vnc as root is not + enough: you need to know where the XAUTHORITY file for the desired X + display is. Example: x11vnc -display :0 -auth /var/gdm/:0.Xauth + (this is for the display manager gdm, see [157]this faq for other + display manager cookie file names). + Less safe, but to avoid figuring out where the XAUTHORITY file is, if the person sitting at the X session types "xhost +localhost" then one should be able to attach x11vnc to the session (from the same machine). The person could then type "xhost -localhost" after x11vnc has connected to go back to the default permissions. Also, for some situations the "-users lurk=" option may be of use (please read the - documentation on the [150]-users option). + documentation on the [158]-users option). To test out your X11 permissions from a remote shell, set DISPLAY and possibly XAUTHORITY (see your shell's man page, bash(1), tcsh(1), on @@ -1207,7 +1240,7 @@ h earlier and perhaps non-Solaris): First use the environment settings (CPPFLAGS, LDFLAGS, etc.) in the - above [151]Solaris build script to run the configure command. That + above [159]Solaris build script to run the configure command. That should succeed without failure. Then you have to hand edit the autogenerated rfb/rfbconfig.h file in the source tree, and just before the last #endif at the bottom of that file insert these workaround @@ -1233,7 +1266,7 @@ typedef unsigned int in_addr_t; on other older OS (Solaris, Linux, ...) releases. Here are some notes for similar steps that need to be done to build on - [152]SunOS 4.x + [160]SunOS 4.x Please let us know if you had to use the above workaround (and whether it worked or not). If there is enough demand we will try to push clean @@ -1243,20 +1276,20 @@ typedef unsigned int in_addr_t; Q-5: Where can I get a precompiled x11vnc binary for my Operating System? - Hopefully the [153]build steps above and [154]FAQ provide enough info + Hopefully the [161]build steps above and [162]FAQ provide enough info for a painless compile for most environments. Please report problems with the x11vnc configure, make, etc. on your system (if your system is known to compile other GNU packages successfully). There are precompiled x11vnc binaries built by other groups that are available at the following locations: - Debian: (.deb) [155]http://packages.debian.org/x11vnc + Debian: (.deb) [163]http://packages.debian.org/x11vnc - Slackware: (.tgz) [156]http://www.linuxpackages.net/ Redhat/Fedora: - (.rpm) [157]http://dag.wieers.com/packages/x11vnc/ SuSE: (.rpm) - [158]http://linux01.gwdg.de/~pbleser/ Solaris: (pkg) - [159]http://www.sunfreeware.com/ wwexptools: (.tgz) - [160]http://www.bell-labs.com/project/wwexptools/packages.html The + Slackware: (.tgz) [164]http://www.linuxpackages.net/ Redhat/Fedora: + (.rpm) [165]http://dag.wieers.com/packages/x11vnc/ SuSE: (.rpm) + [166]http://linux01.gwdg.de/~pbleser/ Solaris: (pkg) + [167]http://www.sunfreeware.com/ wwexptools: (.tgz) + [168]http://www.bell-labs.com/project/wwexptools/packages.html The last one, wwexptools, provides a variety of Unix binaries (Linux, Solaris, HP-UX, IRIX, ...) with the intent of being compatible on a wide range of OS releases. Find x11vnc near the bottom of that page @@ -1268,13 +1301,13 @@ typedef unsigned int in_addr_t; this by looking at the x11vnc output and if it says the encoding for a client is "hextile" then likely the fast compression encodings are missing. If you want optimal performance on your OS, you should see - the [161]build notes above for where to download libz and libjpeg, and + the [169]build notes above for where to download libz and libjpeg, and then build everything with gcc. For Solaris, the http://www.sunfreeware.com/ packages are built with libz and libjpeg. If the above binaries don't work and building x11vnc on your OS fails (and all else fails!) you can try one of my motley collection of - [162]test binaries. Some may be old, some may have extra debugging + [170]test binaries. Some may be old, some may have extra debugging output, etc. One of them may work on your OS... As a general note, the x11vnc program is simple enough you don't @@ -1295,9 +1328,9 @@ typedef unsigned int in_addr_t; To obtain VNC viewers for the viewing side (Windows, Mac OS, or Unix) try here: - * [163]http://www.tightvnc.com/download.html - * [164]http://www.realvnc.com/download-free.html - * [165]http://sourceforge.net/projects/cotvnc/ + * [171]http://www.tightvnc.com/download.html + * [172]http://www.realvnc.com/download-free.html + * [173]http://sourceforge.net/projects/cotvnc/ Q-7: How can I see all of x11vnc's command line options and @@ -1305,7 +1338,7 @@ typedef unsigned int in_addr_t; Run: x11vnc -opts to list just the option names or run: x11vnc -help for long descriptions about each option. The output is listed - [166]here as well. + [174]here as well. Q-8: I don't like typing arcane command line options every time I @@ -1338,7 +1371,7 @@ display :0 GUI based on the remote-control functionality that was added. It's not particularly user-friendly, it just provides a point and click mode to set all the many x11vnc parameters and obtain help on them. See the - [167]-gui option for more info. Examples: "x11vnc ... -gui" and + [175]-gui option for more info. Examples: "x11vnc ... -gui" and "x11vnc ... -gui other:0" in the latter case the gui is displayed on other:0, not the X display x11vnc is polling. @@ -1346,11 +1379,11 @@ display :0 Q-9: Can I make x11vnc more quiet and also go into the background after starting up? - Use the [168]-q and [169]-bg options, respectively. (also: -quiet is + Use the [176]-q and [177]-bg options, respectively. (also: -quiet is an alias for -q) Note that under -bg the stderr messages will be lost unless you use - the "[170]-o logfile" option. + the "[178]-o logfile" option. Q-10: Sometimes when a VNC viewer dies abruptly, x11vnc also dies with @@ -1371,7 +1404,7 @@ display :0 As of Mar/2004 in the libvncserver cvs there are a few such options. They are enabled by adding something like -Dxxxx=1 to the CPPFLAGS - environment variable before running configure (see the [171]build + environment variable before running configure (see the [179]build notes for general background). * -DX11VNC_SHARED=1 make -shared the default. * -DX11VNC_FOREVER=1 make -forever the default. @@ -1418,21 +1451,21 @@ display :0 dual-screen mode to pass the keystrokes and mouse motions to the X11 display? - Yes, for best response start up x11vnc with the "[172]-nofb" option + Yes, for best response start up x11vnc with the "[180]-nofb" option (disables framebuffer polling, and does other optimizations) on the secondary display (X11) machine. Then start up Win2VNC on the primary display (Windows) referring it to the secondary display. - This will also work X11 to X11 using [173]x2vnc, however you would + This will also work X11 to X11 using [181]x2vnc, however you would probably just want to avoid VNC and use x2x for that. For reference, here are some links to Win2VNC-like programs for multiple monitor setups: - * [174]Original Win2VNC - * [175]Enhanced Win2VNC and [176]sourceforge link - * [177]x2vnc - * [178]x2x also [179]here - * [180]zvnc (MorphOS) + * [182]Original Win2VNC + * [183]Enhanced Win2VNC and [184]sourceforge link + * [185]x2vnc + * [186]x2x also [187]here + * [188]zvnc (MorphOS) All of them will work with x11vnc (except x2x where it is not needed). @@ -1452,7 +1485,7 @@ display :0 on your display to be depth 24 TrueColor? Sun machines often have 8+24 overlay/multi-depth visuals, and you can make the default visual depth 24 TrueColor (see fbconfig(1) and Xsun(1)). 2) As of Feb/2004, in the - libvncserver CVS, x11vnc has the [181]-visual option to allow you to + libvncserver CVS, x11vnc has the [189]-visual option to allow you to force the framebuffer visual to whatever you want (this usually messes up the colors unless you are very clever). In this case, the option provides a convenient workaround for the Win2VNC bug: @@ -1467,7 +1500,7 @@ display :0 PseudoColor (i.e. only 256 distinct colors). The x11vnc colors may start out OK, but after a while they are incorrect in certain windows. - Use the [182]-flashcmap option to have x11vnc watch for changes in the + Use the [190]-flashcmap option to have x11vnc watch for changes in the colormap, and propagate those changes back to connected clients. This can be slow (since the whole screen must be updated over the network whenever the colormap changes). This flashing colormap behavior often @@ -1476,7 +1509,7 @@ display :0 example of this. Consider reconfiguring the system to 16 bpp or depth 24 TrueColor if at all possible. - Also note that in some rare cases the [183]-notruecolor option has + Also note that in some rare cases the [191]-notruecolor option has corrected colors on 8bpp displays. The red, green, and blue masks were non-zero in 8bpp PseudoColor on an obscure setup, and this option corrected the problems. @@ -1487,10 +1520,10 @@ display :0 different color depths: e.g. there are both depth 8 and 24 visuals available at the same time. - You may want to review the [184]previous question regarding 8 bpp + You may want to review the [192]previous question regarding 8 bpp PseudoColor. - On some hardware (Sun/SPARC, Sgi), the [185]-overlay option discussed + On some hardware (Sun/SPARC, Sgi), the [193]-overlay option discussed a couple paragraphs down may solve this for you (you may want to skip to it directly). @@ -1528,7 +1561,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 [186]-overlay x11vnc option (Aug/2004) to have x11vnc use the + use the [194]-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 @@ -1550,7 +1583,7 @@ TrueColor defdepth 24 Colors still not working correctly? Run xwininfo on the application with the messed up 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 [187]-id option to + possible workaround in this case is to use the [195]-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). @@ -1558,7 +1591,7 @@ TrueColor defdepth 24 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 - [188]-overlay option works for Solaris machines with overlay visuals + [196]-overlay option works for Solaris machines with overlay visuals where most of this problem occurs. @@ -1569,13 +1602,13 @@ 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 [189]problems. + debugging x11vnc [197]problems. When using -id windowid, note that some VNC viewers will have problems rendering screens that have a width that is not a multiple of 4. Try to manually adjust the window width before starting x11vnc -id .... - Also, as of Dec/2004 libvncserver CVS you can use "[190]-id pick" to + Also, as of Dec/2004 libvncserver CVS you can use "[198]-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. @@ -1593,7 +1626,7 @@ TrueColor defdepth 24 be able to see these transient windows. If things are not working and you still want to do the single window - polling, try the [191]-sid windowid option ("shifted" windowid). + polling, try the [199]-sid windowid option ("shifted" windowid). x11vnc is known to crash under both -id and -sid, so both modes are still experimental. Please report any reproducible bugs. @@ -1646,15 +1679,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 [192]-display option to point the display to that of + machine. Use the [200]-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 [193]-noshm option (this enables the polling over + and also supply the [201]-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 [194]-flipbyteorder if the colors + the polling rate. You may also need [202]-flipbyteorder if the colors get messed up due to endian byte order differences. Q-20: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for a @@ -1678,7 +1711,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 - [195]-auth option to point to the correct file). Other options include + [203]-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 - @@ -1690,7 +1723,7 @@ TrueColor defdepth 24 details. If the display name in the cookie file needs to be changed between the - two hosts, see [196]this note on the "xauth add ..." command. + two hosts, see [204]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 @@ -1704,7 +1737,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 [197]poll + Not recommended, but as a last resort, you could have x11vnc [205]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...) @@ -1735,17 +1768,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 - [198]-remote and [199]-query options. To shut down the running x11vnc + [206]-remote and [207]-query options. To shut down the running x11vnc server just type "x11vnc -R stop". To disconnect all clients do "x11vnc -R disconnect:all", etc. - For older versions: If the [200]-forever option has not been supplied, + For older versions: If the [208]-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 [201]-bg option + If you have not put x11vnc in the background via the [209]-bg option or shell & operator, then simply press Ctrl-C in the shell where x11vnc is running to stop it. Potential Gotcha: If somehow your Keypress of Ctrl-C went through x11vnc to the Xserver that then @@ -1754,14 +1787,14 @@ TrueColor defdepth 24 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 [202]-clear_mods option and [203]-clear_keys + Alt. Alternatively, the [210]-clear_mods option and [211]-clear_keys option can be used to release pressed keys at startup and exit. Q-22: Can I change settings in x11vnc without having to restart it? Can I remote control it? - Look at the [204]-remote (same as -R) and [205]-query (same as -Q) + Look at the [212]-remote (same as -R) and [213]-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 @@ -1773,7 +1806,7 @@ TrueColor defdepth 24 be possible. There is also a simple tcl/tk gui based on this remote control - mechanism. See the [206]-gui option for more info. + mechanism. See the [214]-gui option for more info. [Security and Permissions] @@ -1785,12 +1818,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" [207]option, which is the the same + the -storepasswd "pass" "file" [215]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: [208]-rfbauth + You then use the password via the x11vnc option: [216]-rfbauth $HOME/myvncpasswd Compared to vncpasswd(1) the latter two methods are a somewhat unsafe @@ -1799,7 +1832,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 [209]-passwdfile and -passwd/-viewpasswd plain + x11vnc also has the [217]-passwdfile and -passwd/-viewpasswd plain text (i.e. not obscured like the -rfbauth VNC passwords) password options. @@ -1808,13 +1841,13 @@ TrueColor defdepth 24 and the other for view-only access to the display? Yes, as of May/2004 in the libvncserver CVS there is the - [210]-viewpasswd option to supply the view-only password. Note the - full-access password option [211]-passwd must be supplied at the same + [218]-viewpasswd option to supply the view-only password. Note the + full-access password option [219]-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 - [212]-passwdfile option to specify a file containing plain text + [220]-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 @@ -1822,7 +1855,7 @@ TrueColor defdepth 24 it is taken as the view-only password. (use "__EMPTY__" to supply an empty one). - View-only passwords currently do not work for the [213]-rfbauth + View-only passwords currently do not work for the [221]-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 @@ -1836,7 +1869,7 @@ TrueColor defdepth 24 some users just be able to move the mouse, but not click or type anything? - As of Feb/2005, the [214]-input option allows you to do this. "K", + As of Feb/2005, the [222]-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 @@ -1852,15 +1885,15 @@ TrueColor defdepth 24 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 [215]-forever option (aka -many) to have + periods of time. Use the [223]-forever option (aka -many) to have x11vnc wait for more connections after the first client disconnects. - Use the [216]-shared option to have x11vnc allow multiple clients to + Use the [224]-shared option to have x11vnc allow multiple clients to connect simultaneously. - Recommended additional safety measures include using ssh ([217]see + Recommended additional safety measures include using ssh ([225]see above), stunnel, or a VPN to authenticate and encrypt the viewer - connections or to at least use the -rfbauth passwd-file [218]option to - use VNC password protection (or [219]-passwdfile) It is up to you to + connections or to at least use the -rfbauth passwd-file [226]option to + use VNC password protection (or [227]-passwdfile) It is up to you to apply these security measures, they will not be done for you automatically. @@ -1868,7 +1901,7 @@ TrueColor defdepth 24 Q-27: Can I limit which machines incoming VNC clients can connect from? - Yes, look at the [220]-allow and [221]-localhost options to limit + Yes, look at the [228]-allow and [229]-localhost options to limit connections by hostname or IP address. E.g. x11vnc -allow 192.168.0.1,192.168.0.2 @@ -1880,7 +1913,7 @@ TrueColor defdepth 24 Note that -localhost is the same as "-allow 127.0.0.1" For more control, build libvncserver with libwrap support - [222](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5) + [230](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5) for complete details. @@ -1900,7 +1933,7 @@ TrueColor defdepth 24 is "vnc", e.g.: vnc: 192.168.100.3 .example.com - Note that if you run x11vnc out of [223]inetd you do not need to build + Note that if you run x11vnc out of [231]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. @@ -1909,16 +1942,16 @@ TrueColor defdepth 24 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 "[224]-listen + As of Mar/2005 in the libvncserver CVS, there is the "[232]-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 "[225]-allow host1,..." option to allow only specific hosts + use the "[233]-allow host1,..." option to allow only specific hosts in. This option is useful if you want insure that no one can even begin a dialog with x11vnc from untrusted network interfaces (e.g. ppp0). The - option [226]-localhost now implies "-listen localhost" since that is + option [234]-localhost now implies "-listen localhost" since that is what most people expect it to do. @@ -1926,24 +1959,24 @@ TrueColor defdepth 24 interface, how I can occasionally allow in a non-localhost via the allowonce remote control command? - To do this specify "[227]-allow localhost". Unlike [228]-localhost + To do this specify "[235]-allow localhost". Unlike [236]-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 - ([229]-listen option) via remote control or gui, you may need to also - manually adjust the [230]-allow list if you unexpectedly get into a + ([237]-listen option) via remote control or gui, you may need to also + manually adjust the [238]-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 [231]-localhost on + in on the listening interface. If you just toggle [239]-localhost on and off x11vnc should see to it that you never get into such a state. Q-31: 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 [232]how to tunnel VNC via + See the description earlier on this page on [240]how to tunnel VNC via SSH from Unix to Unix. A number of ways are described along with some issues you may encounter. @@ -1954,7 +1987,7 @@ TrueColor defdepth 24 Q-32: How can I tunnel my connection to x11vnc via an encrypted SSH channel from Windows using an SSH client like Putty? - [233]Above we described how to tunnel VNC via SSH from Unix to Unix, + [241]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 @@ -1977,8 +2010,8 @@ TrueColor defdepth 24 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 [234]-localhost - and [235]-rfbauth/[236]-passwdfile options. + For extra protection feel free to run x11vnc with the [242]-localhost + and [243]-rfbauth/[244]-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 @@ -1987,9 +2020,9 @@ TrueColor defdepth 24 you'll need to do a second login (ssh or rsh) to the workstation machine 'otherhost' and then start up x11vnc on it. - As discussed [237]above another option is to first start the VNC + As discussed [245]above another option is to first start the VNC viewer in "listen" mode, and then launch x11vnc with the - "[238]-connect localhost" option to establish the reverse connection. + "[246]-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). @@ -2000,7 +2033,7 @@ TrueColor defdepth 24 some clients view-only? How about running an arbitrary program to make the decisions? - Yes, look at the "[239]-accept command" option, it allows you to + Yes, look at the "[247]-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 @@ -2019,7 +2052,7 @@ TrueColor defdepth 24 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 [240]-viewonly option has been + mouse on the "View" button. If the [248]-viewonly option has been supplied, the "View" action will not be present: the whole display is view only in that case. @@ -2035,7 +2068,7 @@ TrueColor defdepth 24 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 [241]ftp://ftp.x.org/ + is available at [249]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 @@ -2074,7 +2107,7 @@ elif [ $rc = 4 ]; then fi exit 1 - Stefan Radman has written a nice dtksh script [242]dtVncPopup for use + Stefan Radman has written a nice dtksh script [250]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. @@ -2083,7 +2116,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 "[243]-gone + To run a command when a client disconnects, use the "[251]-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 @@ -2098,13 +2131,13 @@ exit 1 such support. One approximate method involves starting x11vnc with the - [244]-localhost option. This basically requires the viewer user to log + [252]-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 [245]elsewhere on this page. Of course a malicious user + mentioned [253]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 @@ -2113,7 +2146,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 [246]-accept option that runs a program to examine + involves using the [254]-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 @@ -2146,7 +2179,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 [247]-users option that allows things + As of Feb/2005 x11vnc has the [255]-users option that allows things like this. Please read the documentation on it (in the x11vnc -help output) carefully for features and caveats. It's use can often decrease security unless care is taken. A nice use of it is "-users @@ -2167,7 +2200,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 [248]blockdpy.c The idea behind it is simple (but + source for it is [256]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 @@ -2183,8 +2216,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 [249]-accept option and told - to exit via the [250]-gone option (the vnc client user should + The blockdpy utility is launched by the [257]-accept option and told + to exit via the [258]-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. @@ -2192,7 +2225,7 @@ exit 1 # reject it Q-37: Can I have x11vnc automatically lock the screen when I disconnect the VNC viewer? - Yes, a user mentions he uses the [251]-gone option under CDE to run a + Yes, a user mentions he uses the [259]-gone option under CDE to run a screen lock program: x11vnc -display :0 -forever -gone 'dtaction LockDisplay' @@ -2215,11 +2248,11 @@ exit 1 # reject it permissions to connect to the X display. Here are some ideas: - * Use the description under "Continuously" in the [252]FAQ on x11vnc + * Use the description under "Continuously" in the [260]FAQ on x11vnc and Display Managers - * Use the description in the [253]FAQ on x11vnc and inetd(1) + * Use the description in the [261]FAQ on x11vnc and inetd(1) * Start x11vnc from your $HOME/.xsession (or $HOME/.xinitrc) - * Although less reliable, see the [254]x11vnc_loop rc.local hack + * Although less reliable, see the [262]x11vnc_loop rc.local hack below. The display manager scheme will not be specific to which user has the @@ -2250,7 +2283,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 [255]-auth option sets the XAUTHORITY variable for you). + (the [263]-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 @@ -2275,7 +2308,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 - [256]the example at the end of this FAQ). Then restart dtlogin, e.g.: + [264]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 @@ -2329,7 +2362,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 [257]full details + killed immediately after the user logs in. Here are [265]full details on how to configure gdm _________________________________________________________________ @@ -2371,13 +2404,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: [258]x11vnc_loop It will need some local + file like rc.local: [266]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 - [259]this FAQ. + [267]this FAQ. Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? @@ -2387,7 +2420,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 [260]-inetd + where the shell script /usr/local/bin/x11vnc_sh uses the [268]-inetd option and looks something like (you'll need to customize to your settings). #!/bin/sh @@ -2399,13 +2432,13 @@ rever -bg (otherwise the standard error also goes to the VNC vncviewer, and that confuses it greatly). 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 [261]-quiet) + stderr to a file, then you must specify the -q (aka [269]-quiet) option: "/usr/local/bin/x11vnc -q -inetd ..." or use "-o logfile" to collect the output in a file. The wrapper script with redirection to a log file is the recommended method because the errors and warnings printed out are very useful in troubleshooting problems. - Note also the need to set XAUTHORITY via [262]-auth to point to the + Note also the need to set XAUTHORITY via [270]-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 @@ -2453,7 +2486,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 [263]option: + that connect to it, run x11vnc with this [271]option: -httpdir /path/to/the/java/classes/dir (this directory will contain the files index.vnc and, for example, @@ -2483,7 +2516,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 [264]-connect option. To connect immediately + starts up x11vnc with the [272]-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 @@ -2491,7 +2524,7 @@ service x11vncservice hosts to connect to. To use the vncconnect(1) program (from the core VNC package at - www.realvnc.com) specify the [265]-vncconnect option to x11vnc (Note: + www.realvnc.com) specify the [273]-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 @@ -2533,7 +2566,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 - [266]-add_keysyms option to have keysyms added automatically. Also, to + [274]-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" @@ -2560,7 +2593,7 @@ xmodmap -e "add Control = Control_L Control_R" 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 [267]this FAQ) and access it from + display via x11vnc (e.g. see [275]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 @@ -2603,7 +2636,7 @@ xmodmap -e "add Control = Control_L Control_R" 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 [268]shm_clear to list and prompt for removal + Here is a shell script [276]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, @@ -2637,35 +2670,35 @@ ied) in /etc/system. See the next paragraph for more workarounds. To minimize the number of shm segments used by x11vnc try using the - [269]-onetile option (corresponds to only 3 shm segments used, and + [277]-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 - [270]-noshm option. Performance will be somewhat degraded but when + [278]-noshm option. Performance will be somewhat degraded but when done over local machine sockets it should be acceptable (see an - [271]earlier question discussing -noshm). + [279]earlier question discussing -noshm). Q-46: How can I make x11vnc use less system resources? - The [272]-nap and "[273]-wait n" (where n is the sleep between polls + The [280]-nap and "[281]-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. Using the - [274]-onetile option will use less memory and use fewer shared memory - slots (add [275]-fs 1.0 for one less slot). + [282]-onetile option will use less memory and use fewer shared memory + slots (add [283]-fs 1.0 for one less slot). Q-47: How can I make x11vnc use MORE system resources? - You can try [276]-threads and dial down the wait time (e.g. -wait 1) - and possibly dial down [277]-defer as well. Note that if you try to + You can try [284]-threads and dial down the wait time (e.g. -wait 1) + and possibly dial down [285]-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 [278]-id option) can be streamed over a LAN or wireless at + the x11vnc [286]-id option) can be streamed over a LAN or wireless at a reasonable frame rate. @@ -2681,7 +2714,7 @@ 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 - [279]-solid [color] option. + [287]-solid [color] option. * Configure your window manager or desktop "theme" to not use fancy images, shading, and gradients for the window decorations, etc. Disable Opaque moves, resizes, and animations. @@ -2697,7 +2730,7 @@ ied) worth it, but could be of use in some situations. VNC viewer parameters: - * Use a [280]TightVNC enabled viewer! + * Use a [288]TightVNC enabled viewer! * Make sure the tight encoding is being used (look at vncviewer and x11vnc outputs) * Request 8 bits per pixel using -bgr233 (up to 4X speedup over @@ -2715,34 +2748,77 @@ ied) vncviewer to be very slow) x11vnc parameters: - * Try using [281]-nodragging (no screen updates when dragging mouse, + * Try using [289]-nodragging (no screen updates when dragging mouse, but sometimes you miss visual feedback) - * Try the [282]-progressive pixelheight mode with the block + * Try the [290]-progressive pixelheight mode with the block pixelheight 100 or so (delays sending vertical blocks since they may change while viewer is receiving earlier ones) - * Set [283]-fs 1.0 (disables fullscreen updates) - * Try increasing [284]-wait or [285]-defer (reduces the maximum + * Set [291]-fs 1.0 (disables fullscreen updates) + * Try increasing [292]-wait or [293]-defer (reduces the maximum "frame rate", but won't help much for large screen changes) - * If you just want to watch one (simple) window use [286]-id (cuts + * If you just want to watch one (simple) window use [294]-id (cuts down extraneous polling and updates, but can be buggy or insufficient) - * Set [287]-nosel (disables all clipboard selection exchange) - * Use [288]-nocursor and [289]-nocursorpos (repainting the remote + * Set [295]-nosel (disables all clipboard selection exchange) + * Use [296]-nocursor and [297]-nocursorpos (repainting the remote cursor position and shape takes resources and round trips) - Q-49: When I drag windows around with the mouse or scroll up and down + Q-49: Does x11vnc support the X DAMAGE Xserver extension to find + modified regions of the screen quickly and efficiently? + + Yes, as of Mar/2005 in the libvncserver CVS x11vnc will use the X + DAMAGE extension by default if it is available on the display. This + requires libXdamage to be available in the build environment as well + (recent Linux distros and Solaris 10 have it). + + The DAMAGE extension enables the X server to report changed regions of + the screen back to x11vnc. So x11vnc doesn't have to guess where the + changes are (by polling the entire screen every 2-4 seconds). The use + of X DAMAGE dramatically reduces the load when the screen is not + changing very much (i.e. most of the time). It also noticeably + improves updates, especially for very small changed areas (e.g. clock + ticking, cursor flashing, typing, etc). + + 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 [298]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. + + Unfortunately the current Xorg DAMAGE extension implementation can at + times be overly cautious and report very large rectangles as "damaged" + even though only a small portion of the pixels have actually been + modified. This behavior is often the fault of the window manager (e.g. + it redraws the entire, unseen, frame window underneath the application + window when it gains focus), or the application itself (e.g. does + large, unnecessary repaints). + + To work around this deficiency, x11vnc currently only trusts small + 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 "[299]-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 "[300]-xd_mem f" may also be of use in tuning the + algorithm. To disable using DAMAGE entirely use "[301]-noxdamage". + + + Q-50: 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 slow 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 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 - [290]-pointer_mode option for more info. The next bottleneck is + This problem is primarily due to [302]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 + [303]-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 @@ -2752,29 +2828,30 @@ 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 "[291]-pointer_mode 1" option. + way via the "[304]-pointer_mode 1" option. - Also added was the [292]-nodragging option that disables all screen + Also added was the [305]-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 [293]-pointer_mode n option + As of Dec/2004 in the libvncserver CVS the [306]-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 [294]-threads option can improve + Also, in some circumstances the [307]-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). - See the [295]wireframe FAQ below for a scheme to sweep this problem - under the rug for window moves or resizes. + See the [308]wireframe FAQ and [309]scrollcopyrect FAQ below for + schemes to sweep this problem under the rug for window moves or + resizes and for some window scrolls. - Q-50: Why not do something like wireframe animations to avoid the + Q-51: Why not do something like wireframe animations to avoid the windows "lurching" when being moved or resized? Nice idea for a hack! As of Apr/2005 in the libvncserver CVS x11vnc by @@ -2785,25 +2862,26 @@ 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 [296]slow video - card read rates. 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. + of the intermediate steps. BTW the lurching is due to [310]slow video + card read rates (see [311]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. The mode is currently on by default because most people are inflicted - with the problem. It can be disabled with the [297]-nowireframe - option. 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 you - move the pointer. If your window-manager or desktop already does its - own wireframing then this mode is a waste of time and could do the + with the problem. It can be disabled with the [312]-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 + you move the pointer. If your window-manager or desktop already does + its own wireframing then this mode is a waste of time and could do the wrong thing occasionally. There may be other reasons the new mode feels unnatural. If you have very expensive video hardware (SGI) or are using an in-RAM video framebuffer (SunRay, ShadowFB, Xvfb), the read rate from that framebuffer may be very fast (100's of MB/sec) and so you don't really see much lurching: opaque moves look smooth in x11vnc. Note: ShadowFB is often turned on when you are using the - vesafb or fbdev XFree86 video driver instead of a native one. + vesafb or fbdev XFree86 video driver instead of a native one so you + might be using it already and not know. The heuristics used to guess window motion or resizing are simple, but are not fool proof: x11vnc is sometimes tricked and so you'll @@ -2831,13 +2909,13 @@ ied) * Maximum time to show a wireframe animation. * Minimum time between sending wireframe outlines. - See the [298]"-wireframe tweaks" option for more details. On a slow + See the [313]"-wireframe tweaks" option for more details. On a slow link, e.g. dialup modem, you may want to increase all four of these times, e.g. double them from the defaults. CopyRect encoding: In addition to the above there is the - [299]"-wirecopyrect mode" option. It is also on by default. This + [314]"-wirecopyrect mode" option. It is also on by default. This instructs x11vnc to not only show 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 @@ -2845,14 +2923,14 @@ ied) CopyRect encoding: the framebuffer update doesn't need to send the actual new image data. This is nice in general, and very convenient over a slow link, but since it is based on heuristics you may need to - disable it with the -nowirecopyrect option if it works incorrectly or - unnaturally for you. + disable it with the -nowirecopyrect option (aka -nowcr) if it works + incorrectly or unnaturally for you. The -wirecopyrect modes are: "never" (same as -nowirecopyrect); "top", only apply the CopyRect if the window is appears to be on the top of the window stack and is not obstructed by other windows; and "always" - to always try to apply the CopyRect (obstructed regions are clipped - off and not translated). + to always try to apply the CopyRect (obstructed regions are usually + clipped off and not translated). Note that some desktops (KDE and xfce) appear to mess with the window stacking in ways that are not yet clear. In these cases x11vnc works @@ -2863,55 +2941,140 @@ ied) Also, the CopyRect encoding may give incorrect results under -scale (depending on the scale factor the CopyRect operation is often only approximate: the correctly scaled framebuffer will be slightly - different from the translated one). Use -nowirecopyrect if this or - other painting errors are unacceptable. - - - Q-51: Does x11vnc support the X DAMAGE Xserver extension to find - modified regions of the screen quickly and efficiently? - - Yes, as of Mar/2005 in the libvncserver CVS x11vnc will use the X - DAMAGE extension by default if it is available on the display. This - requires libXdamage to be available in the build environment as well - (recent Linux distros and Solaris 10 have it). - - The DAMAGE extension enables the X server to report changed regions of - the screen back to x11vnc. So x11vnc doesn't have to guess where the - changes are (by polling the entire screen every 1 or 2 seconds). The - use of X DAMAGE dramatically reduces the load when the screen is not - changing very much (i.e. most of the time). It also noticeably - improves updates, especially for very small changed areas (e.g. clock - ticking, cursor flashing, typing, etc). - - 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 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. - - Unfortunately the current Xorg DAMAGE extension implementation can at - times be overly cautious and report very large rectangles as "damaged" - even though only a small portion of the pixels have actually been - modified. This behavior is often the fault of the window manager (e.g. - it redraws the entire, unseen, frame window underneath the application - window when it gains focus), or the application itself (e.g. does - large, unnecessary repaints). + different from the translated one). x11vnc will try to push a + "cleanup" update after the CopyRect if -scale is in effect. Use + -nowirecopyrect if this or other painting errors are unacceptable. + + + Q-52: Can x11vnc try to apply heuristics to detect when an window is + scrolling its contents and use the CopyRect encoding for a speedup? + + Another nice idea for a hack! As of May/2005 in the libvncserver CVS + x11vnc will by default apply heuristics to try to detect if the the + window that has the input focus is scrolling its contents (but only + when x11vnc is feeding user input (keystroke or pointer) to the X + server). So, when detected, scrolls induced by dragging on a scrollbar + or by typing (e.g. Up or Down arrows, hitting Return in a terminal + window, etc), will show up much more quickly than via the standard + x11vnc screen polling update mechanism. There will be a speedup for + both slow and fast links to viewers. For slow links the speedup is + mostly due to the CopyRect encoding not 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 + [315]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. + This extension is usually present on most X servers. On XFree86/Xorg + it can be enabled via Load "record" in the Module section of the + config file. + + Currently the RECORD extension is used as little as possible so as to + not slow down regular use. Only simple heuristics are applied to + detect XCopyArea and XConfigureWindow calls from the application. + These catch a lot of scrolls, e.g. in mozilla/firefox and in terminal + windows like gnome-terminal and xterm. Unfortunately the toolkits KDE + applications use make scroll detection less effective (only rarely are + they detected: i.e. Konqueror and Konsole don't work). An interesting + project, that may be the direction x11vnc takes, is to record all of + the X11 protocol from all clients and try to "tee" the stream into a + modified Xvfb watching for CopyRect and other VNC speedups. A + potential issue is the RECORD stream is delayed from actual view on + the X server display: if one falls too far behind it could become a + mess... + + The initial implementation of [316]-scrollcopyrect option is useful in + that it detects many scrolls and thus gives a much nicer working + environment (especially when combined with the [317]-wireframe + [318]-wirecopyrect [319]options, which are also on by default). The + fact that there aren't long delays or lurches during scrolling is the + primary improvement. But there are some drawbacks: + * Not all scrolls are detected. Some apps scroll windows in ways + that cannot currently be detected, and other times x11vnc "misses" + the scroll due to timeouts, etc. Sometimes it is more distracting + that a speedup occasionally doesn't work as opposed to being + consistently slow! + * For rapid scrolling (i.e. sequence of many scrolls over a short + period) there can be painting errors (tearing, bunching up, etc.) + during the scroll. These will repair themselves after the scroll + is over, but when they are severe it can be distracting. Try to + think of the approximate window contents as a quicker and more + useful "animation" compared to the slower polling scheme... + * Scrolling inside shells in terminal windows (gnome-terminal, + xterm), can lead to odd painting errors. This is because x11vnc + did not have time to detect a screen change just before the scroll + (most common is the terminal undraws the block cursor before + scrolling the text up: in the viewer you temporarily see multiple + block cursors). Another issue is with things like more(1): scroll + detection for 5-6 lines happens nicely, but then it can't keep up + and so there is a long pause for the standard polling method to + deliver the remaining updates. + * More rarely sometimes painting errors are not repaired after the + scroll is over. This may be a bug in x11vnc or libvncserver, or it + may be an inescapable fact of the CopyRect encoding and the delay + between RECORD callbacks and what is actually on the X display. + 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: [320]-fixscreen + * Some applications, notably OpenOffice, do XCopyArea scrolls in + weird ways that assume ancestor window clipping is taking place. + See the [321]-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 + because the scrollcopyrect scheme is watching for scrolls via + RECORD and has to wait for a timeout to occur before it does the + update. + * For reasons not yet understood the RECORD extension can stop + responding (and hence scrolls are missed). As a workaround x11vnc + attempts to reset the RECORD connection every 60 seconds or so. + Another workaround is to type 5 Super_L (Left Super/Windows-Flag + key) in a row to reset RECORD. Work is in progress to try to fix + this bug. + * Sometimes you need to "retrain" x11vnc for a certain window + 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 [322]-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 + involves a blending of nearby pixels and if you translate a pixel + the neighbor pixel weighting may be different. So you have to wait + a bit for the cleanup update to finish. On slow links x11vnc will + automatically decide to not detect scrolls when -scale is in + effect. In general it will also try to defer the cleanup update if + possible. + + If you find the -scrollcopyrect behavior too approximate or + distracting you can go back to the standard polling-only update method + with the [323]-noscrollcopyrect or -noscr for short. If you find some + extremely bad and repeatable behavior for -scrollcopyrect please + report a bug. + + Alternatively, as with -wireframe, there are many tuning parameters to + try to improve the situation. You can also access these parameters + inside the gui under "Tuning". These parameters can be tweaked: + * The minimum pixel area of a rectangle to be watched for scrolls. + * A list if application names to skip scroll detection. + * Which keystrokes should trigger scroll detection. + * Which applications should have a "terminal" tweak applied to them. + * When repeating keys (e.g. Up arrow) should be discarded to + preserve a scroll. + * Cutoffs for closeness to Top, Bottom, Left, and Right edges of + window for mouse induced scrolls. + * Set timeout parameters for keystroke induced scrolls. + * Set timeout parameters for mouse pointer induced scrolls. + * Have the full screen be periodically refreshed to fix painting + errors. - To work around this deficiency, x11vnc currently only trusts small - 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 "[300]-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 "[301]-xd_mem f" may also be of use in tuning the - algorithm. To disable using DAMAGE entirely use "[302]-noxdamage". [Mouse Cursor Shapes] - Q-52: Why isn't the mouse cursor shape (the little icon shape where + Q-53: Why isn't the mouse cursor shape (the little icon shape where the mouse pointer is) correct as I move from window to window? On X servers supporting XFIXES or Solaris/IRIX Overlay extensions it @@ -2925,16 +3088,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 "[303]-cursor X" option that + A simple kludge is provided by the "[324]-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 "[304]-cursor some" option for + work for those cases. Also see the "[325]-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 [305]-overlay option is supplied. See [306]this FAQ + cursor when the [326]-overlay option is supplied. See [327]this FAQ for more info. Also as of Dec/2004 in the libvncserver CVS XFIXES X extension support @@ -2942,7 +3105,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 [307]Solaris 10. + distros and [328]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 @@ -2950,10 +3113,10 @@ ied) 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. [308]Details can be found here. + under 32bpp. [329]Details can be found here. - Q-53: When using XFIXES cursorshape mode, some of the cursors look + Q-54: When using XFIXES cursorshape mode, some of the cursors look really bad with extra black borders around the cursor and other cruft. How can I improve their appearance? @@ -2983,17 +3146,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 "[309]-alphacut n" option lets + course!) some tunable parameters. The "[330]-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 "[310]-alphafrac f" option tries to correct individual + 240. The "[331]-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 [311]-alpharemove that is useful for + Finally, there is an option [332]-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 @@ -3001,7 +3164,7 @@ ied) value. - Q-54: In XFIXES mode, are there any hacks to handle cursor + Q-55: In XFIXES mode, are there any hacks to handle cursor transparency ("alpha channel") exactly? As of Jan/2005 in the CVS, libvncserver has been modified to allow an @@ -3009,11 +3172,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 [312]-nocursorshape x11vnc option. + disabled for all clients with the [333]-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 - [313]-noalphablend option to disable this behavior (always approximate + [334]-noalphablend option to disable this behavior (always approximate transparent cursors with opaque RGB values). The CursorShapeUpdates VNC extension complicates matters because the @@ -3038,12 +3201,12 @@ ied) [Mouse Pointer] - Q-55: Why does the mouse arrow just stay in one corner in my + Q-56: 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 [314]tightvnc extension + This default takes advantage of a [335]tightvnc extension (CursorShapeUpdates) that allows specifying a cursor image shape for - the local VNC viewer. You may disable it with the [315]-nocursor + the local VNC viewer. You may disable it with the [336]-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 @@ -3052,23 +3215,23 @@ ied) framebuffer. This can also be disabled via -nocursor. - Q-56: Can I take advantage of the TightVNC extension to the VNC + Q-57: Can I take advantage of the TightVNC extension to the VNC protocol where Cursor Positions Updates are sent back to all connected clients (i.e. passive viewers can see the mouse cursor being moved around by another viewer)? - Use the [316]-cursorpos option when starting x11vnc. A VNC viewer must + Use the [337]-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 [317]-nocursorpos - and [318]-nocursorshape. + libvncserver CVS -cursorpos is the default. See also [338]-nocursorpos + and [339]-nocursorshape. - Q-57: Is it possible to swap the mouse buttons (e.g. left-handed + Q-58: 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: [319]-buttonmap + You can remap the mouse buttons via something like: [340]-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. @@ -3076,7 +3239,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 [320]-debug_pointer option prints out much info for + Note that the [341]-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 @@ -3098,7 +3261,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 [321]-buttonmap but rather configuring the X server + consider not using [342]-buttonmap but rather configuring the X server to think it has a mouse with 5 buttons even though the physical mouse does not. @@ -3125,10 +3288,10 @@ ied) "click" usually gives a multi-line scroll). [Keyboard Issues] - Q-58: How can I get my AltGr and Shift modifiers to work between + Q-59: How can I get my AltGr and Shift modifiers to work between keyboards for different languages? - The option [322]-modtweak should be of some use for this. It is a mode + The option [343]-modtweak should be of some use for this. 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. @@ -3137,21 +3300,21 @@ 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 [323]this FAQ + and ">" it. This key does not exist on the keyboard (see [344]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 [324]FAQ about the -xkb option for a more powerful method + Also see the [345]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 - [325]-debug_keyboard option prints out much info for every keystroke + [346]-debug_keyboard option prints out much info for every keystroke and so can be useful debugging things. - Q-59: When I try to type a "<" (i.e. less than) instead I get ">" + Q-60: When I try to type a "<" (i.e. less than) instead I get ">" (i.e. greater than)! Strangely, typing ">" works OK!! Does your keyboard have a single key with both "<" and ">" on it? Even @@ -3198,21 +3361,21 @@ ied) -remap less-comma These are convenient in that they do not modify the actual X server - settings. The former ([326]-modtweak) is a mode that monitors the + settings. The former ([347]-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 ([327]-remap less-comma) is an immediate remapping of the + The latter ([348]-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 [328]FAQ about the -xkb option as a possible workaround + See also the [349]FAQ about the -xkb option as a possible workaround using the XKEYBOARD extension. - Note that the [329]-debug_keyboard option prints out much info for + Note that the [350]-debug_keyboard option prints out much info for every keystroke to aid debugging keyboard problems. - Q-60: I'm using an "international" keyboard (e.g. German "de", or + Q-61: I'm using an "international" keyboard (e.g. German "de", or Danish "dk") and the -modtweak mode works well if the VNC viewer is run on a Unix/Linux machine with a similar keyboard. But if I run the VNC viewer on Unix/Linux with a different keyboard (e.g. "us") or @@ -3233,7 +3396,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 [330]-modtweak + This all worked fine with x11vnc running with the [351]-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 @@ -3251,7 +3414,7 @@ ied) * there is a new option -xkb to use the XKEYBOARD extension API to do the Modifier key tweaking. - The [331]-xkb option seems to fix all of the missing keys: "@", "<", + The [352]-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 @@ -3269,7 +3432,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: - [332]-skip_keycodes 93 + [353]-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 @@ -3286,14 +3449,14 @@ 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 [333]-remap x11vnc option: + created using the [354]-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 - [334]-add_keysyms option in the next paragraph. - * To complement the above workaround using the [335]-remap, an - option [336]-add_keysyms was added. This option instructs x11vnc + [355]-add_keysyms option in the next paragraph. + * To complement the above workaround using the [356]-remap, an + option [357]-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 @@ -3302,7 +3465,7 @@ ied) would -add_keysyms, or anything else, come into play. - Q-61: When typing I sometimes get double, triple, or more of my + Q-62: When typing I sometimes get double, triple, or more of my keystrokes repeated. I'm sure I only typed them once, what can I do? This may be due to an interplay between your X server's key autorepeat @@ -3310,7 +3473,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) [337]-norepeat x11vnc option. You will still + use the new (Jul/2004) [358]-norepeat x11vnc option. You will still have autorepeating because that is taken care of on your VNC viewer side. Update: as of Dec/2004 -norepeat is now the default. Use -repeat to disable it. @@ -3332,18 +3495,18 @@ 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 [338]-norepeat (which has since Dec/2004 been + needed, or to use the [359]-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 working at the physical display and misses his autorepeating. - Q-62: The x11vnc -norepeat mode is in effect, but I still get repeated + Q-63: The x11vnc -norepeat mode is in effect, but I still get repeated keystrokes!! Are you using x11vnc to log in to an X session? (as described in - [339]this FAQ) If so, x11vnc is starting before your session and it + [360]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 @@ -3363,11 +3526,11 @@ ied) should figure out how to disable that somehow. - Q-63: The machine where I run x11vnc has an AltGr key, but the local + Q-64: The machine where I run x11vnc has an AltGr key, but the local 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 "[340]-remap Super_R-Mode_switch" x11vnc option may + Something like "[361]-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)). @@ -3378,7 +3541,7 @@ ied) specify remappings from a file. - Q-64: I have a Sun machine I run x11vnc on. Its Sun keyboard has just + Q-65: I have a Sun machine I run x11vnc on. Its Sun keyboard has just one Alt key labelled "Alt" and two Meta keys labelled with little diamonds. The machine where I run the VNC viewer only has Alt keys. How can I send a Meta keypress? (e.g. emacs needs this) @@ -3390,18 +3553,18 @@ 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 [341]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones + the [362]-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. - Q-65: Can I map a keystroke to a mouse button click on the remote + Q-66: Can I map a keystroke to a mouse button click on the remote machine? 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 [342]-remap + have x11vnc do the remapping. This can be done via the [363]-remap option using the fake "keysyms" Button1, Button2, etc. as the "to" keys (i.e. the ones after the "-") @@ -3409,7 +3572,7 @@ ied) a touchpad with only two buttons. It is difficult to do a middle button "paste" because (using XFree86 Emulate3Buttons) you have to click both buttons on the touch pad at the same time. This remapping: - [343]-remap Super_R-Button2 + [364]-remap Super_R-Button2 maps the Super_R "flag" key press to the Button2 click, thereby making X pasting a bit easier. @@ -3420,7 +3583,7 @@ ied) [Screen Related Issues and Features] - Q-66: The remote display is larger (in number of pixels) than the + Q-67: The remote display is larger (in number of pixels) than the local display I am running the vncviewer on. I don't like the vncviewer scrollbars, what I can do? @@ -3438,16 +3601,16 @@ ied) There may also be scaling viewers out there (e.g. TightVNC on Windows) that automatically shrink or expand the remote framebuffer to fit the - local display. Especially for hand-held devices. See also [344]this + local display. Especially for hand-held devices. See also [365]this FAQ on x11vnc scaling. - Q-67: Does x11vnc support server-side framebuffer scaling? (E.g. to + Q-68: Does x11vnc support server-side framebuffer scaling? (E.g. to make the desktop smaller). 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 "[345]-scale fraction" + per-client setting. To enable it use the "[366]-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. @@ -3467,7 +3630,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 - [346]applications. Since with integer scale factors the framebuffers + [367]applications. Since with integer scale factors the framebuffers become huge and scaling operations time consuming, be sure to use ":nb" for the fastest response. @@ -3493,17 +3656,17 @@ 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 ([347]-rfbport option, + different scalings listening on separate ports ([368]-rfbport option, etc.). 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 [348]"-scale_cursor frac" option to set the cursor + that, use the [369]"-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). - Q-68: Does x11vnc work with Xinerama? (i.e. multiple monitors joined + Q-69: Does x11vnc work with Xinerama? (i.e. multiple monitors joined together to form one big, single screen). Yes, it should generally work because it simply polls the big @@ -3515,23 +3678,23 @@ ied) 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 [349]-blackout x11vnc option allows you + distracting to the viewer. The [370]-blackout x11vnc option allows you to blacken-out rectangles by specifying their WxH+X+Y geometries. If - your system has the libXinerama library, the [350]-xinerama x11vnc + your system has the libXinerama library, the [371]-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 [351]-xwarppointer + of the large display. If this happens try using the [372]-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 Xinerama is enabled). - Q-69: Can I use x11vnc on a multi-headed display that is not Xinerama + Q-70: Can I use x11vnc on a multi-headed display that is not Xinerama (i.e. separate screens :0.0, :0.1, ... for each monitor)? You can, but it is a little bit awkward: you must start separate @@ -3549,31 +3712,31 @@ 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 [352]FAQ to increase the limit. It - is probably also a good idea to run with the [353]-onetile option in + /etc/system as mentioned in another [373]FAQ to increase the limit. It + is probably also a good idea to run with the [374]-onetile option in this case (to limit each x11vnc to 3 shm segments), or even - [354]-noshm to use no shm segments. + [375]-noshm to use no shm segments. - Q-70: Can x11vnc show only a portion of the display? (E.g. for a + Q-71: 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 "[355]-clip + As of Mar/2005 in the libvncserver CVS x11vnc has the "[376]-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. This also works to view a sub-region of a single application window if - the [356]-id or [357]-sid options are used. The offset is measured + the [377]-id or [378]-sid options are used. The offset is measured from the upper left corner of the selected window. - Q-71: Does x11vnc support the XRANDR (X Resize, Rotate and Reflection) + Q-72: Does x11vnc support the XRANDR (X Resize, Rotate and Reflection) extension? Whenever I rotate or resize the screen x11vnc just seems to crash. As of Dec/2004 in the libvncserver CVS x11vnc supports XRANDR. You - enable it with the [358]-xrandr option to make x11vnc monitor XRANDR + enable it with the [379]-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. If the @@ -3582,7 +3745,7 @@ ied) 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 - [359]-padgeom option to make the region big enough to hold all resizes + [380]-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 @@ -3591,13 +3754,13 @@ ied) terminate. - Q-72: Why is the view in my VNC viewer completely black? Or why is + Q-73: Why is the view in my VNC viewer completely black? Or why is everything flashing around randomly? See the next FAQ for a possible explanation. - Q-73: I use Linux Virtual Consoles (VC's) to implement 'Fast User + Q-74: I use Linux Virtual Consoles (VC's) to implement 'Fast User Switching' between users' sessions (e.g. Betty is on Ctrl-Alt-F7, Bobby is on Ctrl-Alt-F8, and Sid is on Ctrl-Alt-F1: they use those keystrokes to switch between their sessions). How come the view in a @@ -3625,7 +3788,7 @@ ied) "chvt 7" for VC #7. - Q-74: Can I use x11vnc to view my VMWare session remotely? + Q-75: Can I use x11vnc to view my VMWare session remotely? Yes, since VMWare is an X application you can view it via x11vnc in the normal way. @@ -3636,9 +3799,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 [360]this FAQ + desktop in a separate Virtual Console (e.g. VC 8) (see [381]this FAQ on VC's for background). Unfortunately, this Fullscreen VC is not an X - server. So x11vnc cannot access it (however, [361]see this for a + server. So x11vnc cannot access it (however, [382]see this for a possible partial workaround). x11vnc works fine with "Normal X application window" and "Quick-Switch mode" because these use X. @@ -3655,13 +3818,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 [362]is in the active VC. + as long as the VMWare X session [383]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 [363]-id windowid option. The + the VMWare menu buttons) by use of the [384]-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 @@ -3670,7 +3833,7 @@ ied) mouse)). - Q-75: Can non-X devices (e.g. a raw framebuffer) be viewed and/or + Q-76: Can non-X devices (e.g. a raw framebuffer) be viewed and/or controlled by x11vnc? As of Apr/2005 in the libvncserver CVS there is rudimentary support @@ -3742,7 +3905,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 [364]X API, but you get + of Xvfb x11vnc can poll it much better via the [385]X API, but you get the idea. By default in -rawfb mode x11vnc will actually close any X display it @@ -3795,7 +3958,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 [365]active VC) one + view and interact with VC #2 (assuming it is the [386]active VC) one can run something like: x11vnc -rawfb map:/dev/fb0@1024x768x16 -pipeinput './vcinject.pl 2' @@ -3808,7 +3971,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 - [366]VMWare Fullscreen mode is actually viewable under -rawfb. But + [387]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. @@ -3819,7 +3982,7 @@ ied) program that passes the framebuffer to libvncserver. - Q-76: I am using x11vnc where my local machine has "popup/hidden + Q-77: I am using x11vnc where my local machine has "popup/hidden taskbars" (e.g. GNOME or MacOS X) and the remote display where x11vnc runs also has "popup/hidden taskbars" (e.g. GNOME). When I move the mouse to the edge of the screen where the popups happen, the taskbars @@ -3833,22 +3996,22 @@ ied) [Misc: Clipboard, Beeps, Thanks, etc.] - Q-77: Does the Clipboard/Selection get transferred between the + Q-78: Does the Clipboard/Selection get transferred between the vncviewer and the X display? 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 [367]-nosel option. If you + the Clipboard/Selection exchanged use the [388]-nosel option. If you don't want the PRIMARY selection to be polled for changes use the - [368]-noprimary option. + [389]-noprimary option. You may need to watch out for desktop utilities such as KDE's "Klipper" that do odd things with the selection, clipboard, and cutbuffers. - Q-78: Why don't I hear the "Beeps" in my X session (e.g. when typing + Q-79: Why don't I hear the "Beeps" in my X session (e.g. when typing tput bel in an xterm)? As of Dec/2003 in the libvncserver CVS "Beep" XBell events are tracked @@ -3856,7 +4019,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 [369]-nobell option. If + If you don't want to hear the beeps use the [390]-nobell option. If you want to hear the audio from the remote applications, consider trying a redirector such as esd. @@ -3865,14 +4028,14 @@ ied) Contributions: - Q-79: Thanks for your program and for your help! Can I make a + Q-80: Thanks for your program and for your help! Can I make a donation? Please do (any amount is appreciated) and thank you for your support! 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 - [370]email! + [391]email! [PayPal] @@ -3928,326 +4091,347 @@ References 48. http://www.sunfreeware.com/ 49. http://www.karlrunge.com/x11vnc/index.html#faq-solaris251build 50. http://www.karlrunge.com/x11vnc/x11vnc-0.7.2.tar.gz - 51. http://www.karlrunge.com/x11vnc/index.html#contact - 52. http://www.karlrunge.com/x11vnc/next-rel.html - 53. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage - 54. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid - 55. http://www.tightvnc.com/ - 56. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport - 57. http://www.karlrunge.com/x11vnc/x11vnc_opts.html - 58. http://www.karlrunge.com/x11vnc/index.html#faq-passwd - 59. http://www.karlrunge.com/x11vnc/recurse_x11vnc.jpg - 60. http://wwws.sun.com/sunray/index.html - 61. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap - 62. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait - 63. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport - 64. http://www.karlrunge.com/x11vnc/shm_clear - 65. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 66. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 67. mailto:xvml@karlrunge.com - 68. http://www.karlrunge.com/x11vnc/index.html#faq-thanks - 69. http://www.karlrunge.com/x11vnc/index.html#faq-xperms - 70. http://www.karlrunge.com/x11vnc/index.html#faq-build - 71. http://www.karlrunge.com/x11vnc/index.html#faq-missing-xtest - 72. http://www.karlrunge.com/x11vnc/index.html#faq-solaris251build - 73. http://www.karlrunge.com/x11vnc/index.html#faq-binaries - 74. http://www.karlrunge.com/x11vnc/index.html#faq-viewer-download - 75. http://www.karlrunge.com/x11vnc/index.html#faq-cmdline-opts - 76. http://www.karlrunge.com/x11vnc/index.html#faq-config-file - 77. http://www.karlrunge.com/x11vnc/index.html#faq-quiet-bg - 78. http://www.karlrunge.com/x11vnc/index.html#faq-sigpipe - 79. http://www.karlrunge.com/x11vnc/index.html#faq-build-customizations - 80. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc - 81. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc-8bpp - 82. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp - 83. http://www.karlrunge.com/x11vnc/index.html#faq-overlays - 84. http://www.karlrunge.com/x11vnc/index.html#faq-windowid - 85. http://www.karlrunge.com/x11vnc/index.html#faq-transients-id - 86. http://www.karlrunge.com/x11vnc/index.html#faq-24bpp - 87. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 88. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth - 89. http://www.karlrunge.com/x11vnc/index.html#faq-stop-bg - 90. http://www.karlrunge.com/x11vnc/index.html#faq-remote_control - 91. http://www.karlrunge.com/x11vnc/index.html#faq-passwd - 92. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 93. http://www.karlrunge.com/x11vnc/index.html#faq-input-opt - 94. http://www.karlrunge.com/x11vnc/index.html#faq-forever-shared - 95. http://www.karlrunge.com/x11vnc/index.html#faq-allow-opt - 96. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers - 97. http://www.karlrunge.com/x11vnc/index.html#faq-listen-interface - 98. http://www.karlrunge.com/x11vnc/index.html#faq-listen-localhost - 99. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-unix - 100. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-putty - 101. http://www.karlrunge.com/x11vnc/index.html#faq-accept-opt - 102. http://www.karlrunge.com/x11vnc/index.html#faq-unix-passwords - 103. http://www.karlrunge.com/x11vnc/index.html#faq-users-opt - 104. http://www.karlrunge.com/x11vnc/index.html#faq-blockdpy - 105. http://www.karlrunge.com/x11vnc/index.html#faq-gone-lock - 106. http://www.karlrunge.com/x11vnc/index.html#faq-service - 107. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager - 108. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 109. http://www.karlrunge.com/x11vnc/index.html#faq-java-http - 110. http://www.karlrunge.com/x11vnc/index.html#faq-reverse-connect - 111. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb - 112. http://www.karlrunge.com/x11vnc/index.html#faq-headless - 113. http://www.karlrunge.com/x11vnc/index.html#faq-solshm - 114. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource - 115. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource - 116. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link - 117. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode - 118. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe - 119. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage - 120. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape - 121. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha - 122. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks - 123. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow - 124. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions - 125. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt - 126. http://www.karlrunge.com/x11vnc/index.html#faq-altgr - 127. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless - 128. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak - 129. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys - 130. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still - 131. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt - 132. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta - 133. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click - 134. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars - 135. http://www.karlrunge.com/x11vnc/index.html#faq-scaling - 136. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama - 137. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen - 138. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen - 139. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr - 140. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen - 141. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 142. http://www.karlrunge.com/x11vnc/index.html#faq-vmware - 143. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb - 144. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars - 145. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard - 146. http://www.karlrunge.com/x11vnc/index.html#faq-beeps - 147. http://www.karlrunge.com/x11vnc/index.html#faq-thanks - 148. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display - 149. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 150. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users - 151. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 152. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html - 153. http://www.karlrunge.com/x11vnc/index.html#building - 154. http://www.karlrunge.com/x11vnc/index.html#faq-build - 155. http://packages.debian.org/x11vnc - 156. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc - 157. http://dag.wieers.com/packages/x11vnc/ - 158. http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Network/x11vnc/ - 159. http://www.sunfreeware.com/ - 160. http://www.bell-labs.com/project/wwexptools/packages.html - 161. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 162. http://www.karlrunge.com/x11vnc/bins - 163. http://www.tightvnc.com/download.html - 164. http://www.realvnc.com/download-free.html - 165. http://sourceforge.net/projects/cotvnc/ - 166. http://www.karlrunge.com/x11vnc/x11vnc_opts.html - 167. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui - 168. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q - 169. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg - 170. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o - 171. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 172. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb - 173. http://fredrik.hubbe.net/x2vnc.html - 174. http://www.hubbe.net/~hubbe/win2vnc.html - 175. http://www.deboer.gmxhome.de/ - 176. http://sourceforge.net/projects/win2vnc/ - 177. http://fredrik.hubbe.net/x2vnc.html - 178. http://freshmeat.net/projects/x2x/ - 179. http://ftp.digital.com/pub/Digital/SRC/x2x/ - 180. http://zapek.com/software/zvnc/ - 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual - 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap - 183. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor - 184. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp - 185. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 186. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 187. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 189. http://www.karlrunge.com/x11vnc/index.html#faq-overlays - 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid - 192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display - 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder - 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 196. http://www.karlrunge.com/x11vnc/index.html#xauth_pain - 197. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote - 199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query - 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever - 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg - 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods - 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys - 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote - 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query - 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui - 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd - 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 209. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd - 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd - 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile - 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input - 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever - 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared - 217. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 218. http://www.karlrunge.com/x11vnc/index.html#faq-passwd - 219. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow - 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 222. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers - 223. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen - 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow - 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow - 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen - 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow - 231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 232. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 233. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 51. http://www.karlrunge.com/x11vnc/bins + 52. mailto:x11vnc-beta@karlrunge.com + 53. http://www.karlrunge.com/x11vnc/next-rel.html + 54. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage + 55. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 56. http://www.karlrunge.com/x11vnc/index.html#wirecopyrect + 57. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect + 58. http://www.karlrunge.com/x11vnc/beta-test-0.7.2.html + 59. mailto:x11vnc-beta@karlrunge.com + 60. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid + 61. http://www.tightvnc.com/ + 62. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport + 63. http://www.karlrunge.com/x11vnc/x11vnc_opts.html + 64. http://www.karlrunge.com/x11vnc/index.html#faq-passwd + 65. http://www.karlrunge.com/x11vnc/recurse_x11vnc.jpg + 66. http://wwws.sun.com/sunray/index.html + 67. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap + 68. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 69. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport + 70. http://www.karlrunge.com/x11vnc/shm_clear + 71. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 72. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 73. mailto:xvml@karlrunge.com + 74. http://www.karlrunge.com/x11vnc/index.html#faq-thanks + 75. http://www.karlrunge.com/x11vnc/index.html#faq-xperms + 76. http://www.karlrunge.com/x11vnc/index.html#faq-build + 77. http://www.karlrunge.com/x11vnc/index.html#faq-missing-xtest + 78. http://www.karlrunge.com/x11vnc/index.html#faq-solaris251build + 79. http://www.karlrunge.com/x11vnc/index.html#faq-binaries + 80. http://www.karlrunge.com/x11vnc/index.html#faq-viewer-download + 81. http://www.karlrunge.com/x11vnc/index.html#faq-cmdline-opts + 82. http://www.karlrunge.com/x11vnc/index.html#faq-config-file + 83. http://www.karlrunge.com/x11vnc/index.html#faq-quiet-bg + 84. http://www.karlrunge.com/x11vnc/index.html#faq-sigpipe + 85. http://www.karlrunge.com/x11vnc/index.html#faq-build-customizations + 86. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc + 87. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc-8bpp + 88. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp + 89. http://www.karlrunge.com/x11vnc/index.html#faq-overlays + 90. http://www.karlrunge.com/x11vnc/index.html#faq-windowid + 91. http://www.karlrunge.com/x11vnc/index.html#faq-transients-id + 92. http://www.karlrunge.com/x11vnc/index.html#faq-24bpp + 93. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 94. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth + 95. http://www.karlrunge.com/x11vnc/index.html#faq-stop-bg + 96. http://www.karlrunge.com/x11vnc/index.html#faq-remote_control + 97. http://www.karlrunge.com/x11vnc/index.html#faq-passwd + 98. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 99. http://www.karlrunge.com/x11vnc/index.html#faq-input-opt + 100. http://www.karlrunge.com/x11vnc/index.html#faq-forever-shared + 101. http://www.karlrunge.com/x11vnc/index.html#faq-allow-opt + 102. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers + 103. http://www.karlrunge.com/x11vnc/index.html#faq-listen-interface + 104. http://www.karlrunge.com/x11vnc/index.html#faq-listen-localhost + 105. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-unix + 106. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-putty + 107. http://www.karlrunge.com/x11vnc/index.html#faq-accept-opt + 108. http://www.karlrunge.com/x11vnc/index.html#faq-unix-passwords + 109. http://www.karlrunge.com/x11vnc/index.html#faq-users-opt + 110. http://www.karlrunge.com/x11vnc/index.html#faq-blockdpy + 111. http://www.karlrunge.com/x11vnc/index.html#faq-gone-lock + 112. http://www.karlrunge.com/x11vnc/index.html#faq-service + 113. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager + 114. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 115. http://www.karlrunge.com/x11vnc/index.html#faq-java-http + 116. http://www.karlrunge.com/x11vnc/index.html#faq-reverse-connect + 117. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 118. http://www.karlrunge.com/x11vnc/index.html#faq-headless + 119. http://www.karlrunge.com/x11vnc/index.html#faq-solshm + 120. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource + 121. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource + 122. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link + 123. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage + 124. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode + 125. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 126. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect + 127. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape + 128. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha + 129. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks + 130. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow + 131. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions + 132. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt + 133. http://www.karlrunge.com/x11vnc/index.html#faq-altgr + 134. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless + 135. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 136. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys + 137. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still + 138. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt + 139. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta + 140. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click + 141. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars + 142. http://www.karlrunge.com/x11vnc/index.html#faq-scaling + 143. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama + 144. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen + 145. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen + 146. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr + 147. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen + 148. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 149. http://www.karlrunge.com/x11vnc/index.html#faq-vmware + 150. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb + 151. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars + 152. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard + 153. http://www.karlrunge.com/x11vnc/index.html#faq-beeps + 154. http://www.karlrunge.com/x11vnc/index.html#faq-thanks + 155. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display + 156. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 157. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager + 158. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users + 159. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 160. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html + 161. http://www.karlrunge.com/x11vnc/index.html#building + 162. http://www.karlrunge.com/x11vnc/index.html#faq-build + 163. http://packages.debian.org/x11vnc + 164. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc + 165. http://dag.wieers.com/packages/x11vnc/ + 166. http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Network/x11vnc/ + 167. http://www.sunfreeware.com/ + 168. http://www.bell-labs.com/project/wwexptools/packages.html + 169. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 170. http://www.karlrunge.com/x11vnc/bins + 171. http://www.tightvnc.com/download.html + 172. http://www.realvnc.com/download-free.html + 173. http://sourceforge.net/projects/cotvnc/ + 174. http://www.karlrunge.com/x11vnc/x11vnc_opts.html + 175. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui + 176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q + 177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg + 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o + 179. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb + 181. http://fredrik.hubbe.net/x2vnc.html + 182. http://www.hubbe.net/~hubbe/win2vnc.html + 183. http://www.deboer.gmxhome.de/ + 184. http://sourceforge.net/projects/win2vnc/ + 185. http://fredrik.hubbe.net/x2vnc.html + 186. http://freshmeat.net/projects/x2x/ + 187. http://ftp.digital.com/pub/Digital/SRC/x2x/ + 188. http://zapek.com/software/zvnc/ + 189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual + 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap + 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor + 192. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp + 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 197. http://www.karlrunge.com/x11vnc/index.html#faq-overlays + 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid + 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display + 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder + 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 204. http://www.karlrunge.com/x11vnc/index.html#xauth_pain + 205. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote + 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query + 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever + 209. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg + 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods + 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys + 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote + 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query + 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui + 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd + 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 217. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd + 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd + 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile + 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input + 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever + 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared + 225. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 226. http://www.karlrunge.com/x11vnc/index.html#faq-passwd + 227. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow + 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 230. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers + 231. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen + 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile - 237. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect - 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 240. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly - 241. ftp://ftp.x.org/ - 242. http://www.karlrunge.com/x11vnc/dtVncPopup - 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone - 244. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow + 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen + 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow + 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 240. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 241. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 242. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 244. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile 245. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users - 248. http://www.karlrunge.com/x11vnc/blockdpy.c - 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect + 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept + 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly + 249. ftp://ftp.x.org/ + 250. http://www.karlrunge.com/x11vnc/dtVncPopup 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone - 252. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously - 253. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 254. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop - 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 256. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris - 257. http://www.jirka.org/gdm-documentation/x241.html - 258. http://www.karlrunge.com/x11vnc/x11vnc_loop - 259. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth - 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd - 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q - 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir - 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect - 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect - 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 267. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously - 268. http://www.karlrunge.com/x11vnc/shm_clear - 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 271. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap - 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait - 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs - 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads - 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer - 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid - 280. http://www.tightvnc.com/ - 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging - 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive + 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/x11vnc_opts.html#opt-accept + 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users + 256. http://www.karlrunge.com/x11vnc/blockdpy.c + 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept + 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 259. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 260. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously + 261. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 262. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop + 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 264. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris + 265. http://www.jirka.org/gdm-documentation/x241.html + 266. http://www.karlrunge.com/x11vnc/x11vnc_loop + 267. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth + 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd + 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q + 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir + 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect + 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect + 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 275. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously + 276. http://www.karlrunge.com/x11vnc/shm_clear + 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile + 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 279. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap + 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs - 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel - 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor - 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos - 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging - 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads - 295. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe - 296. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode - 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area - 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem - 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage - 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 306. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode - 307. http://www.karlrunge.com/x11vnc/index.html#solaris10-build - 308. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks - 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut - 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac - 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove - 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape - 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend - 314. http://www.tightvnc.com/ - 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor - 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos - 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos - 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape - 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap - 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer - 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap - 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak - 323. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless - 324. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak - 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard - 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak - 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 328. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak - 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard - 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak - 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb - 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes - 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 334. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 336. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat - 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat - 339. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager - 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 342. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 344. http://www.karlrunge.com/x11vnc/index.html#faq-scaling - 345. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale - 346. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html - 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport - 348. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor - 349. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout - 350. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama - 351. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer - 352. http://www.karlrunge.com/x11vnc/index.html#faq-solshm - 353. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 354. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip - 356. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 358. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr - 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom - 360. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 361. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb - 362. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 363. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 364. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb - 365. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 366. http://www.karlrunge.com/x11vnc/index.html#faq-vmware - 367. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel - 368. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary - 369. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell - 370. mailto:xvml@karlrunge.com + 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid + 288. http://www.tightvnc.com/ + 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging + 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive + 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs + 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer + 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel + 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor + 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos + 298. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area + 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem + 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage + 302. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode + 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode + 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging + 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode + 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads + 308. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 309. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect + 310. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode + 311. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 315. http://www.karlrunge.com/x11vnc/fb_read_slow + 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wirecopyrect + 319. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen + 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scr_skip + 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale + 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 327. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode + 328. http://www.karlrunge.com/x11vnc/index.html#solaris10-build + 329. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks + 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut + 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac + 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove + 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape + 334. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend + 335. http://www.tightvnc.com/ + 336. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor + 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos + 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos + 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape + 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap + 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer + 342. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap + 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 344. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless + 345. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 346. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard + 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 348. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 349. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 350. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard + 351. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 352. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb + 353. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes + 354. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 356. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 358. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat + 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat + 360. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager + 361. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 362. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 363. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 364. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 365. http://www.karlrunge.com/x11vnc/index.html#faq-scaling + 366. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale + 367. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html + 368. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport + 369. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor + 370. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout + 371. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama + 372. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer + 373. http://www.karlrunge.com/x11vnc/index.html#faq-solshm + 374. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile + 375. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 376. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip + 377. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 378. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 379. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr + 380. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom + 381. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 382. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb + 383. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 384. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 385. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 386. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 387. http://www.karlrunge.com/x11vnc/index.html#faq-vmware + 388. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel + 389. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary + 390. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell + 391. mailto:xvml@karlrunge.com ======================================================================= @@ -4260,7 +4444,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.7.2 lastmod: 2005-06-03 +x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-06-14 x11vnc options: -display disp -auth file @@ -4298,41 +4482,42 @@ x11vnc options: -norepeat -repeat -nofb -nobell -nosel -noprimary - -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 -pointer_mode n - -input_skip n -speeds rd,bw,lat - -debug_pointer -debug_keyboard - -defer time -wait time - -wait_ui factor -nowait_bog - -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 -sync - -noremote -yesremote - -unsafe -safer - -privremote -nocmds - -deny_all + -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 + -pointer_mode n -input_skip n + -speeds rd,bw,lat -debug_pointer + -debug_keyboard -defer time + -wait time -wait_ui factor + -nowait_bog -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 + -sync -noremote + -yesremote -unsafe + -safer -privremote + -nocmds -deny_all + libvncserver options: -rfbport port TCP port for RFB protocol @@ -4358,7 +4543,7 @@ libvncserver options: % x11vnc -help -x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-06-03 +x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-06-14 Typical usage is: @@ -4495,13 +4680,17 @@ Options: exactly, e.g. -scale 2/3 Scaling Options: can be added after "fraction" via - ":", to supply multiple ":" options use commas. If - you just want a quick, rough scaling without blending, - append ":nb" to "fraction" (e.g. -scale 1/3:nb). - No blending is the default for 8bpp indexed color, to - force blending for this case use ":fb". By default - -scrollcopyrect and -wirecopyrect are disabled under - -scale, to enable them use ":cr". + ":", to supply multiple ":" options use commas. + If you just want a quick, rough scaling without + blending, append ":nb" to "fraction" (e.g. -scale + 1/3:nb). No blending is the default for 8bpp indexed + color, to force blending for this case use ":fb". + + To disable -scrollcopyrect and -wirecopyrect under + -scale use ":nocr". If you need to to enable them use + ":cr" or specify them explicitly on the command line. + If a slow link is detected, ":nocr" may be applied + automatically. Default: :cr More esoteric options: for compatibility with vncviewers the scaled width is adjusted to be a multiple of 4: @@ -4878,10 +5067,14 @@ Options: Keysym). Run 'xmodmap -pk' to see your keymapping. Example: "-skip_keycodes 94,114" -skip_dups Some VNC viewers send impossible repeated key events, --noskip_dups e.g. key-down, key-down, key-up, key-up all for the - same key, or 20 downs in a row for the same key! +-noskip_dups e.g. key-down, key-down, key-up, key-up all for the same + key, or 20 downs in a row for the same modifier key! Setting -skip_dups means to skip these duplicates and - just process the first event. Default: -skip_dups + just process the first event. Note: some VNC viewers + assume they can send down's without the corresponding + up's and so you should not set this option for + these viewers (symptom: some keys do not autorepeat) + Default: -noskip_dups -add_keysyms If a Keysym is received from a VNC viewer and -noadd_keysyms that Keysym does not exist in the X server, then add the Keysym to the X server's keyboard mapping. @@ -4966,6 +5159,12 @@ Options: -noprimary Do not poll the PRIMARY selection for changes to send back to clients. (PRIMARY is still set on received changes, however). +-seldir string If direction string is "send", only send the selection + to viewers, and if it is "recv" only receive it from + viewers. To work around apps setting the selection + too frequently and messing up the other end. You can + actually supply a comma separated list of directions, + including "debug" to turn on debugging output. -cursor [mode] Sets how the pointer cursor shape (little icon at the -nocursor mouse pointer) should be handled. The "mode" string @@ -5127,8 +5326,8 @@ Options: The value "str" is optional and, of course, is packed with many tunable parameters for this scheme: - Format: shade,linewidth,percent,T+B+L+R,t1+t2+t3+t4 - Default: 0xff,3,0,32+8+8+8,0.15+0.30+5.0+0.125 + Format: shade,linewidth,percent,T+B+L+R,mod,t1+t2+t3+t4 + Default: 0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125 If you leave nothing between commas: ",," the default value is used. If you don't specify enough commas, @@ -5150,6 +5349,14 @@ Options: wireframed: set them all to zero to not try the speedup (scrolling and selecting text will likely be slower). + "mod" specifies if a button down event in the + interior of the window with a modifier key (Alt, Shift, + etc.) down should indicate a wireframe opportunity. + It can be "0" or "none" to skip it, "1" or "all" + to apply it to any modifier, or "Shift", "Alt", + "Control", "Meta", "Super", or "Hyper" to only + apply for that type of modifier key. + "t1+t2+t3+t4" specify four floating point times in seconds: t1 is how long to wait for the pointer to move, t2 is how long to wait for the window to start moving @@ -5175,10 +5382,11 @@ Options: region (this may look odd as the remaining pieces come in, but helps on a slow link). Default: "always" - Note: there can be painting errors when using -scale - so CopyRect is skipped when scaling unless you specify - "-wirecopyrect always" on the command line or by - remote-control. Or you can also use "-scale xxx:cr" + Note: there can be painting errors or slow response + when using -scale so you may want to disable CopyRect + in this case "-wirecopyrect never" on the command + line or by remote-control. Or you can also use the + "-scale xxx:nocr" scale option. -debug_wireframe Turn on debugging info printout for the wireframe heuristics. "-dwf" is an alias. Specify multiple @@ -5220,16 +5428,24 @@ Options: 4 Super_L's in a row: reset RECORD context, 5 Super_L's in a row: try to push a black screen + note: Alt_L is the Left "Alt" key (a single key) + Super_L is the Left "Super" key (Windows flag). + Both of these are modifier keys, and so should not + generate characters when pressed by themselves. Also, + your VNC viewer may have its own refresh hot-key + or button. + "mode" can be "never" (same as -noscrollcopyrect) to never try the copyrect, "keys" means to try it in response to keystrokes only, "mouse" means to try it in response to mouse events only, "always" means to do both. Default: "always" - Note: there can be painting errors when using -scale - so CopyRect is skipped when scaling unless you specify - "-scrollcopyrect always" on the command line or by - remote-control. You can also use "-scale xxx:cr" + Note: there can be painting errors or slow response + when using -scale so you may want to disable CopyRect + in this case "-scrollcopyrect never" on the command + line or by remote-control. Or you can also use the + "-scale xxx:nocr" scale option. -scr_area n Set the minimum area in pixels for a rectangle to be considered for the -scrollcopyrect detection @@ -5375,22 +5591,22 @@ Options: but it can be used for any scenario. This option periodically performs costly operations and so interactive response may be reduced when it is on. - The 3 Alt_L's in a row described under -scrollcopyrect - can be used instead to manually request a screen repaint - when it is needed. - - "string" is a comma separated list of one or more - of the following: "V=t", "C=t", and "X=t". - In these "t" stands for a time in seconds (it is - a floating point even though one should usually use - values > 2 to avoid wasting resources). V sets how - frequently the entire screen should be sent to viewers - (it is like the 3 Alt_L's). C sets how long after a - CopyRect the full screen should be repainted. X sets - how frequently to reread the full X11 framebuffer from - the X server and push it out to connected viewers. - Use of X should be rare. Examples: -fixscreen V=10 - -fixscreen C=10 + The 3 Alt_L's (the Left "Alt" key) taps in a row + described under -scrollcopyrect can be used instead to + manually request a screen repaint when it is needed. + + "string" is a comma separated list of one or more of + the following: "V=t", "C=t", and "X=t". In these + "t" stands for a time in seconds (it is a floating + point even though one should usually use values > 2 to + avoid wasting resources). V sets how frequently the + entire screen should be sent to viewers (it is like the + 3 Alt_L's). C sets how long to wait after a CopyRect + to repaint the full screen. X sets how frequently + to reread the full X11 framebuffer from the X server + and push it out to connected viewers. Use of X should + be rare, please report a bug if you find you need it. + Examples: -fixscreen V=10 -fixscreen C=10 -debug_scroll Turn on debugging info printout for the scroll heuristics. "-ds" is an alias. Specify it multiple @@ -5839,6 +6055,7 @@ Options: sel disable -nosel mode. noprimary enable -noprimary mode. primary disable -noprimary mode. + seldir:str set -seldir to "str" cursor:mode enable -cursor "mode". show_cursor enable showing a cursor. noshow_cursor disable showing a cursor. (same as @@ -5880,6 +6097,7 @@ Options: fixscreen:str set -fixscreen to "str". noxrecord disable all use of RECORD extension. xrecord enable use of RECORD extension. + reset_record reset RECORD extension (if avail.). pointer_mode:n set -pointer_mode to n. same as "pm" input_skip:n set -input_skip to n. speeds:str set -speeds to str. @@ -5969,14 +6187,6 @@ Options: a query straight to the VNC_CONNECT property or connect file use "qry=..." instead of "cmd=..." - Here is the current list of "variables" that can - be supplied to the -query command. This includes the - "N/A" ones that return no useful info. For variables - names that do not correspond to an x11vnc option or - remote command, we hope the name makes it obvious what - the returned value corresponds to (hint: the ext_* - variables correspond to the presence of X extensions): - ans= stop quit exit shutdown ping blacken zero refresh reset close disconnect id sid waitmapped nowaitmapped clip flashcmap noflashcmap shiftcmap @@ -5993,23 +6203,23 @@ Options: modtweak nomodtweak xkb noxkb skip_keycodes skip_dups noskip_dups add_keysyms noadd_keysyms clear_mods noclear_mods clear_keys noclear_keys remap repeat - norepeat fb nofb bell nobell sel nosel primary noprimary - cursorshape nocursorshape cursorpos nocursorpos cursor - show_cursor noshow_cursor nocursor arrow xfixes - noxfixes xdamage noxdamage xd_area xd_mem alphacut - alphafrac alpharemove noalpharemove alphablend - noalphablend xwarppointer xwarp noxwarppointer - noxwarp buttonmap dragging nodragging wireframe_mode - wireframe wf nowireframe nowf wirecopyrect wcr - nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys - scr_term scr_keyrepeat scr_parms scrollcopyrect scr + norepeat fb nofb bell nobell sel nosel primary + noprimary seldir cursorshape nocursorshape cursorpos + nocursorpos cursor show_cursor noshow_cursor nocursor + arrow xfixes noxfixes xdamage noxdamage xd_area xd_mem + alphacut alphafrac alpharemove noalpharemove alphablend + noalphablend xwarppointer xwarp noxwarppointer noxwarp + buttonmap dragging nodragging wireframe_mode wireframe + wf nowireframe nowf wirecopyrect wcr nowirecopyrect + nowcr scr_area scr_skip scr_inc scr_keys scr_term + scr_keyrepeat scr_parms scrollcopyrect scr noscrollcopyrect noscr fixscreen noxrecord xrecord - pointer_mode pm input_skip input client_input speeds - debug_pointer dp nodebug_pointer nodp debug_keyboard - dk nodebug_keyboard nodk deferupdate defer wait_ui - wait_bog nowait_bog wait readtimeout nap nonap sb - screen_blank fs gaps grow fuzz snapfb nosnapfb - rawfb progressive rfbport http nohttp httpport + reset_record pointer_mode pm input_skip input + client_input speeds debug_pointer dp nodebug_pointer + nodp debug_keyboard dk nodebug_keyboard nodk deferupdate + defer wait_ui wait_bog nowait_bog wait readtimeout + nap nonap sb screen_blank fs gaps grow fuzz snapfb + nosnapfb rawfb progressive rfbport http nohttp httpport httpdir enablehttpproxy noenablehttpproxy alwaysshared noalwaysshared nevershared noalwaysshared dontdisconnect nodontdisconnect desktop debug_xevents nodebug_xevents @@ -6019,19 +6229,19 @@ Options: debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg nodbg noremote - aro= display vncdisplay desktopname http_url auth - users rootshift clipshift scale_str scaled_x scaled_y - scale_numer scale_denom scale_fac scaling_blend - scaling_nomult4 scaling_pad scaling_interpolate inetd - privremote unsafe safer nocmds passwdfile using_shm - logfile o flag rc norc h help V version lastmod bg - sigpipe threads readrate netrate netlatency pipeinput - clients client_count pid ext_xtest ext_xtrap ext_xrecord - ext_xkb ext_xshm ext_xinerama ext_overlay ext_xfixes - ext_xdamage ext_xrandr rootwin num_buttons button_mask - mouse_x mouse_y bpp depth indexed_color dpy_x dpy_y - wdpy_x wdpy_y off_x off_y cdpy_x cdpy_y coff_x coff_y - rfbauth passwd + aro= display vncdisplay desktopname guess_desktop + http_url auth users rootshift clipshift scale_str + scaled_x scaled_y scale_numer scale_denom + scale_fac scaling_blend scaling_nomult4 scaling_pad + scaling_interpolate inetd privremote unsafe safer nocmds + passwdfile using_shm logfile o flag rc norc h help V + version lastmod bg sigpipe threads readrate netrate + netlatency pipeinput clients client_count pid ext_xtest + ext_xtrap ext_xrecord ext_xkb ext_xshm ext_xinerama + ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin + num_buttons button_mask mouse_x mouse_y bpp depth + indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y + cdpy_x cdpy_y coff_x coff_y rfbauth passwd -sync By default -remote commands are run asynchronously, that is, the request is posted and the program immediately diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc index 653ec25..af24fea 100755 --- a/x11vnc/tkx11vnc +++ b/x11vnc/tkx11vnc @@ -164,16 +164,18 @@ Misc -- D =F rc: norc + nolookup -- nofb -- =D nobell =D nosel noprimary - nolookup + seldir: -- xtrap xrecord + =RA reset_record -- bg =-C:ignore,exit sigpipe: diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index b52b2f9..e841c9b 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -170,16 +170,18 @@ " -- D\n" " =F rc:\n" " norc\n" +" nolookup\n" " --\n" " nofb\n" " --\n" " =D nobell\n" " =D nosel\n" " noprimary\n" -" nolookup\n" +" seldir:\n" " --\n" " xtrap\n" " xrecord\n" +" =RA reset_record\n" " --\n" " bg\n" " =-C:ignore,exit sigpipe:\n" diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1 index d87b0ad..c8b35ad 100644 --- a/x11vnc/x11vnc.1 +++ b/x11vnc/x11vnc.1 @@ -2,7 +2,7 @@ .TH X11VNC "1" "June 2005" "x11vnc " "User Commands" .SH NAME x11vnc - allow VNC connections to real X11 displays - version: 0.7.2, lastmod: 2005-06-03 + version: 0.7.2, lastmod: 2005-06-14 .SH SYNOPSIS .B x11vnc [OPTION]... @@ -186,13 +186,17 @@ the notation "m/n" may be used to denote fractions exactly, e.g. \fB-scale\fR 2/3 .IP Scaling Options: can be added after \fIfraction\fR via -":", to supply multiple ":" options use commas. If -you just want a quick, rough scaling without blending, -append ":nb" to \fIfraction\fR (e.g. \fB-scale\fR 1/3:nb). -No blending is the default for 8bpp indexed color, to -force blending for this case use ":fb". By default -\fB-scrollcopyrect\fR and \fB-wirecopyrect\fR are disabled under -\fB-scale,\fR to enable them use ":cr". +":", to supply multiple ":" options use commas. +If you just want a quick, rough scaling without +blending, append ":nb" to \fIfraction\fR (e.g. \fB-scale\fR +1/3:nb). No blending is the default for 8bpp indexed +color, to force blending for this case use ":fb". +.IP +To disable \fB-scrollcopyrect\fR and \fB-wirecopyrect\fR under +\fB-scale\fR use ":nocr". If you need to to enable them use +":cr" or specify them explicitly on the command line. +If a slow link is detected, ":nocr" may be applied +automatically. Default: :cr .IP More esoteric options: for compatibility with vncviewers the scaled width is adjusted to be a multiple of 4: @@ -717,10 +721,14 @@ Example: "\fB-skip_keycodes\fR \fI94,114\fR" \fB-skip_dups,\fR \fB-noskip_dups\fR .IP Some VNC viewers send impossible repeated key events, -e.g. key-down, key-down, key-up, key-up all for the -same key, or 20 downs in a row for the same key! +e.g. key-down, key-down, key-up, key-up all for the same +key, or 20 downs in a row for the same modifier key! Setting \fB-skip_dups\fR means to skip these duplicates and -just process the first event. Default: \fB-skip_dups\fR +just process the first event. Note: some VNC viewers +assume they can send down's without the corresponding +up's and so you should not set this option for +these viewers (symptom: some keys do not autorepeat) +Default: \fB-noskip_dups\fR .PP \fB-add_keysyms,\fR \fB-noadd_keysyms\fR .IP @@ -834,6 +842,15 @@ Do not poll the PRIMARY selection for changes to send back to clients. (PRIMARY is still set on received changes, however). .PP +\fB-seldir\fR \fIstring\fR +.IP +If direction string is "send", only send the selection +to viewers, and if it is "recv" only receive it from +viewers. To work around apps setting the selection +too frequently and messing up the other end. You can +actually supply a comma separated list of directions, +including "debug" to turn on debugging output. +.PP \fB-cursor\fR \fI[mode],\fR \fB-nocursor\fR .IP Sets how the pointer cursor shape (little icon at the @@ -1032,8 +1049,8 @@ Shorter aliases: \fB-wf\fR [str] and \fB-nowf\fR The value "str" is optional and, of course, is packed with many tunable parameters for this scheme: .IP -Format: shade,linewidth,percent,T+B+L+R,t1+t2+t3+t4 -Default: 0xff,3,0,32+8+8+8,0.15+0.30+5.0+0.125 +Format: shade,linewidth,percent,T+B+L+R,mod,t1+t2+t3+t4 +Default: 0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125 .IP If you leave nothing between commas: ",," the default value is used. If you don't specify enough commas, @@ -1055,6 +1072,14 @@ This is a speedup to quickly exclude a window from being wireframed: set them all to zero to not try the speedup (scrolling and selecting text will likely be slower). .IP +"mod" specifies if a button down event in the +interior of the window with a modifier key (Alt, Shift, +etc.) down should indicate a wireframe opportunity. +It can be "0" or "none" to skip it, "1" or "all" +to apply it to any modifier, or "Shift", "Alt", +"Control", "Meta", "Super", or "Hyper" to only +apply for that type of modifier key. +.IP "t1+t2+t3+t4" specify four floating point times in seconds: t1 is how long to wait for the pointer to move, t2 is how long to wait for the window to start moving @@ -1082,10 +1107,11 @@ the window was not covered by any other windows, and region (this may look odd as the remaining pieces come in, but helps on a slow link). Default: "always" .IP -Note: there can be painting errors when using \fB-scale\fR -so CopyRect is skipped when scaling unless you specify -"\fB-wirecopyrect\fR \fIalways\fR" on the command line or by -remote-control. Or you can also use "\fB-scale\fR \fIxxx:cr\fR" +Note: there can be painting errors or slow response +when using \fB-scale\fR so you may want to disable CopyRect +in this case "\fB-wirecopyrect\fR \fInever\fR" on the command +line or by remote-control. Or you can also use the +"\fB-scale\fR \fIxxx:nocr\fR" scale option. .PP \fB-debug_wireframe\fR .IP @@ -1131,16 +1157,24 @@ may be seen when using this mode: 4 Super_L's in a row: reset RECORD context, 5 Super_L's in a row: try to push a black screen .IP +note: Alt_L is the Left "Alt" key (a single key) +Super_L is the Left "Super" key (Windows flag). +Both of these are modifier keys, and so should not +generate characters when pressed by themselves. Also, +your VNC viewer may have its own refresh hot-key +or button. +.IP "mode" can be "never" (same as \fB-noscrollcopyrect)\fR to never try the copyrect, "keys" means to try it in response to keystrokes only, "mouse" means to try it in response to mouse events only, "always" means to do both. Default: "always" .IP -Note: there can be painting errors when using \fB-scale\fR -so CopyRect is skipped when scaling unless you specify -"\fB-scrollcopyrect\fR \fIalways\fR" on the command line or by -remote-control. You can also use "\fB-scale\fR \fIxxx:cr\fR" +Note: there can be painting errors or slow response +when using \fB-scale\fR so you may want to disable CopyRect +in this case "\fB-scrollcopyrect\fR \fInever\fR" on the command +line or by remote-control. Or you can also use the +"\fB-scale\fR \fIxxx:nocr\fR" scale option. .PP \fB-scr_area\fR \fIn\fR .IP @@ -1303,22 +1337,22 @@ it is intended for cases when the \fB-scrollcopyrect\fR or but it can be used for any scenario. This option periodically performs costly operations and so interactive response may be reduced when it is on. -The 3 Alt_L's in a row described under \fB-scrollcopyrect\fR -can be used instead to manually request a screen repaint -when it is needed. -.IP -\fIstring\fR is a comma separated list of one or more -of the following: "V=t", "C=t", and "X=t". -In these "t" stands for a time in seconds (it is -a floating point even though one should usually use -values > 2 to avoid wasting resources). V sets how -frequently the entire screen should be sent to viewers -(it is like the 3 Alt_L's). C sets how long after a -CopyRect the full screen should be repainted. X sets -how frequently to reread the full X11 framebuffer from -the X server and push it out to connected viewers. -Use of X should be rare. Examples: \fB-fixscreen\fR V=10 -\fB-fixscreen\fR C=10 +The 3 Alt_L's (the Left "Alt" key) taps in a row +described under \fB-scrollcopyrect\fR can be used instead to +manually request a screen repaint when it is needed. +.IP +\fIstring\fR is a comma separated list of one or more of +the following: "V=t", "C=t", and "X=t". In these +"t" stands for a time in seconds (it is a floating +point even though one should usually use values > 2 to +avoid wasting resources). V sets how frequently the +entire screen should be sent to viewers (it is like the +3 Alt_L's). C sets how long to wait after a CopyRect +to repaint the full screen. X sets how frequently +to reread the full X11 framebuffer from the X server +and push it out to connected viewers. Use of X should +be rare, please report a bug if you find you need it. +Examples: \fB-fixscreen\fR V=10 \fB-fixscreen\fR C=10 .PP \fB-debug_scroll\fR .IP @@ -1945,6 +1979,8 @@ noprimary enable \fB-noprimary\fR mode. .IP primary disable \fB-noprimary\fR mode. .IP +seldir:str set \fB-seldir\fR to "str" +.IP cursor:mode enable \fB-cursor\fR "mode". .IP show_cursor enable showing a cursor. @@ -2022,6 +2058,8 @@ noxrecord disable all use of RECORD extension. .IP xrecord enable use of RECORD extension. .IP +reset_record reset RECORD extension (if avail.). +.IP pointer_mode:n set \fB-pointer_mode\fR to n. same as "pm" .IP input_skip:n set \fB-input_skip\fR to n. @@ -2180,14 +2218,6 @@ in these cases the value returned is "N/A". To direct a query straight to the VNC_CONNECT property or connect file use "qry=..." instead of "cmd=..." .IP -Here is the current list of "variables" that can -be supplied to the \fB-query\fR command. This includes the -"N/A" ones that return no useful info. For variables -names that do not correspond to an x11vnc option or -remote command, we hope the name makes it obvious what -the returned value corresponds to (hint: the ext_* -variables correspond to the presence of X extensions): -.IP ans= stop quit exit shutdown ping blacken zero refresh reset close disconnect id sid waitmapped nowaitmapped clip flashcmap noflashcmap shiftcmap @@ -2204,23 +2234,23 @@ xrandr noxrandr xrandr_mode padgeom quiet q noquiet modtweak nomodtweak xkb noxkb skip_keycodes skip_dups noskip_dups add_keysyms noadd_keysyms clear_mods noclear_mods clear_keys noclear_keys remap repeat -norepeat fb nofb bell nobell sel nosel primary noprimary -cursorshape nocursorshape cursorpos nocursorpos cursor -show_cursor noshow_cursor nocursor arrow xfixes -noxfixes xdamage noxdamage xd_area xd_mem alphacut -alphafrac alpharemove noalpharemove alphablend -noalphablend xwarppointer xwarp noxwarppointer -noxwarp buttonmap dragging nodragging wireframe_mode -wireframe wf nowireframe nowf wirecopyrect wcr -nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys -scr_term scr_keyrepeat scr_parms scrollcopyrect scr +norepeat fb nofb bell nobell sel nosel primary +noprimary seldir cursorshape nocursorshape cursorpos +nocursorpos cursor show_cursor noshow_cursor nocursor +arrow xfixes noxfixes xdamage noxdamage xd_area xd_mem +alphacut alphafrac alpharemove noalpharemove alphablend +noalphablend xwarppointer xwarp noxwarppointer noxwarp +buttonmap dragging nodragging wireframe_mode wireframe +wf nowireframe nowf wirecopyrect wcr nowirecopyrect +nowcr scr_area scr_skip scr_inc scr_keys scr_term +scr_keyrepeat scr_parms scrollcopyrect scr noscrollcopyrect noscr fixscreen noxrecord xrecord -pointer_mode pm input_skip input client_input speeds -debug_pointer dp nodebug_pointer nodp debug_keyboard -dk nodebug_keyboard nodk deferupdate defer wait_ui -wait_bog nowait_bog wait readtimeout nap nonap sb -screen_blank fs gaps grow fuzz snapfb nosnapfb -rawfb progressive rfbport http nohttp httpport +reset_record pointer_mode pm input_skip input +client_input speeds debug_pointer dp nodebug_pointer +nodp debug_keyboard dk nodebug_keyboard nodk deferupdate +defer wait_ui wait_bog nowait_bog wait readtimeout +nap nonap sb screen_blank fs gaps grow fuzz snapfb +nosnapfb rawfb progressive rfbport http nohttp httpport httpdir enablehttpproxy noenablehttpproxy alwaysshared noalwaysshared nevershared noalwaysshared dontdisconnect nodontdisconnect desktop debug_xevents nodebug_xevents @@ -2230,19 +2260,19 @@ debug_wireframe debug_scroll nodebug_scroll debug_scroll debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg nodbg noremote .IP -aro= display vncdisplay desktopname http_url auth -users rootshift clipshift scale_str scaled_x scaled_y -scale_numer scale_denom scale_fac scaling_blend -scaling_nomult4 scaling_pad scaling_interpolate inetd -privremote unsafe safer nocmds passwdfile using_shm -logfile o flag rc norc h help V version lastmod bg -sigpipe threads readrate netrate netlatency pipeinput -clients client_count pid ext_xtest ext_xtrap ext_xrecord -ext_xkb ext_xshm ext_xinerama ext_overlay ext_xfixes -ext_xdamage ext_xrandr rootwin num_buttons button_mask -mouse_x mouse_y bpp depth indexed_color dpy_x dpy_y -wdpy_x wdpy_y off_x off_y cdpy_x cdpy_y coff_x coff_y -rfbauth passwd +aro= display vncdisplay desktopname guess_desktop +http_url auth users rootshift clipshift scale_str +scaled_x scaled_y scale_numer scale_denom +scale_fac scaling_blend scaling_nomult4 scaling_pad +scaling_interpolate inetd privremote unsafe safer nocmds +passwdfile using_shm logfile o flag rc norc h help V +version lastmod bg sigpipe threads readrate netrate +netlatency pipeinput clients client_count pid ext_xtest +ext_xtrap ext_xrecord ext_xkb ext_xshm ext_xinerama +ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin +num_buttons button_mask mouse_x mouse_y bpp depth +indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y +cdpy_x cdpy_y coff_x coff_y rfbauth passwd .PP \fB-sync\fR .IP diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c index d6059b8..680d1d7 100644 --- a/x11vnc/x11vnc.c +++ b/x11vnc/x11vnc.c @@ -6,8 +6,7 @@ * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * the Free Software Foundation; version 2 of the License. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -174,12 +173,13 @@ * -DSCROLL_COPYRECT=0 to have -noscrollcopyrect as the default. * -DSCROLL_COPYRECT_PARMS=... set default -scrollcopyrect parameters. * -DXDAMAGE=0 to have -noxdamage as the default. - * -DSKIDPUPS=0 to have -noskip_dups as the default. + * -DSKIPDUPS=0 to have -noskip_dups as the default or vice versa. * * -DPOINTER_MODE_DEFAULT={0,1,2,3,4} set default -pointer_mode. * -DBOLDLY_CLOSE_DISPLAY=0 to not close X DISPLAY under -rawfb. * -DSMALL_FOOTPRINT=1 for smaller binary size (no help, no gui, etc) * use 2 or 3 for even smaller footprint. + * -DNOGUI do not include the gui tkx11vnc. * * Set these in CPPFLAGS before running configure. E.g.: * @@ -209,6 +209,10 @@ #define SMALL_FOOTPRINT 0 #endif +#if SMALL_FOOTPRINT +#define NOGUI +#endif + #if (SMALL_FOOTPRINT > 1) #define LIBVNCSERVER_HAVE_XKEYBOARD 0 #define LIBVNCSERVER_HAVE_LIBXINERAMA 0 @@ -308,20 +312,26 @@ extern int h_errno; /* solaris/sun */ #if defined (__SVR4) && defined (__sun) -#define SOLARIS -#define SOLARIS_OVERLAY -#define OVERLAY_OS +# define SOLARIS +# ifdef LIBVNCSERVER_HAVE_SOLARIS_XREADSCREEN +# define SOLARIS_OVERLAY +# define OVERLAY_OS +# endif #endif + #ifdef SOLARIS_OVERLAY #include <X11/extensions/transovl.h> #endif /* irix/sgi */ #if defined(__sgi) -#define IRIX -#define IRIX_OVERLAY -#define OVERLAY_OS +# define IRIX +# ifdef LIBVNCSERVER_HAVE_IRIX_XREADDISPLAY +# define IRIX_OVERLAY +# define OVERLAY_OS +# endif #endif + #ifdef IRIX_OVERLAY #include <X11/extensions/readdisplay.h> #endif @@ -372,7 +382,7 @@ double xdamage_scheduled_mark = 0.0; sraRegionPtr xdamage_scheduled_mark_region = NULL; /* date +'lastmod: %Y-%m-%d' */ -char lastmod[] = "0.7.2 lastmod: 2005-06-03"; +char lastmod[] = "0.7.2 lastmod: 2005-06-14"; int hack_val = 0; /* X display info */ @@ -473,6 +483,7 @@ int scaling_interpolate = 0; /* use interpolation scheme when shrinking */ int scaled_x = 0, scaled_y = 0; /* dimensions of scaled display */ int scale_numer = 0, scale_denom = 0; /* n/m */ + /* scale cursor */ char *scale_cursor_str = NULL; double scale_cursor_fac = 1.0; @@ -811,7 +822,10 @@ char *listen_str = NULL; char *allow_once = NULL; /* one time -allow */ char *accept_cmd = NULL; /* for -accept */ char *gone_cmd = NULL; /* for -gone */ -int view_only = 0; /* clients can only watch. */ +#ifndef VIEWONLY +#define VIEWONLY 0 +#endif +int view_only = VIEWONLY; /* clients can only watch. */ char *allowed_input_view_only = NULL; char *allowed_input_normal = NULL; char *allowed_input_str = NULL; @@ -881,7 +895,7 @@ int show_dragging = 1; /* process mouse movement events */ int wireframe = WIREFRAME; /* try to emulate wireframe wm moves */ /* shade,linewidth,percent,T+B+L+R,t1+t2+t3+t4 */ #ifndef WIREFRAME_PARMS -#define WIREFRAME_PARMS "0xff,3,0,32+8+8+8,0.15+0.30+5.0+0.125" +#define WIREFRAME_PARMS "0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125" #endif char *wireframe_str = NULL; char *wireframe_copyrect = NULL; @@ -937,6 +951,12 @@ char *scroll_key_list_str = NULL; KeySym *scroll_key_list = NULL; int pointer_queued_sent = 0; +#ifndef SCALING_COPYRECT +#define SCALING_COPYRECT 1 +#endif +int scaling_copyrect0 = SCALING_COPYRECT; +int scaling_copyrect = SCALING_COPYRECT; + int scrollcopyrect_min_area = 60000; /* minimum rectangle area */ int debug_scroll = 0; double pointer_flush_delay = 0.0; @@ -997,7 +1017,7 @@ int sound_bell = 1; /* actually send it */ int xkbcompat = 0; /* ignore XKEYBOARD extension */ int use_xkb_modtweak = 0; /* -xkb */ #ifndef SKIPDUPS -#define SKIPDUPS 1 +#define SKIPDUPS 0 #endif int skip_duplicate_key_events = SKIPDUPS; char *skip_keycodes = NULL; @@ -1041,6 +1061,7 @@ int ui_skip = 10; /* see watchloop. negative means ignore input */ int watch_selection = 1; /* normal selection/cutbuffer maintenance */ int watch_primary = 1; /* more dicey, poll for changes in PRIMARY */ +char *sel_direction = NULL; /* "send" or "recv" for one-way */ char *sigpipe = NULL; /* skip, ignore, exit */ @@ -1206,7 +1227,7 @@ char *lblanks(char *str) { int scan_hexdec(char *str, unsigned long *num) { if (sscanf(str, "0x%lx", num) != 1) { - if (sscanf(str, "%ld", num) != 1) { + if (sscanf(str, "%lu", num) != 1) { return 0; } } @@ -1241,7 +1262,7 @@ int parse_geom(char *str, int *wp, int *hp, int *xp, int *yp, int W, int H) { void set_env(char *name, char *value) { char *str; - str = (char *)malloc(strlen(name)+strlen(value)+2); + str = (char *) malloc(strlen(name)+strlen(value)+2); sprintf(str, "%s=%s", name, value); putenv(str); } @@ -1255,6 +1276,7 @@ int pick_windowid(unsigned long *num) { set_env("DISPLAY", use_dpy); } if (no_external_cmds) { + rfbLogEnable(1); rfbLog("cannot run external commands in -nocmds mode:\n"); rfbLog(" \"%s\"\n", "xwininfo"); rfbLog(" exiting.\n"); @@ -1608,7 +1630,7 @@ char **user_list(char *user_str) { n++; } } - list = (char **) malloc((n+1)*(sizeof(char *))); + list = (char **) malloc((n+1)*sizeof(char *)); p = strtok(user_str, ","); i = 0; @@ -1996,7 +2018,7 @@ int switch_user(char *user, int fb_mode) { user2uid(user, &uid, &name, &home); - if (uid == -1 || uid == 0) { + if (uid == (uid_t) -1 || uid == 0) { return 0; } @@ -2186,7 +2208,8 @@ int dotted_ip(char *host) { int get_port(int sock, int remote) { struct sockaddr_in saddr; - int saddr_len, saddr_port; + unsigned int saddr_len; + int saddr_port; saddr_len = sizeof(saddr); memset(&saddr, 0, sizeof(saddr)); @@ -2213,7 +2236,8 @@ int get_local_port(int sock) { char *get_host(int sock, int remote) { struct sockaddr_in saddr; - int saddr_len, saddr_port; + unsigned int saddr_len; + int saddr_port; char *saddr_ip_str = NULL; saddr_len = sizeof(saddr); @@ -2326,7 +2350,7 @@ char *ident_username(rfbClientPtr client) { } newhost = ip2host(client->host); len = strlen(user) + 1 + strlen(newhost) + 1; - str = (char *)malloc(len); + str = (char *) malloc(len); sprintf(str, "%s@%s", user, newhost); free(newhost); return str; @@ -2438,15 +2462,20 @@ XImage *xreadscreen(Display *disp, Drawable d, int x, int y, #ifdef SOLARIS_OVERLAY return XReadScreen(disp, d, x, y, width, height, show_cursor); -#endif -#ifdef IRIX_OVERLAY +#else +# ifdef IRIX_OVERLAY { unsigned long hints = 0, hints_ret; if (show_cursor) hints |= XRD_READ_POINTER; return XReadDisplay(disp, d, x, y, width, height, hints, &hints_ret); } -#endif +# else + /* unused vars warning: */ + if (disp || d || x || y || width || height || show_cursor) {} + return NULL; +# endif +#endif } XImage *XGetSubImage_wr(Display *disp, Drawable d, int x, int y, @@ -2539,7 +2568,8 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth, void copy_raw_fb(XImage *dest, int x, int y, unsigned int w, unsigned int h) { char *src, *dst; - int line, pixelsize = bpp/8; + unsigned int line; + int pixelsize = bpp/8; int bpl = wdpy_x * pixelsize; if (clipshift) { @@ -2600,7 +2630,8 @@ void copy_image(XImage *dest, int x, int y, unsigned int w, unsigned int h) { if (use_snapfb && snap_fb && dest != snaprect) { char *src, *dst; - int line, pixelsize = bpp/8; + unsigned int line; + int pixelsize = bpp/8; src = snap->data + snap->bytes_per_line*y + pixelsize*x; dst = dest->data; @@ -2613,7 +2644,8 @@ void copy_image(XImage *dest, int x, int y, unsigned int w, unsigned int h) { } else if (raw_fb) { copy_raw_fb(dest, x, y, w, h); - } else if (using_shm && w == dest->width && h == dest->height) { + } else if (using_shm && (int) w == dest->width && + (int) h == dest->height) { XShmGetImage_wr(dpy, window, dest, x, y, AllPlanes); } else { @@ -2639,6 +2671,9 @@ void XTRAP_FakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, DEBUG_SKIPPED_INPUT(debug_keyboard, "keyboard: no-XTRAP"); return; } + /* unused vars warning: */ + if (dpy || key || down || delay) {} + #if LIBVNCSERVER_HAVE_LIBXTRAP XESimulateXEventRequest(trap_ctx, down ? KeyPress : KeyRelease, key, 0, 0, 0); @@ -2661,7 +2696,8 @@ void XTestFakeKeyEvent_wr(Display* dpy, KeyCode key, Bool down, } if (xtrap_input) { - return XTRAP_FakeKeyEvent_wr(dpy, key, down, delay); + XTRAP_FakeKeyEvent_wr(dpy, key, down, delay); + return; } if (! xtest_present) { @@ -2684,6 +2720,9 @@ void XTRAP_FakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, DEBUG_SKIPPED_INPUT(debug_keyboard, "button: no-XTRAP"); return; } + /* unused vars warning: */ + if (dpy || button || is_press || delay) {} + #if LIBVNCSERVER_HAVE_LIBXTRAP XESimulateXEventRequest(trap_ctx, is_press ? ButtonPress : ButtonRelease, button, 0, 0, 0); @@ -2696,7 +2735,8 @@ void XTestFakeButtonEvent_wr(Display* dpy, unsigned int button, Bool is_press, unsigned long delay) { if (xtrap_input) { - return XTRAP_FakeButtonEvent_wr(dpy, button, is_press, delay); + XTRAP_FakeButtonEvent_wr(dpy, button, is_press, delay); + return; } if (! xtest_present) { @@ -2719,6 +2759,9 @@ void XTRAP_FakeMotionEvent_wr(Display* dpy, int screen, int x, int y, DEBUG_SKIPPED_INPUT(debug_keyboard, "motion: no-XTRAP"); return; } + /* unused vars warning: */ + if (dpy || screen || x || y || delay) {} + #if LIBVNCSERVER_HAVE_LIBXTRAP XESimulateXEventRequest(trap_ctx, MotionNotify, 0, x, y, 0); #else @@ -2730,7 +2773,8 @@ void XTestFakeMotionEvent_wr(Display* dpy, int screen, int x, int y, unsigned long delay) { if (xtrap_input) { - return XTRAP_FakeMotionEvent_wr(dpy, screen, x, y, delay); + XTRAP_FakeMotionEvent_wr(dpy, screen, x, y, delay); + return; } if (debug_pointer) { @@ -2787,6 +2831,8 @@ Bool XETrapQueryExtension_wr(Display *dpy, int *ev, int *er, int *op) { return XETrapQueryExtension(dpy, (INT32 *)ev, (INT32 *)er, (INT32 *)op); #else + /* unused vars warning: */ + if (dpy || ev || er || op) {} return False; #endif } @@ -2805,6 +2851,8 @@ int XTestGrabControl_wr(Display *dpy, Bool impervious) { int XTRAP_GrabControl_wr(Display *dpy, Bool impervious) { if (! xtrap_present) { + /* unused vars warning: */ + if (dpy || impervious) {} return 0; } #if LIBVNCSERVER_HAVE_LIBXTRAP @@ -3185,6 +3233,9 @@ int xrecord_skip_keysym(rfbKeySym keysym) { } int xrecord_skip_button(int new, int old) { + /* unused vars warning: */ + if (new || old) {} + return 0; } @@ -3405,7 +3456,7 @@ short period of time with a painting error: two cursors, one above the other. w = req->width; h = req->height; - if (w*h < scrollcopyrect_min_area) { + if (w*h < (unsigned int) scrollcopyrect_min_area) { good = 0; } else if (!src || !dst) { good = 0; @@ -3561,7 +3612,7 @@ void record_CW(XPointer ptr, XRecordInterceptData *rec_data) { int x, y, w, h; int x0, y0, w0, h0, x1, y1, w1, h1, x2, y2, w2, h2; static int index = 0; - unsigned long vals[4]; + unsigned int vals[4]; unsigned tmask; char *data; int dba = 0, db = debug_scroll; @@ -3660,13 +3711,18 @@ if (db > 1) fprintf(stderr, "record_CW-%d\n", k++); data += sz_xConfigureWindowReq; for (i=0; i<req->length; i++) { - unsigned long v; - v = *( (unsigned long *) data); + unsigned int v; + /* + * We use unsigned int for the values. There were + * some crashes on 64bit machines with unsigned longs. + * Need to check that X protocol sends 32bit values. + */ + v = *( (unsigned int *) data); +if (db > 1) fprintf(stderr, " vals[%d] 0x%x/%d\n", i, v, v); vals[i] = v; - data += 4; + data += sizeof(unsigned int); } - if (index >= MAX_CW) { int i, j; @@ -4126,6 +4182,9 @@ void record_grab(XPointer ptr, XRecordInterceptData *rec_data) { ; } XRecordFreeData(rec_data); + + /* unused vars warning: */ + if (ptr) {} } #endif @@ -4242,8 +4301,8 @@ void shutdown_record_context(XRecordContext rc, int bequiet, int reopen) { void check_xrecord_reset(int force) { static double last_reset = 0.0; - int reset_time = 90, reset_idle = 10; - int reset_time2 = 600, reset_idle2 = 40; + int reset_time = 60, require_idle = 10; + int reset_time2 = 600, require_idle2 = 40; double now; XErrorHandler old_handler = NULL; @@ -4254,7 +4313,7 @@ void check_xrecord_reset(int force) { } else { /* more dicey if not watching grabserver */ reset_time = reset_time2; - reset_idle = reset_idle2; + require_idle = require_idle2; } if (!use_xrecord) { @@ -4287,9 +4346,9 @@ void check_xrecord_reset(int force) { ; } else if (now < last_reset + reset_time) { return; - } else if (now < last_pointer_click_time + reset_idle) { + } else if (now < last_pointer_click_time + require_idle) { return; - } else if (now < last_keyboard_time + reset_idle) { + } else if (now < last_keyboard_time + require_idle) { return; } X_LOCK; @@ -4843,23 +4902,35 @@ int trapped_record_xerror = 0; int trap_xerror(Display *d, XErrorEvent *error) { trapped_xerror = 1; trapped_xerror_event = error; + + if (d) {} /* unused vars warning: */ + return 0; } int trap_xioerror(Display *d) { trapped_xioerror = 1; + + if (d) {} /* unused vars warning: */ + return 0; } int trap_getimage_xerror(Display *d, XErrorEvent *error) { trapped_getimage_xerror = 1; trapped_xerror_event = error; + + if (d) {} /* unused vars warning: */ + return 0; } int trap_record_xerror(Display *d, XErrorEvent *error) { trapped_record_xerror = 1; trapped_record_xerror_event = error; + + if (d) {} /* unused vars warning: */ + return 0; } @@ -4868,12 +4939,18 @@ void interrupted(int); static int Xerror(Display *d, XErrorEvent *error) { X_UNLOCK; interrupted(0); + + if (d) {} /* unused vars warning: */ + return (*Xerror_def)(d, error); } static int XIOerr(Display *d) { X_UNLOCK; interrupted(-1); + + if (d) {} /* unused vars warning: */ + return (*XIOerr_def)(d); } @@ -4919,9 +4996,9 @@ int crash_debug = 1; void initialize_crash_handler(void) { int pid = program_pid; - crash_stack_command1 = malloc(1000); - crash_stack_command2 = malloc(1000); - crash_debug_command = malloc(1000); + crash_stack_command1 = (char *) malloc(1000); + crash_stack_command2 = (char *) malloc(1000); + crash_debug_command = (char *) malloc(1000); snprintf(crash_stack_command1, 500, "echo where > /tmp/gdb.%d;" " env PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/bin" @@ -5122,7 +5199,7 @@ int wait_until_mapped(Window win) { while (1) { if (! valid_window(win, NULL, 0)) { if (time(0) > start + waittime) { - return 0; + break; } usleep(ms * 1000); continue; @@ -5311,16 +5388,19 @@ rfbClientPtr *client_match(char *str) { iter = rfbGetClientIterator(screen); while( (cl = rfbClientIteratorNext(iter)) ) { if (strstr(str, "0x") == str) { + unsigned int in; int id; ClientData *cd = (ClientData *) cl->clientData; - if (sscanf(str, "0x%x", &id) != 1) { + if (sscanf(str, "0x%x", &in) != 1) { if (hex_warn++) { continue; } - rfbLog("skipping bad client hex id: %s\n", str); + rfbLog("skipping invalid client hex id: %s\n", + str); continue; } - if ( cd->uid == id) { + id = (unsigned int) in; + if (cd->uid == id) { cl_list[i++] = cl; } } else { @@ -5515,6 +5595,7 @@ static int run_user_command(char *cmd, rfbClientPtr client, char *mode) { set_env("RFB_CLIENT_COUNT", str); if (no_external_cmds) { + rfbLogEnable(1); rfbLog("cannot run external commands in -nocmds mode:\n"); rfbLog(" \"%s\"\n", cmd); rfbLog(" exiting.\n"); @@ -5591,7 +5672,7 @@ static void client_gone(rfbClientPtr client) { */ if ((client->state == RFB_PROTOCOL_VERSION || client->state == RFB_AUTHENTICATION) && accepted_client) { - rfbLog("connect_once: bad password or early " + rfbLog("connect_once: invalid password or early " "disconnect.\n"); rfbLog("connect_once: waiting for next connection.\n"); accepted_client = 0; @@ -5643,6 +5724,7 @@ static int check_access(char *addr) { char line[1024], *q; if (stat(allow_list, &sbuf) != 0) { + rfbLogEnable(1); rfbLog("check_access: failure stating file: %s\n", allow_list); rfbLogPerror("stat"); @@ -5653,11 +5735,12 @@ static int check_access(char *addr) { len2 = strlen(allow_once) + 2; len += len2; } - list = malloc(len); + list = (char *) malloc(len); list[0] = '\0'; in = fopen(allow_list, "r"); if (in == NULL) { + rfbLogEnable(1); rfbLog("check_access: cannot open: %s\n", allow_list); rfbLogPerror("fopen"); clean_up_exit(1); @@ -5666,7 +5749,8 @@ static int check_access(char *addr) { if ( (q = strchr(line, '#')) != NULL) { *q = '\0'; } - if (strlen(list) + strlen(line) >= len - len2) { + if (strlen(list) + strlen(line) >= + (size_t) (len - len2)) { /* file grew since our stat() */ break; } @@ -5683,7 +5767,7 @@ static int check_access(char *addr) { if (allow_once) { len += strlen(allow_once) + 1; } - list = malloc(len); + list = (char *) malloc(len); list[0] = '\0'; strcat(list, allow_list); if (allow_once) { @@ -5759,7 +5843,7 @@ static int ugly_accept_window(char *addr, char *userhost, int X, int Y, #define t2x2_width 16 #define t2x2_height 16 -static char t2x2_bits[] = { +static unsigned char t2x2_bits[] = { 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33, 0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0x33}; @@ -5854,8 +5938,8 @@ static char t2x2_bits[] = { XSetWMProtocols(dpy, awin, &wm_delete_window, 1); if (! ico) { - ico = XCreateBitmapFromData(dpy, awin, t2x2_bits, t2x2_width, - t2x2_height); + ico = XCreateBitmapFromData(dpy, awin, (char *) t2x2_bits, + t2x2_width, t2x2_height); } hints.flags = PPosition | PSize | PMinSize; @@ -5872,6 +5956,7 @@ static char t2x2_bits[] = { XSelectInput(dpy, awin, evmask); if (! font_info && (font_info = XLoadQueryFont(dpy, "fixed")) == NULL) { + rfbLogEnable(1); rfbLog("ugly_accept_window: cannot locate font fixed.\n"); X_UNLOCK; clean_up_exit(1); @@ -5974,7 +6059,7 @@ static char t2x2_bits[] = { case ClientMessage: if (ev.xclient.message_type == wm_protocols && - ev.xclient.data.l[0] == wm_delete_window) { + (Atom) ev.xclient.data.l[0] == wm_delete_window) { out = 0; } break; @@ -6058,23 +6143,28 @@ static int action_match(char *action, int rc) { } else if (strstr(p, "view") == p) { k = 3; } else { - rfbLog("bad action line: %s\n", action); + rfbLogEnable(1); + rfbLog("invalid action line: %s\n", action); clean_up_exit(1); } if (*q == '*') { cases[k] = -1; } else if (sscanf(q, "%d", &in) == 1) { if (in < 0) { - rfbLog("bad action line: %s\n", action); + rfbLogEnable(1); + rfbLog("invalid action line: %s\n", + action); clean_up_exit(1); } cases[k] = in; } else { - rfbLog("bad action line: %s\n", action); + rfbLogEnable(1); + rfbLog("invalid action line: %s\n", action); clean_up_exit(1); } } else { - rfbLog("bad action line: %s\n", action); + rfbLogEnable(1); + rfbLog("invalid action line: %s\n", action); clean_up_exit(1); } p = strtok(NULL, ","); @@ -6282,7 +6372,7 @@ static int accept_client(rfbClientPtr client) { return 0; } - return 0; /* NOTREACHED */ + /* return 0; NOTREACHED */ } /* @@ -6376,7 +6466,7 @@ static int do_reverse_connect(char *str) { } /* copy in to host */ - host = (char *) malloc((size_t) len+1); + host = (char *) malloc(len+1); if (! host) { rfbLog("reverse_connect: could not malloc string %d\n", len); return 0; @@ -6784,6 +6874,73 @@ void clear_modifiers(int init) { XFlush(dpy); } +KeySym simple_mods[] = { + XK_Shift_L, XK_Shift_R, + XK_Control_L, XK_Control_R, + XK_Meta_L, XK_Meta_R, + XK_Alt_L, XK_Alt_R, + XK_Super_L, XK_Super_R, + XK_Hyper_L, XK_Hyper_R, + XK_Mode_switch, + NoSymbol +}; +#define NSIMPLE_MODS 13 + +int track_mod_state(rfbKeySym keysym, rfbBool down, rfbBool set) { + KeySym sym = (KeySym) keysym; + static rfbBool isdown[NSIMPLE_MODS]; + static int first = 1; + int i; + + /* + * simple tracking method for the modifier state without + * contacting the Xserver. Ignores, of course what keys are + * pressed on the physical display. + * + * This is unrelated to our mod_tweak and xkb stuff. + * Just a simple thing for heuristics, etc. + */ + + if (first) { + for (i=0; i<NSIMPLE_MODS; i++) { + isdown[i] = FALSE; + } + first = 0; + } + + if (sym != NoSymbol) { + for (i=0; i<NSIMPLE_MODS; i++) { + if (sym == simple_mods[i]) { + if (set) { + isdown[i] = down; + return 1; + } else { + if (isdown[i]) { + return 1; + } else { + return 0; + } + } + break; + } + } + /* not a modifier */ + if (set) { + return 0; + } else { + return -1; + } + } + + /* called with NoSymbol: return 1 if any pressed: */ + for (i=0; i<NSIMPLE_MODS; i++) { + if (isdown[i]) { + return 1; + } + } + return 0; +} + /* * Attempt to set all keys to Up position. Can mess up typing at the * physical keyboard so use with caution. @@ -7070,12 +7227,14 @@ static keyremap_t *keyremaps = NULL; void add_remap(char *line) { char str1[256], str2[256]; KeySym ksym1, ksym2; - int isbtn = 0, i; + int isbtn = 0; + unsigned int i; static keyremap_t *current = NULL; keyremap_t *remap; if (sscanf(line, "%s %s", str1, str2) != 2) { - rfbLog("remap: bad line: %s\n", line); + rfbLogEnable(1); + rfbLog("remap: invalid line: %s\n", line); clean_up_exit(1); } if (sscanf(str1, "0x%x", &i) == 1) { @@ -7089,14 +7248,13 @@ void add_remap(char *line) { ksym2 = XStringToKeysym(str2); } if (ksym2 == NoSymbol) { - int i; - if (sscanf(str2, "Button%d", &i) == 1) { + if (sscanf(str2, "Button%u", &i) == 1) { ksym2 = (KeySym) i; isbtn = 1; } } if (ksym1 == NoSymbol || ksym2 == NoSymbol) { - rfbLog("warning: skipping bad remap line: %s", line); + rfbLog("warning: skipping invalid remap line: %s", line); return; } remap = (keyremap_t *) malloc((size_t) sizeof(keyremap_t)); @@ -7242,11 +7400,13 @@ void initialize_remap(char *infile) { if (strstr(infile, "DEAD") == infile) { ; } else if (!strchr(infile, '-')) { + rfbLogEnable(1); rfbLog("remap: cannot open: %s\n", infile); rfbLogPerror("fopen"); clean_up_exit(1); } if ((in = tmpfile()) == NULL) { + rfbLogEnable(1); rfbLog("remap: cannot open tmpfile for %s\n", infile); rfbLogPerror("tmpfile"); clean_up_exit(1); @@ -7833,7 +7993,8 @@ xkbmodifiers[] For the KeySym bound to this (keycode,group,level) store } state++; } - if (xkbstate[kc][grp][lvl] == -1 && grp == 1) { + if (xkbstate[kc][grp][lvl] == (unsigned int) -1 + && grp == 1) { /* * Hack on Solaris 9 for Mode_switch * for Group2 characters. We force the @@ -7896,7 +8057,8 @@ xkbmodifiers[] For the KeySym bound to this (keycode,group,level) store while (p) { k = 1; if (sscanf(p, "%d", &k) != 1 || k < 0 || k >= 0x100) { - rfbLog("bad skip_keycodes: %s %s\n", + rfbLogEnable(1); + rfbLog("invalid skip_keycodes: %s %s\n", skip_keycodes, p); clean_up_exit(1); } @@ -7932,6 +8094,8 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym, static int Kc_last_down = -1; static KeySym Ks_last_down = NoSymbol; + if (client) {} /* unused vars warning: */ + X_LOCK; if (debug_keyboard) { @@ -7990,7 +8154,7 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym, } /* save it if state is OK and not told to skip */ - if (state == -1) { + if (state == (unsigned int) -1) { continue; } if (skipkeycode[kc] && debug_keyboard) { @@ -8295,7 +8459,7 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym, kc = kc_vec[kci]; ms = xkbmodifiers[kc][grp][lvl]; - if (! ms || ms != b) { + if (! ms || ms != (unsigned int) b) { continue; } @@ -8957,6 +9121,42 @@ double typing_rate(double time_window, int *repeating) { return ((double) cnt)/dt; } +int skip_cr_when_scaling(char *mode) { + int got = 0; + + if (!scaling) { + return 0; + } + + if (scaling_copyrect != scaling_copyrect0) { + /* user override via -scale: */ + if (! scaling_copyrect) { + return 1; + } else { + return 0; + } + } + if (*mode == 's') { + got = got_scrollcopyrect; + } else if (*mode == 'w') { + got = got_wirecopyrect; + } + if (scaling_copyrect || got) { + int lat, rate; + int link = link_rate(&lat, &rate); + if (link == LR_DIALUP) { + return 1; + } else if (rate < 25) { + /* the fill-in of the repair may be too slow */ + return 1; + } else { + return 0; + } + } else { + return 1; + } +} + /* * key event handler. See the above functions for contortions for * running under -modtweak. @@ -9021,15 +9221,15 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { key_history[idx].down = down; key_history[idx].time = tnow; - if (down && skip_duplicate_key_events && - (keysym == XK_Alt_L || keysym == XK_Super_L)) { - int i, k, run = 0; + if (down && (keysym == XK_Alt_L || keysym == XK_Super_L)) { + int i, k, run = 0, ups = 0; double delay = 1.0; KeySym ks; for (i=0; i<16; i++) { k = idx - i; if (k < 0) k += KEY_HIST; if (!key_history[k].down) { + ups++; continue; } ks = key_history[k].sym; @@ -9043,7 +9243,9 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { break; } } - if (run == 3 && keysym == XK_Alt_L) { + if (ups < 2) { + ; + } else if (run == 3 && keysym == XK_Alt_L) { rfbLog("3*Alt_L, calling: refresh_screen(0)\n"); refresh_screen(0); } else if (run == 4 && keysym == XK_Alt_L) { @@ -9133,6 +9335,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { return; } + track_mod_state(keysym, down, TRUE); /* ignores remaps */ + last_keyboard_client = client; last_event = last_input = now; last_keyboard_input = now; @@ -9172,12 +9376,13 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { } if (use_xrecord && ! xrecording && down) { - if (scaling && ! got_scrollcopyrect) { - ; - } else if (!strcmp(scroll_copyrect, "never")) { + + if (!strcmp(scroll_copyrect, "never")) { ; } else if (!strcmp(scroll_copyrect, "mouse")) { ; + } else if (skip_cr_when_scaling("scroll")) { + ; } else if (! xrecord_skip_keysym(keysym)) { snapshot_stack_list(0, 0.25); xrecord_watch(1, SCR_KEY); @@ -9308,14 +9513,15 @@ static void buttonparse(int from, char **s) { t = strtok(list, "+"); while (t) { KeySym ksym; + unsigned int ui; int i; if (n >= MAX_BUTTON_EVENTS - 20) { rfbLog("buttonparse: too many button map " "events: %s\n", list); break; } - if (sscanf(t, "0x%x", &i) == 1) { - ksym = (KeySym) i; /* hex value */ + if (sscanf(t, "0x%x", &ui) == 1) { + ksym = (KeySym) ui; /* hex value */ } else { X_LOCK; ksym = XStringToKeysym(t); /* string value */ @@ -9509,6 +9715,7 @@ void snapshot_stack_list(int free_only, double allowed_age) { static double last_snap = 0.0, last_free = 0.0; double now; int num, rc, i; + unsigned int ui; Window r, w; Window *list; @@ -9534,7 +9741,8 @@ void snapshot_stack_list(int free_only, double allowed_age) { last_free = now; X_LOCK; - rc = XQueryTree(dpy, rootwin, &r, &w, &list, &num); + rc = XQueryTree(dpy, rootwin, &r, &w, &list, &ui); + num = (int) ui; if (! rc) { stack_list_num = 0; @@ -9558,6 +9766,10 @@ void snapshot_stack_list(int free_only, double allowed_age) { stack_list[i].time = now; } stack_list_num = num; + if (debug_wireframe > 1) { + fprintf(stderr, "snapshot_stack_list: num=%d len=%d\n", + stack_list_num, stack_list_len); + } XFree(list); X_UNLOCK; @@ -9717,14 +9929,14 @@ static void update_x11_pointer_mask(int mask) { last_pointer_click_time = dnow(); } - if (scaling && ! got_scrollcopyrect) { - xr_mouse = 0; - } else if (nofb) { + if (nofb) { xr_mouse = 0; } else if (!strcmp(scroll_copyrect, "never")) { xr_mouse = 0; } else if (!strcmp(scroll_copyrect, "keys")) { xr_mouse = 0; + } else if (skip_cr_when_scaling("scroll")) { + xr_mouse = 0; } else if (xrecord_skip_button(mask, button_mask)) { xr_mouse = 0; } @@ -10215,6 +10427,7 @@ void initialize_pipeinput(void) { set_child_info(); if (no_external_cmds) { + rfbLogEnable(1); rfbLog("cannot run external commands in -nocmds mode:\n"); rfbLog(" \"%s\"\n", p); rfbLog(" exiting.\n"); @@ -10512,15 +10725,18 @@ int handle_subwin_resize(char *msg) { int new_x, new_y; int i, check = 10, ms = 250; /* 2.5 secs total... */ + if (msg) {} /* unused vars warning: */ if (! subwin) { return 0; /* hmmm... */ } if (! valid_window(subwin, NULL, 0)) { + rfbLogEnable(1); rfbLog("subwin 0x%lx went away!\n", subwin); X_UNLOCK; clean_up_exit(1); } if (! get_window_size(subwin, &new_x, &new_y)) { + rfbLogEnable(1); rfbLog("could not get size of subwin 0x%lx\n", subwin); X_UNLOCK; clean_up_exit(1); @@ -10536,6 +10752,7 @@ int handle_subwin_resize(char *msg) { usleep(ms * 1000); if (! get_window_size(subwin, &newer_x, &newer_y)) { + rfbLogEnable(1); rfbLog("could not get size of subwin 0x%lx\n", subwin); clean_up_exit(1); } @@ -10790,6 +11007,36 @@ static void selection_request(XEvent *ev) { XFlush(dpy); } +int check_sel_direction(char *dir, char *label, char *sel, int len) { + int db = 0, ok = 1; + if (sel_direction) { + if (strstr(sel_direction, "debug")) { + db = 1; + } + if (strcmp(sel_direction, "debug")) { + if (strstr(sel_direction, dir) == NULL) { + ok = 0; + } + } + } + if (db) { + char str[40]; + int n = 40; + strncpy(str, sel, n); + str[n-1] = '\0'; + if (len < n) { + str[len] = '\0'; + } + rfbLog("%s: %s...\n", label, str); + if (ok) { + rfbLog("%s: %s-ing it.\n", label, dir); + } else { + rfbLog("%s: NOT %s-ing it.\n", label, dir); + } + } + return ok; +} + /* * CUT_BUFFER0 property on the local display has changed, we read and * store it and send it out to any connected VNC clients. @@ -10798,7 +11045,7 @@ static void selection_request(XEvent *ev) { */ static void cutbuffer_send(void) { Atom type; - int format, slen, dlen; + int format, slen, dlen, len; unsigned long nitems = 0, bytes_after = 0; unsigned char* data = NULL; @@ -10838,7 +11085,10 @@ static void cutbuffer_send(void) { if (!screen) { return; } - rfbSendServerCutText(screen, selection_str, strlen(selection_str)); + len = strlen(selection_str); + if (check_sel_direction("send", "cutbuffer_send", selection_str, len)) { + rfbSendServerCutText(screen, selection_str, len); + } } /* @@ -10856,7 +11106,7 @@ static void cutbuffer_send(void) { #define CHKSZ 32 static void selection_send(XEvent *ev) { Atom type; - int format, slen, dlen, oldlen, newlen, toobig = 0; + int format, slen, dlen, oldlen, newlen, toobig = 0, len; static int err = 0, sent_one = 0; char before[CHKSZ], after[CHKSZ]; unsigned long nitems = 0, bytes_after = 0; @@ -10934,7 +11184,11 @@ static void selection_send(XEvent *ev) { if (!screen) { return; } - rfbSendServerCutText(screen, selection_str, newlen); + + len = newlen; + if (check_sel_direction("send", "selection_send", selection_str, len)) { + rfbSendServerCutText(screen, selection_str, len); + } } /* -- xevents.c -- */ @@ -11419,6 +11673,10 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { return; } + if (! check_sel_direction("recv", "xcut_receive", text, len)) { + return; + } + X_LOCK; /* associate this text with PRIMARY (and SECONDARY...) */ @@ -11432,9 +11690,9 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) { /* duplicate the text string for our own use. */ if (xcut_str != NULL) { free(xcut_str); + xcut_str = NULL; } - xcut_str = (unsigned char *) - malloc((size_t) (len+1) * sizeof(unsigned char)); + xcut_str = (char *) malloc((size_t) (len+1)); strncpy(xcut_str, text, len); xcut_str[len] = '\0'; /* make sure null terminated */ @@ -11541,12 +11799,12 @@ int do_remote_query(char *remote_cmd, char *query_cmd, int remote_sync) { int rc = 1; if (remote_cmd) { - rcmd = (char *)malloc(strlen(remote_cmd) + 5); + rcmd = (char *) malloc(strlen(remote_cmd) + 5); strcpy(rcmd, "cmd="); strcat(rcmd, remote_cmd); } if (query_cmd) { - qcmd = (char *)malloc(strlen(query_cmd) + 5); + qcmd = (char *) malloc(strlen(query_cmd) + 5); strcpy(qcmd, "qry="); strcat(qcmd, query_cmd); } @@ -11578,7 +11836,7 @@ char *add_item(char *instr, char *item) { return str; } len = strlen(instr) + 1 + strlen(item) + 1; - str = (char *)malloc(len); + str = (char *) malloc(len); str[0] = '\0'; /* n.b. instr will be modified; caller replaces with returned string */ @@ -11618,7 +11876,7 @@ char *delete_item(char *instr, char *item) { return str; } len = strlen(instr) + 1; - str = (char *)malloc(len); + str = (char *) malloc(len); str[0] = '\0'; /* n.b. instr will be modified; caller replaces with returned string */ @@ -11764,7 +12022,7 @@ void http_connections(int on) { void reset_httpport(int old, int new) { int hp = new; if (hp < 0) { - rfbLog("reset_httpport: bad httpport: %d\n", hp); + rfbLog("reset_httpport: invalid httpport: %d\n", hp); } else if (hp == old) { rfbLog("reset_httpport: unchanged httpport: %d\n", hp); } else if (inetd) { @@ -11785,7 +12043,7 @@ void reset_httpport(int old, int new) { void reset_rfbport(int old, int new) { int rp = new; if (rp < 0) { - rfbLog("reset_rfbport: bad rfbport: %d\n", rp); + rfbLog("reset_rfbport: invalid rfbport: %d\n", rp); } else if (rp == old) { rfbLog("reset_rfbport: unchanged rfbport: %d\n", rp); } else if (inetd) { @@ -12719,7 +12977,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { } free(before); } else { - rfbLog("bad listen string: %s\n", listen_str); + rfbLog("invalid listen string: %s\n", listen_str); free(listen_str); listen_str = before; } @@ -13389,6 +13647,18 @@ char *process_remote_cmd(char *cmd, int stringonly) { rfbLog("remote_cmd: disabling watch_primary.\n"); watch_primary = 0; + } else if (strstr(p, "seldir") == p) { + COLON_CHECK("seldir:") + if (query) { + snprintf(buf, bufn, "ans=%s%s%s", p, co, + NONUL(sel_direction)); + goto qry; + } + p += strlen("seldir:"); + rfbLog("remote_cmd: setting -seldir to %s\n", p); + if (sel_direction) free(sel_direction); + sel_direction = strdup(p); + } else if (!strcmp(p, "set_no_cursor")) { /* skip-cmd-list */ rfbLog("remote_cmd: calling set_no_cursor()\n"); set_no_cursor(); @@ -14032,6 +14302,14 @@ char *process_remote_cmd(char *cmd, int stringonly) { if (orig != noxrecord) { initialize_xrecord(); } + } else if (!strcmp(p, "reset_record")) { + NOTAPP + if (use_xrecord) { + rfbLog("resetting RECORD\n"); + check_xrecord_reset(1); + } else { + rfbLog("RECORD is disabled, not resetting.\n"); + } } else if (strstr(p, "pointer_mode") == p) { int pm; @@ -14735,6 +15013,9 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "desktopname")) { snprintf(buf, bufn, "aro=%s:%s", p, NONUL(rfb_desktop_name)); + } else if (!strcmp(p, "guess_desktop")) { + snprintf(buf, bufn, "aro=%s:%s", p, + NONUL(guess_desktop())); } else if (!strcmp(p, "http_url")) { if (screen->httpListenSock > -1) { snprintf(buf, bufn, "aro=%s:http://%s:%d", p, @@ -15049,7 +15330,7 @@ void add_region_xdamage(sraRegionPtr new_region) { reg = xdamage_regions[prev_tick]; if (reg != NULL) { -if (0) fprintf(stderr, "add_region_xdamage: prev_tick: %d reg %p\n", prev_tick, reg); +if (0) fprintf(stderr, "add_region_xdamage: prev_tick: %d reg %p\n", prev_tick, (void *)reg); sraRgnOr(reg, new_region); } } @@ -15112,6 +15393,8 @@ int collect_xdamage(int scancnt, int call) { int dup_x[DUPSZ], dup_y[DUPSZ], dup_w[DUPSZ], dup_h[DUPSZ]; double tm, dt; + if (scancnt) {} /* unused vars warning: */ + if (! xdamage_present || ! use_xdamage) { return 0; } @@ -16043,22 +16326,23 @@ void setup_cursors(void) { cursor_info_t *ci = cursors[i]; if (scaling_cursor && scale_cursor_fac != 1.0) { - int w, h, x, y, i; + int w, h, x, y, k; unsigned long *pixels; w = ci->wx; h = ci->wy; - pixels = (unsigned long *) malloc(4*w*h); + pixels = (unsigned long *) malloc(w * h + * sizeof(unsigned long)); - i = 0; + k = 0; for (y=0; y<h; y++) { for (x=0; x<w; x++) { - char d = ci->data[i]; - char m = ci->mask[i]; + char d = ci->data[k]; + char m = ci->mask[k]; unsigned long *p; - p = pixels + i; + p = pixels + k; /* set alpha on */ *p = 0xff000000; @@ -16081,7 +16365,7 @@ void setup_cursors(void) { *p |= 0x00000000; } } - i++; + k++; } } @@ -16125,8 +16409,8 @@ void setup_cursors(void) { white = WhitePixel(dpy, scr); } - rfb_curs->richSource - = (char *)calloc(ci->wx * ci->wy, 1); + rfb_curs->richSource = (unsigned char *) + calloc(ci->wx * ci->wy, 1); for (y = 0; y < ci->wy; y++) { for (x = 0; x < ci->wx; x++) { @@ -16293,7 +16577,7 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, static unsigned long black = 0, white = 1; static int first = 1; char *bitmap, *rich, *alpha; - char *new_pixels = NULL; + char *pixels_new = NULL; int n_opaque, n_trans, n_alpha, len, histo[256]; int send_alpha = 0, alpha_shift, thresh; int i, x, y; @@ -16308,6 +16592,8 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, if (scaling_cursor && scale_cursor_fac != 1.0) { int W, H; + char *pixels_use = (char *) pixels; + unsigned int *pixels32 = NULL; W = w; H = h; @@ -16315,15 +16601,52 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, w = scale_round(W, scale_cursor_fac); h = scale_round(H, scale_cursor_fac); - new_pixels = (char *) malloc(4 * w * h); + pixels_new = (char *) malloc(4*w*h); - scale_rect(scale_cursor_fac, scaling_cursor_blend, - scaling_cursor_interpolate, 4, - (char *) pixels, 4*W, new_pixels, 4*w, - W, H, w, h, - 0, 0, W, H, 0); + if (sizeof(unsigned long) == 8) { + int i, j, k = 0; + /* + * to avoid 64bpp code in scale_rect() we knock + * down to unsigned int on 64bit machines: + */ + pixels32 = (unsigned int*) malloc(4*W*H); + for (j=0; j<H; j++) { + for (i=0; i<W; i++) { + *(pixels32+k) = 0xffffffff & (*(pixels+k)); + k++; + } + } + pixels_use = (char *) pixels32; + } - pixels = (unsigned long *) new_pixels; + scale_rect(scale_cursor_fac, scaling_cursor_blend, + scaling_cursor_interpolate, + 4, pixels_use, 4*W, pixels_new, 4*w, + W, H, w, h, 0, 0, W, H, 0); + + if (sizeof(unsigned long) == 8) { + int i, j, k = 0; + unsigned long *pixels64; + unsigned int* source = (unsigned int*) pixels_new; + /* + * now knock it back up to unsigned long: + */ + pixels64 = (unsigned long*) malloc(8*w*h); + for (j=0; j<h; j++) { + for (i=0; i<w; i++) { + *(pixels64+k) = (unsigned long) (*(source+k)); + k++; + } + } + free(pixels_new); + pixels_new = (char *) pixels64; + if (pixels32) { + free(pixels32); + pixels32 = NULL; + } + } + + pixels = (unsigned long *) pixels_new; xhot = scale_round(xhot, scale_cursor_fac); yhot = scale_round(yhot, scale_cursor_fac); @@ -16331,7 +16654,7 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, len = w * h; /* for bitmap data */ - bitmap = (char *)malloc(len+1); + bitmap = (char *) malloc(len+1); bitmap[len] = '\0'; /* for rich cursor pixel data */ @@ -16356,7 +16679,7 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, n_alpha++; } histo[a]++; - if (a < alpha_threshold) { + if (a < (unsigned int) alpha_threshold) { n_trans++; } else { n_opaque++; @@ -16399,7 +16722,7 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, a = a >> 24; /* alpha channel */ - if (a < thresh) { + if (a < (unsigned int) thresh) { bitmap[i] = ' '; } else { bitmap[i] = 'x'; @@ -16482,8 +16805,8 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, c = rfbMakeXCursor(w, h, bitmap, bitmap); free(bitmap); - if (new_pixels) { - free(new_pixels); + if (pixels_new) { + free(pixels_new); } /* set up the cursor parameters: */ @@ -16493,10 +16816,10 @@ rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h, c->cleanupSource = FALSE; c->cleanupMask = FALSE; c->cleanupRichSource = FALSE; - c->richSource = rich; + c->richSource = (unsigned char *) rich; if (alpha_blend && !indexed_color) { - c->alphaSource = alpha; + c->alphaSource = (unsigned char *) alpha; c->alphaPreMultiplied = TRUE; } else { free(alpha); @@ -17024,6 +17347,8 @@ int set_cursor(int x, int y, int which) { static int last = -1; int changed_cursor = 0; + if (x || y) {} /* unused vars warning: */ + if (which < 0) { which = last; } @@ -17106,8 +17431,8 @@ void set_colormap(int reset) { screen->colourMap.count = NCOLOR; screen->serverFormat.trueColour = FALSE; screen->colourMap.is16 = TRUE; - screen->colourMap.data.shorts = (unsigned short*) - malloc(3*sizeof(short) * NCOLOR); + screen->colourMap.data.shorts = (unsigned short *) + malloc(3*sizeof(unsigned short) * NCOLOR); } for (i=0; i < NCOLOR; i++) { @@ -17319,13 +17644,14 @@ void set_visual(char *str) { } else if (strcmp(vstring, "DirectColor") == 0) { vis = DirectColor; } else { - int v_in; + unsigned int v_in; if (sscanf(vstring, "0x%x", &v_in) != 1) { - if (sscanf(vstring, "%d", &v_in) == 1) { + if (sscanf(vstring, "%u", &v_in) == 1) { visual_id = (VisualID) v_in; return; } - rfbLog("bad -visual arg: %s\n", vstring); + rfbLogEnable(1); + rfbLog("invalid -visual arg: %s\n", vstring); X_UNLOCK; clean_up_exit(1); } @@ -17340,6 +17666,7 @@ void set_visual(char *str) { } else if (XMatchVisualInfo(dpy, scr, defdepth, vis, &vinfo)) { ; } else { + rfbLogEnable(1); rfbLog("could not find visual: %s\n", vstring); X_UNLOCK; clean_up_exit(1); @@ -17430,17 +17757,20 @@ void set_raw_fb_params(int restore) { if (! dpy && raw_fb_orig_dpy) { dpy = XOpenDisplay(raw_fb_orig_dpy); if (dpy) { - rfbLog("reopened DISPLAY: %s\n", + if (! quiet) rfbLog("reopened DISPLAY: %s\n", raw_fb_orig_dpy); } else { - rfbLog("WARNING: failed to reopen " + if (! quiet) rfbLog("WARNING: failed to reopen " "DISPLAY: %s\n", raw_fb_orig_dpy); } } return; } - rfbLog("set_raw_fb_params: modifying settings for -rawfb mode.\n"); + if (! quiet) { + rfbLog("set_raw_fb_params: modifying settings for " + "-rawfb mode.\n"); + } if (got_noviewonly) { /* @@ -17449,50 +17779,56 @@ void set_raw_fb_params(int restore) { * (i.e. rawfb but also send user input to the X * display, most likely using /dev/fb0 for some reason...) */ - rfbLog("rawfb: -noviewonly mode: still sending mouse and\n"); - rfbLog("rawfb: keyboard input to the X DISPLAY!!\n"); + if (! quiet) { + rfbLog("rawfb: -noviewonly mode: still sending mouse and\n"); + rfbLog("rawfb: keyboard input to the X DISPLAY!!\n"); + } } else { /* Normal case: */ if (! view_only) { - rfbLog("rawfb: setting view_only\n"); + if (! quiet) rfbLog("rawfb: setting view_only\n"); view_only = 1; } if (watch_selection) { - rfbLog("rawfb: turning off watch_selection\n"); + if (! quiet) rfbLog("rawfb: turning off " + "watch_selection\n"); watch_selection = 0; } if (watch_primary) { - rfbLog("rawfb: turning off watch_primary\n"); + if (! quiet) rfbLog("rawfb: turning off " + "watch_primary\n"); watch_primary = 0; } if (watch_bell) { - rfbLog("rawfb: turning off watch_bell\n"); + if (! quiet) rfbLog("rawfb: turning off watch_bell\n"); watch_bell = 0; } if (no_autorepeat) { - rfbLog("rawfb: turning off no_autorepeat\n"); + if (! quiet) rfbLog("rawfb: turning off " + "no_autorepeat\n"); no_autorepeat = 0; } if (use_solid_bg) { - rfbLog("rawfb: turning off use_solid_bg\n"); + if (! quiet) rfbLog("rawfb: turning off " + "use_solid_bg\n"); use_solid_bg = 0; } multiple_cursors_mode = strdup("arrow"); } if (use_snapfb) { - rfbLog("rawfb: turning off use_snapfb\n"); + if (! quiet) rfbLog("rawfb: turning off use_snapfb\n"); use_snapfb = 0; } if (using_shm) { - rfbLog("rawfb: turning off using_shm\n"); + if (! quiet) rfbLog("rawfb: turning off using_shm\n"); using_shm = 0; } if (take_naps) { - rfbLog("rawfb: turning off take_naps\n"); + if (! quiet) rfbLog("rawfb: turning off take_naps\n"); take_naps = 0; } if (xrandr) { - rfbLog("rawfb: turning off xrandr\n"); + if (! quiet) rfbLog("rawfb: turning off xrandr\n"); xrandr = 0; } } @@ -17664,6 +18000,7 @@ XImage *initialize_raw_fb(void) { set_child_info(); q += strlen("setup:"); if (no_external_cmds) { + rfbLogEnable(1); rfbLog("cannot run external commands in -nocmds " "mode:\n"); rfbLog(" \"%s\"\n", q); @@ -17673,12 +18010,14 @@ XImage *initialize_raw_fb(void) { rfbLog("running command to setup rawfb: %s\n", q); pipe = popen(q, "r"); if (! pipe) { + rfbLogEnable(1); rfbLog("popen of setup command failed.\n"); rfbLogPerror("popen"); clean_up_exit(1); } line[0] = '\0'; if (fgets(line, 1024, pipe) == NULL) { + rfbLogEnable(1); rfbLog("read of setup command failed.\n"); clean_up_exit(1); } @@ -17770,11 +18109,13 @@ XImage *initialize_raw_fb(void) { } } if ((q = strrchr(str, '@')) == NULL) { + rfbLogEnable(1); rfbLog("invalid rawfb str: %s\n", str); clean_up_exit(1); } /* @WxHxB */ if (sscanf(q, "@%dx%dx%d", &w, &h, &b) != 3) { + rfbLogEnable(1); rfbLog("invalid rawfb str: %s\n", str); clean_up_exit(1); } @@ -17790,7 +18131,7 @@ XImage *initialize_raw_fb(void) { rfbLog("no type prefix: %s\n", raw_fb_str); rfbLog(" but file exists, so assuming: map:%s\n", raw_fb_str); - new = (char *)malloc(len); + new = (char *) malloc(len); strcpy(new, "map:"); strcat(new, str); free(str); @@ -17814,6 +18155,7 @@ XImage *initialize_raw_fb(void) { #if LIBVNCSERVER_HAVE_XSHM raw_fb_addr = (char *) shmat(shmid, 0, SHM_RDONLY); if (! raw_fb_addr) { + rfbLogEnable(1); rfbLog("failed to attach to shm: %d, %s\n", shmid, str); rfbLogPerror("shmat"); clean_up_exit(1); @@ -17822,6 +18164,7 @@ XImage *initialize_raw_fb(void) { rfbLog("rawfb: shm: %d W: %d H: %d B: %d addr: %p\n", shmid, w, h, b, raw_fb_addr); #else + rfbLogEnable(1); rfbLog("x11vnc was compiled without shm support.\n"); rfbLogPerror("shmat"); clean_up_exit(1); @@ -17840,6 +18183,7 @@ XImage *initialize_raw_fb(void) { fd = open(q, O_RDONLY); if (fd < 0) { + rfbLogEnable(1); rfbLog("failed to open file: %s, %s\n", q, str); rfbLogPerror("open"); clean_up_exit(1); @@ -17861,6 +18205,7 @@ XImage *initialize_raw_fb(void) { fd, 0); if (raw_fb_addr == MAP_FAILED || raw_fb_addr == NULL) { + rfbLogEnable(1); rfbLog("failed to mmap file: %s, %s\n", q, str); rfbLog(" raw_fb_addr: %p\n", raw_fb_addr); rfbLogPerror("mmap"); @@ -17883,6 +18228,7 @@ XImage *initialize_raw_fb(void) { rfbLog(" W: %d H: %d B: %d sz: %d\n", w, h, b, size); } } else { + rfbLogEnable(1); rfbLog("invalid rawfb str: %s\n", str); clean_up_exit(1); } @@ -18017,6 +18363,7 @@ XImage *initialize_xdisplay_fb(void) { wait_until_mapped(subwin); } if (!valid_window((Window) subwin, NULL, 0)) { + rfbLogEnable(1); rfbLog("invalid sub-window: 0x%lx\n", subwin); X_UNLOCK; clean_up_exit(1); @@ -18073,6 +18420,7 @@ XImage *initialize_xdisplay_fb(void) { window = (Window) subwin; if (! XGetWindowAttributes(dpy, window, &attr)) { + rfbLogEnable(1); rfbLog("invalid window: 0x%lx\n", window); X_UNLOCK; clean_up_exit(1); @@ -18107,6 +18455,7 @@ XImage *initialize_xdisplay_fb(void) { vinfo_tmpl.visualid = visual_id; vinfo = XGetVisualInfo(dpy, VisualIDMask, &vinfo_tmpl, &n); if (vinfo == NULL || n == 0) { + rfbLogEnable(1); rfbLog("could not match visual_id: 0x%x\n", (int) visual_id); X_UNLOCK; @@ -18120,7 +18469,8 @@ XImage *initialize_xdisplay_fb(void) { } if (! quiet) { fprintf(stderr, " initialize_xdisplay_fb()\n"); - fprintf(stderr, " Visual*: %p\n", vinfo->visual); + fprintf(stderr, " Visual*: %p\n", + (void *) vinfo->visual); fprintf(stderr, " visualid: 0x%x\n", (int) vinfo->visualid); fprintf(stderr, " screen: %d\n", vinfo->screen); @@ -18217,6 +18567,7 @@ XImage *initialize_xdisplay_fb(void) { if (try < subwin_tries) { usleep(250 * 1000); if (!get_window_size(window, &wdpy_x, &wdpy_y)) { + rfbLogEnable(1); rfbLog("could not get size of subwin " "0x%lx\n", subwin); X_UNLOCK; @@ -18280,17 +18631,20 @@ void parse_scale_string(char *str, double *factor, int *scaling, int *blend, if (strstr(p+1, "pad") != NULL) { *pad = 1; } - if (strstr(p+1, "cr") != NULL) { + if (strstr(p+1, "nocr") != NULL) { /* global */ - got_scrollcopyrect = 1; - got_wirecopyrect = 1; + scaling_copyrect = 0; + } else if (strstr(p+1, "cr") != NULL) { + /* global */ + scaling_copyrect = 1; } *p = '\0'; } if (strchr(tstr, '.') != NULL) { double test, diff, eps = 1.0e-7; if (sscanf(tstr, "%lf", &f) != 1) { - rfbLog("bad -scale arg: %s\n", tstr); + rfbLogEnable(1); + rfbLog("invalid -scale arg: %s\n", tstr); clean_up_exit(1); } *factor = (double) f; @@ -18311,13 +18665,15 @@ void parse_scale_string(char *str, double *factor, int *scaling, int *blend, } } if (*factor < 0.01) { + rfbLogEnable(1); rfbLog("-scale factor too small: %f\n", scale_fac); clean_up_exit(1); } } else { if (sscanf(tstr, "%d/%d", &m, &n) != 2) { if (sscanf(tstr, "%d", &m) != 1) { - rfbLog("bad -scale arg: %s\n", tstr); + rfbLogEnable(1); + rfbLog("invalid -scale arg: %s\n", tstr); clean_up_exit(1); } else { /* e.g. -scale 1 or -scale 2 */ @@ -18325,11 +18681,13 @@ void parse_scale_string(char *str, double *factor, int *scaling, int *blend, } } if (n <= 0 || m <=0) { - rfbLog("bad -scale arg: %s\n", tstr); + rfbLogEnable(1); + rfbLog("invalid -scale arg: %s\n", tstr); clean_up_exit(1); } *factor = ((double) m)/ n; if (*factor < 0.01) { + rfbLogEnable(1); rfbLog("-scale factor too small: %f\n", *factor); clean_up_exit(1); } @@ -18470,6 +18828,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { } if (! screen) { int i; + rfbLogEnable(1); rfbLog("\n"); rfbLog("failed to create rfb screen.\n"); for (i=0; i< *argc; i++) { @@ -18480,6 +18839,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { if (create_screen && *argc != 1) { int i; + rfbLogEnable(1); rfbLog("*** unrecognized option(s) ***\n"); for (i=1; i< *argc; i++) { rfbLog("\t[%d] %s\n", i, argv[i]); @@ -18740,6 +19100,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { if (inetd) { int fd = dup(0); if (fd < 3) { + rfbLogEnable(1); rfbErr("dup(0) = %d failed.\n", fd); rfbLogPerror("dup"); clean_up_exit(1); @@ -18778,7 +19139,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) { if (viewonly_passwd) { /* append the view only passwd after the normal passwd */ - char **passwds_new = malloc(3*sizeof(char**)); + char **passwds_new = (char **) malloc(3*sizeof(char *)); char **passwds_old = (char **) screen->authPasswdData; passwds_new[0] = passwds_old[0]; passwds_new[1] = viewonly_passwd; @@ -19148,7 +19509,7 @@ void solid_cde(char *color) { cnt = 0; twin = 0x0; - for (i=0; i<length; i++) { + for (i=0; i< (int) length; i++) { if (*(data+i) != '\0') { continue; } @@ -19259,19 +19620,19 @@ void solid_gnome(char *color) { orig_option = strdup("stretched"); } if (strstr(orig_color, "'") != NULL) { - rfbLog("bad color: %s\n", orig_color); + rfbLog("invalid color: %s\n", orig_color); return; } if (strstr(orig_option, "'") != NULL) { - rfbLog("bad option: %s\n", orig_option); + rfbLog("invalid option: %s\n", orig_option); return; } - cmd = (char *)malloc(strlen(set_option) - 2 + + cmd = (char *) malloc(strlen(set_option) - 2 + strlen(orig_option) + 1); sprintf(cmd, set_option, orig_option); dt_cmd(cmd); free(cmd); - cmd = (char *)malloc(strlen(set_color) - 2 + + cmd = (char *) malloc(strlen(set_color) - 2 + strlen(orig_color) + 1); sprintf(cmd, set_color, orig_color); dt_cmd(cmd); @@ -19300,15 +19661,15 @@ void solid_gnome(char *color) { } } if (strstr(color, "'") != NULL) { - rfbLog("bad color: %s\n", color); + rfbLog("invalid color: %s\n", color); return; } - cmd = (char *)malloc(strlen(set_color) + strlen(color) + 1); + cmd = (char *) malloc(strlen(set_color) + strlen(color) + 1); sprintf(cmd, set_color, color); dt_cmd(cmd); free(cmd); - cmd = (char *)malloc(strlen(set_option) + strlen("none") + 1); + cmd = (char *) malloc(strlen(set_option) + strlen("none") + 1); sprintf(cmd, set_option, "none"); dt_cmd(cmd); free(cmd); @@ -19326,14 +19687,14 @@ void solid_kde(char *color) { user = get_user_name(); if (strstr(user, "'") != NULL) { - rfbLog("bad user: %s\n", user); + rfbLog("invalid user: %s\n", user); free(user); return; } if (! color) { len = strlen(bg_on) + strlen(user) + 1; - cmd = (char *)malloc(len); + cmd = (char *) malloc(len); sprintf(cmd, bg_on, user); dt_cmd(cmd); free(cmd); @@ -19343,18 +19704,18 @@ void solid_kde(char *color) { } if (strstr(color, "'") != NULL) { - rfbLog("bad color: %s\n", color); + rfbLog("invalid color: %s\n", color); return; } len = strlen(set_color) + strlen(user) + strlen(color) + 1; - cmd = (char *)malloc(len); + cmd = (char *) malloc(len); sprintf(cmd, set_color, user, color); dt_cmd(cmd); free(cmd); len = strlen(bg_off) + strlen(user) + 1; - cmd = (char *)malloc(len); + cmd = (char *) malloc(len); sprintf(cmd, bg_off, user); dt_cmd(cmd); free(cmd); @@ -19364,23 +19725,25 @@ void solid_kde(char *color) { char *guess_desktop() { Atom prop; prop = XInternAtom(dpy, "XFCE_DESKTOP_WINDOW", True); - if (prop != None) { - return "xfce"; - } - prop = XInternAtom(dpy, "_QT_DESKTOP_PROPERTIES", True); - if (prop != None) { - return "kde"; - } + if (prop != None) return "xfce"; + + /* special case windowmaker */ + prop = XInternAtom(dpy, "_WINDOWMAKER_WM_PROTOCOLS", True); + if (prop != None) return "root"; + + prop = XInternAtom(dpy, "_WINDOWMAKER_COMMAND", True); + if (prop != None) return "root"; + prop = XInternAtom(dpy, "NAUTILUS_DESKTOP_WINDOW_ID", True); - if (prop != None) { - return "gnome"; - } + if (prop != None) return "gnome"; + + prop = XInternAtom(dpy, "KWIN_RUNNING", True); + if (prop != None) return "kde"; + prop = XInternAtom(dpy, "_MOTIF_WM_INFO", True); if (prop != None) { prop = XInternAtom(dpy, "_DT_WORKSPACE_LIST", True); - if (prop != None) { - return "cde"; - } + if (prop != None) return "cde"; } return "root"; } @@ -19747,8 +20110,8 @@ void initialize_xinerama (void) { /* max len is 10000x10000+10000+10000 (23 chars) per geometry */ rcnt = (int) sraRgnCountRects(black_region); - bstr = (char *) malloc(30 * (rcnt+1) * sizeof(char)); - tstr = (char *) malloc(30 * sizeof(char)); + bstr = (char *) malloc(30 * (rcnt+1)); + tstr = (char *) malloc(30); bstr[0] = '\0'; iter = sraRgnGetIterator(black_region); @@ -19794,7 +20157,7 @@ void initialize_blackouts_and_xinerama(void) { } } -void push_sleep(n) { +void push_sleep(int n) { int i; for (i=0; i<n; i++) { rfbPE(-1); @@ -20025,11 +20388,19 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h, if (xim == NULL) { rfbErr("XCreateImage(%s) failed.\n", name); + if (quiet) { + fprintf(stderr, "XCreateImage(%s) failed.\n", + name); + } return 0; } xim->data = (char *) malloc(xim->bytes_per_line * xim->height); if (xim->data == NULL) { rfbErr("XCreateImage(%s) data malloc failed.\n", name); + if (quiet) { + fprintf(stderr, "XCreateImage(%s) data malloc" + " failed.\n", name); + } return 0; } if (flip_byte_order) { @@ -20050,6 +20421,9 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h, if (xim == NULL) { rfbErr("XShmCreateImage(%s) failed.\n", name); + if (quiet) { + fprintf(stderr, "XShmCreateImage(%s) failed.\n", name); + } X_UNLOCK; return 0; } @@ -22371,7 +22745,7 @@ int scan_for_updates(int count_only) { } /* -- gui.c -- */ -#if SMALL_FOOTPRINT +#ifdef NOGUI char gui_code[] = ""; #else #include "tkx11vnc.h" @@ -22390,7 +22764,7 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui, FILE *pipe, *tmpf; if (*gui_code == '\0') { - rfbLog("gui not available in this program.\n"); + rfbLog("gui not compiled into this program.\n"); exit(0); } if (getenv("DISPLAY") != NULL) { @@ -22496,7 +22870,7 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui, "wish8.0"}; int nwishes = 3, i; - try = (char *)malloc(strlen(p) + 1 + strlen("wish8.4") + 1); + try = (char *) malloc(strlen(p) + 1 + strlen("wish8.4") + 1); for (i=0; i<nwishes; i++) { sprintf(try, "%s/%s", p, wishes[i]); if (stat(try, &sbuf) == 0) { @@ -22692,7 +23066,7 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) { } if (! nm_cache) { - nm_cache = (char *)malloc(1024); + nm_cache = (char *) malloc(1024); nm_cache_len = 1024; nm_cache[0] = '\0'; } @@ -22701,7 +23075,7 @@ Window descend_pointer(int depth, Window start, char *name_info, int len) { free(nm_cache); } nm_cache_len = 2*len; - nm_cache = (char *)malloc(nm_cache_len); + nm_cache = (char *) malloc(nm_cache_len); } if (name_info) { @@ -22947,8 +23321,8 @@ void parse_fixscreen(void) { } /* -WIREFRAME_PARMS "0xff,2,0,30+6+6+6,0.05+0.3+2.0,8" -shade,linewidth,percent,T+B+L+R,t1+t2+t3 +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 unsigned long wireframe_shade; @@ -22956,6 +23330,7 @@ int wireframe_lw; double wireframe_frac; int wireframe_top, wireframe_bot, wireframe_left, wireframe_right; double wireframe_t1, wireframe_t2, wireframe_t3, wireframe_t4; +char *wireframe_mods = NULL; /* * Parse the gory -wireframe string for parameters. @@ -23021,7 +23396,7 @@ void parse_wireframe_str(char *wf) { ; } else if (sscanf(str, "0x%lx", &n) == 1) { wireframe_shade = n; - } else if (sscanf(str, "%ld", &n) == 1) { + } else if (sscanf(str, "%lu", &n) == 1) { wireframe_shade = n; } else if (sscanf(str, "%lx", &n) == 1) { wireframe_shade = n; @@ -23071,8 +23446,30 @@ void parse_wireframe_str(char *wf) { free(str); } - /* check_wireframe() timing heuristics. */ + /* + * wireframe in interior with Modifier down. + * 0 => no mods + * 1 => all mods + * Shift,Alt,Control,Meta,Super,Hyper + */ + if (wireframe_mods) { + free(wireframe_mods); + } + wireframe_mods = NULL; if ((str = part[4]) != NULL) { + if (*str == '0' || !strcmp(str, "none")) { + ; + } else if (*str == '1' || !strcmp(str, "all")) { + wireframe_mods = strdup("all"); + } else if (!strcmp(str, "Alt") || !strcmp(str, "Shift") + || !strcmp(str, "Control") || !strcmp(str, "Meta") + || !strcmp(str, "Super") || !strcmp(str, "Hyper")) { + wireframe_mods = strdup(str); + } + } + + /* check_wireframe() timing heuristics. */ + if ((str = part[5]) != NULL) { double t1, t2, t3, t4; if (sscanf(str, "%lf+%lf+%lf+%lf", &t1, &t2, &t3, &t4) == 4) { wireframe_t1 = t1; @@ -23232,7 +23629,7 @@ void initialize_scroll_keys(void) { nkeys++; /* exclude/include 0 element */ nkeys++; /* trailing NoSymbol */ - scroll_key_list = (KeySym *)malloc(nkeys*sizeof(KeySym)); + scroll_key_list = (KeySym *) malloc(nkeys*sizeof(KeySym)); for (i=0; i<nkeys; i++) { scroll_key_list[i] = NoSymbol; } @@ -23257,8 +23654,8 @@ void initialize_scroll_keys(void) { } } } else { - int in; - if (sscanf(p, "%d", &in) == 1) { + unsigned int in; + if (sscanf(p, "%u", &in) == 1) { scroll_key_list[i++] = (rfbKeySym) in; } else if (sscanf(p, "0x%x", &in) == 1) { scroll_key_list[i++] = (rfbKeySym) in; @@ -23320,11 +23717,11 @@ void initialize_scroll_matches(void) { if (strstr(s, "MOUSE:") == s) nmouse++; } if (nkey++) { - scroll_good_key = (char **)malloc(nkey*sizeof(char *)); + scroll_good_key = (char **) malloc(nkey*sizeof(char *)); for (i=0; i<nkey; i++) scroll_good_key[i] = NULL; } if (nmouse++) { - scroll_good_mouse = (char **)malloc(nmouse*sizeof(char *)); + scroll_good_mouse = (char **) malloc(nmouse*sizeof(char *)); for (i=0; i<nmouse; i++) scroll_good_mouse[i] = NULL; } nkey = 0; @@ -23359,11 +23756,11 @@ void initialize_scroll_matches(void) { if (strstr(s, "MOUSE:") == s) nmouse++; } if (nkey++) { - scroll_skip_key = (char **)malloc(nkey*sizeof(char *)); + scroll_skip_key = (char **) malloc(nkey*sizeof(char *)); for (i=0; i<nkey; i++) scroll_skip_key[i] = NULL; } if (nmouse++) { - scroll_skip_mouse = (char **)malloc(nmouse*sizeof(char *)); + scroll_skip_mouse = (char **) malloc(nmouse*sizeof(char *)); for (i=0; i<nmouse; i++) scroll_skip_mouse[i] = NULL; } nkey = 0; @@ -23470,7 +23867,7 @@ void draw_box(int x, int y, int w, int h, int restore) { save[i] = (saveline_t *) malloc(sizeof(saveline_t)); save[i]->saved = 0; sz = (LW_MAX+1)*len*pixelsize; - save[i]->data = (char *)malloc(sz); + save[i]->data = (char *) malloc(sz); /* * Four types of lines: @@ -24012,6 +24409,14 @@ int set_ypad(void) { return y_accum; } +void scale_mark(int x1, int y1, int x2, int y2) { + int s = 2; + x1 = nfix(x1 - s, dpy_x); + y1 = nfix(y1 - s, dpy_y); + x2 = nfix(x2 + s, dpy_x+1); + y2 = nfix(y2 + s, dpy_y+1); + scale_and_mark_rect(x1, y1, x2, y2); +} #define PUSH_TEST(n) \ if (n) { \ @@ -24035,6 +24440,7 @@ int push_scr_ev(double *age, int type, int bdpush, int bdx, int bdy, sraRegionPtr backfill, whole, tmpregion, tmpregion2; int link, latency, netrate; int ypad = 0; + double last_scroll_event_save = last_scroll_event; /* we return the oldest one. */ *age = 0.0; @@ -24334,18 +24740,37 @@ if (db && bdpush) fprintf(stderr, "BDPUSH-TIME: 0x%lx\n", xrecord_wm_window); if (0) fprintf(stderr, " fb_push dt: %.4f", dt); if (scaling) { static double last_time = 0.0; - double now = dnow(), delay = 0.35; - - if (now > last_time + delay) { - int s = 2; - int x1 = nfix(x0 - s, dpy_x); - int y1 = nfix(y0 - s, dpy_y); - int x2 = nfix(x0 + w0 + s, dpy_x+1); - int y2 = nfix(y0 + h0 + s, dpy_y+1); - scale_and_mark_rect(x1, y1, x2, y2); - last_time = now; + double now = dnow(), delay = 0.4, first_wait = 3.0; + double trate; + int repeating, lat, rate; + int link = link_rate(&lat, &rate); + int skip_first = 0; + + if (link == LR_DIALUP || rate < 35) { + delay *= 4; + } else if (link != LR_LAN || rate < 100) { + delay *= 2; + } + + trate = typing_rate(0.0, &repeating); + + if (xrecord_set_by_mouse || repeating >= 3) { + if (now > last_scroll_event_save + first_wait) { + skip_first = 1; + } + } + + if (skip_first) { + /* + * try not to send the first one, but a + * single keystroke scroll would be OK. + */ + } else if (now > last_time + delay) { + + scale_mark(x0, y0, x0 + w0, y0 + h0); last_copyrect_fix = now; } + last_time = now; } } @@ -24523,12 +24948,22 @@ typedef struct scroll_result { int result; } scroll_result_t; -#define SCR_RESULTS_MAX 64 +#define SCR_RESULTS_MAX 256 scroll_result_t scroll_results[SCR_RESULTS_MAX]; int scrollability(Window win, int set) { double oldest = -1.0; int i, index = -1, next_index = -1; + static int first = 1; + + if (first) { + for (i=0; i<SCR_RESULTS_MAX; i++) { + scroll_results[i].win = None; + scroll_results[i].time = 0.0; + scroll_results[i].result = 0; + } + first = 0; + } if (win == None) { return 0; @@ -24539,6 +24974,9 @@ int scrollability(Window win, int set) { if (win == scroll_results[i].win) { return scroll_results[i].result; } + if (scroll_results[i].win == None) { + break; + } } return 0; } @@ -24552,6 +24990,9 @@ int scrollability(Window win, int set) { index = i; break; } + if (next_index >= 0 && scroll_results[i].win == None) { + break; + } } if (set == SCR_SUCCESS) { @@ -24573,10 +25014,11 @@ int scrollability(Window win, int set) { */ set = 1; } else { - scroll_results[index].time = dnow(); scroll_results[index].result = set; } + scroll_results[index].time = dnow(); } + return set; } @@ -24732,7 +25174,13 @@ int check_xrecord_keys(void) { return 0; } +#if 0 + /* not used for keyboard yet */ scroll_rep = scrollability(xrecord_ptr_window, SCR_NONE) + 1; + if (scroll_rep == 1) { + scroll_rep = 2; /* if no info, assume the best. */ + } +#endif scroll_keysym = xrecord_scroll_keysym(last_rfb_keysym); @@ -24742,7 +25190,7 @@ int check_xrecord_keys(void) { max_spin = 2 * set_repeat_in; } else if (tnow < last_key_scroll + scroll_persist) { max_spin = 1.25*(tnow - last_key_scroll); - } else if (tnow < last_key_to_button_remap_time + scroll_persist) { + } else if (tnow < last_key_to_button_remap_time + 1.5*scroll_persist) { /* mostly a hack I use for testing -remap key -> btn4/btn5 */ max_spin = scroll_persist; } else if (scroll_keysym) { @@ -24814,9 +25262,11 @@ if (0 || db) fprintf(stderr, "check_xrecord: more keys: %.3f 0x%x " flush2 = 1; XFlush(dpy); } +#if LIBVNCSERVER_HAVE_RECORD SCR_LOCK; XRecordProcessReplies(rdpy_data); SCR_UNLOCK; +#endif X_UNLOCK; if (spin >= max_spin * spin_fac) { @@ -24958,6 +25408,9 @@ if (0) fprintf(stderr, "check_xrecord_mouse: IN xrecording: %d\n", xrecording); } scroll_rep = scrollability(xrecord_ptr_window, SCR_NONE) + 1; + if (scroll_rep == 1) { + scroll_rep = 2; /* if no info, assume the best. */ + } if (button_mask_prev) { already_down = 1; @@ -25110,9 +25563,11 @@ if (db) fprintf(stderr, "check_xrecord: BUTTON_UP_SCROLL: %.3f\n", spin); input++; } X_LOCK; +#if LIBVNCSERVER_HAVE_RECORD SCR_LOCK; XRecordProcessReplies(rdpy_data); SCR_UNLOCK; +#endif X_UNLOCK; if (! input) { @@ -25250,23 +25705,12 @@ if (db) fprintf(stderr, "FLUSH-2\n"); int check_xrecord(void) { int watch_keys = 0, watch_mouse = 0, consider_mouse; - static int first = 1; static int mouse_wants_back_in = 0; - if (first) { - int i; - for (i=0; i<SCR_RESULTS_MAX; i++) { - scroll_results[i].win = None; - scroll_results[i].time = 0.0; - scroll_results[i].result = 0; - } - first = 0; - } - if (! use_xrecord) { return 0; } - if (scaling && ! got_scrollcopyrect) { + if (skip_cr_when_scaling("scroll")) { return 0; } @@ -25411,7 +25855,7 @@ if (db2) fprintf(stderr, "moved_win: %4d %3d, %4d %3d 0x%lx ---\n", for (k = stack_list_num - 1; k >= 0; k--) { Window swin; - if (dt_bad) { + if (0 && dt_bad) { break; } @@ -25701,6 +26145,53 @@ void check_fixscreen(void) { } } +int wireframe_mod_state() { + if (! wireframe_mods) { + return 0; + } + if (!strcmp(wireframe_mods, "all")) { + return track_mod_state(NoSymbol, FALSE, FALSE); + + } else if (!strcmp(wireframe_mods, "Alt")) { + if (track_mod_state(XK_Alt_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Alt_R, FALSE, FALSE) == 1) { + return 1; + } + } else if (!strcmp(wireframe_mods, "Shift")) { + if (track_mod_state(XK_Shift_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Shift_R, FALSE, FALSE) == 1) { + return 1; + } + } else if (!strcmp(wireframe_mods, "Control")) { + if (track_mod_state(XK_Control_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Control_R, FALSE, FALSE) == 1) { + return 1; + } + } else if (!strcmp(wireframe_mods, "Meta")) { + if (track_mod_state(XK_Meta_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Meta_R, FALSE, FALSE) == 1) { + return 1; + } + } else if (!strcmp(wireframe_mods, "Super")) { + if (track_mod_state(XK_Super_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Super_R, FALSE, FALSE) == 1) { + return 1; + } + } else if (!strcmp(wireframe_mods, "Hyper")) { + if (track_mod_state(XK_Hyper_L, FALSE, FALSE) == 1) { + return 1; + } else if (track_mod_state(XK_Hyper_R, FALSE, FALSE) == 1) { + return 1; + } + } + return 0; +} + /* * Applied just before any check_user_input() modes. Look for a * ButtonPress; find window it happened in; find the wm frame window @@ -25748,7 +26239,7 @@ int check_wireframe(void) { double frame_changed_spin = wireframe_t2; double max_spin = wireframe_t3; double min_draw = wireframe_t4; - int near_edge; + int try_it = 0; DB_SET if (nofb) { @@ -25795,8 +26286,13 @@ if (db) fprintf(stderr, " frame: x: %d y: %d w: %d h: %d px: %d py: %d fr * decorations on the edge of the window. */ - near_edge = near_wm_edge(x, y, w, h, px, py); - if (! near_edge) { + try_it = near_wm_edge(x, y, w, h, px, py); + + /* Often Alt+ButtonDown starts a window move: */ + if (! try_it && wireframe_mod_state()) { + try_it = 1; + } + if (! try_it) { if (db) fprintf(stderr, "INTERIOR\n"); return 0; } @@ -26119,7 +26615,7 @@ if (db || db2) fprintf(stderr, "NO button_mask\n"); ; } else if (win_gone || win_unmapped) { ; - } else if (scaling && ! got_wirecopyrect) { + } else if (skip_cr_when_scaling("wireframe")) { ; } else if (w != orig_w || h != orig_h) { ; @@ -26152,19 +26648,18 @@ if (db) fprintf(stderr, "send_copyrect: %d\n", sent_copyrect); if (! obscured) { fb_push_wait(0.1, FB_COPY); } else { + /* no diff for now... */ fb_push_wait(0.1, FB_COPY); } if (scaling) { static double last_time = 0.0; double now = dnow(), delay = 0.35; + fb_push_wait(0.1, FB_COPY); + if (now > last_time + delay) { - int s = 2; - int x1 = nfix(x - s, dpy_x); - int y1 = nfix(y - s, dpy_y); - int x2 = nfix(x + w + s, dpy_x+1); - int y2 = nfix(y + h + s, dpy_y+1); - scale_and_mark_rect(x1, y1, x2, y2); + + scale_mark(x, y, x+w, y+h); last_time = now; last_copyrect_fix = now; } @@ -26374,6 +26869,8 @@ static void check_user_input3(double dt, double dtr, int tile_diffs) { int gcnt, ginput; static int first = 1; + if (dtr || tile_diffs) {} /* unused vars warning: */ + if (first) { char *p = getenv("SPIN"); if (p) { @@ -26535,6 +27032,8 @@ static void check_user_input4(double dt, double dtr, int tile_diffs) { } first = 0; ssec = time(0); + + if (dtr) {} /* unused vars warning: */ } total_calls++; @@ -27893,13 +28392,17 @@ static void print_help(int mode) { " exactly, e.g. -scale 2/3\n" "\n" " Scaling Options: can be added after \"fraction\" via\n" -" \":\", to supply multiple \":\" options use commas. If\n" -" you just want a quick, rough scaling without blending,\n" -" append \":nb\" to \"fraction\" (e.g. -scale 1/3:nb).\n" -" No blending is the default for 8bpp indexed color, to\n" -" force blending for this case use \":fb\". By default\n" -" -scrollcopyrect and -wirecopyrect are disabled under\n" -" -scale, to enable them use \":cr\".\n" +" \":\", to supply multiple \":\" options use commas.\n" +" If you just want a quick, rough scaling without\n" +" blending, append \":nb\" to \"fraction\" (e.g. -scale\n" +" 1/3:nb). No blending is the default for 8bpp indexed\n" +" color, to force blending for this case use \":fb\".\n" +"\n" +" To disable -scrollcopyrect and -wirecopyrect under\n" +" -scale use \":nocr\". If you need to to enable them use\n" +" \":cr\" or specify them explicitly on the command line.\n" +" If a slow link is detected, \":nocr\" may be applied\n" +" automatically. Default: %s\n" "\n" " More esoteric options: for compatibility with vncviewers\n" " the scaled width is adjusted to be a multiple of 4:\n" @@ -28280,10 +28783,14 @@ static void print_help(int mode) { " Keysym). Run 'xmodmap -pk' to see your keymapping.\n" " Example: \"-skip_keycodes 94,114\"\n" "-skip_dups Some VNC viewers send impossible repeated key events,\n" -"-noskip_dups e.g. key-down, key-down, key-up, key-up all for the\n" -" same key, or 20 downs in a row for the same key!\n" +"-noskip_dups e.g. key-down, key-down, key-up, key-up all for the same\n" +" key, or 20 downs in a row for the same modifier key!\n" " Setting -skip_dups means to skip these duplicates and\n" -" just process the first event. Default: %s\n" +" just process the first event. Note: some VNC viewers\n" +" assume they can send down's without the corresponding\n" +" up's and so you should not set this option for\n" +" these viewers (symptom: some keys do not autorepeat)\n" +" Default: %s\n" "-add_keysyms If a Keysym is received from a VNC viewer and\n" "-noadd_keysyms that Keysym does not exist in the X server, then\n" " add the Keysym to the X server's keyboard mapping.\n" @@ -28376,6 +28883,12 @@ static void print_help(int mode) { "-noprimary Do not poll the PRIMARY selection for changes to send\n" " back to clients. (PRIMARY is still set on received\n" " changes, however).\n" +"-seldir string If direction string is \"send\", only send the selection\n" +" to viewers, and if it is \"recv\" only receive it from\n" +" viewers. To work around apps setting the selection\n" +" too frequently and messing up the other end. You can\n" +" actually supply a comma separated list of directions,\n" +" including \"debug\" to turn on debugging output.\n" "\n" "-cursor [mode] Sets how the pointer cursor shape (little icon at the\n" "-nocursor mouse pointer) should be handled. The \"mode\" string\n" @@ -28537,7 +29050,7 @@ static void print_help(int mode) { " The value \"str\" is optional and, of course, is\n" " packed with many tunable parameters for this scheme:\n" "\n" -" Format: shade,linewidth,percent,T+B+L+R,t1+t2+t3+t4\n" +" Format: shade,linewidth,percent,T+B+L+R,mod,t1+t2+t3+t4\n" " Default: %s\n" "\n" " If you leave nothing between commas: \",,\" the default\n" @@ -28560,6 +29073,14 @@ static void print_help(int mode) { " wireframed: set them all to zero to not try the speedup\n" " (scrolling and selecting text will likely be slower).\n" "\n" +" \"mod\" specifies if a button down event in the\n" +" interior of the window with a modifier key (Alt, Shift,\n" +" etc.) down should indicate a wireframe opportunity.\n" +" It can be \"0\" or \"none\" to skip it, \"1\" or \"all\"\n" +" to apply it to any modifier, or \"Shift\", \"Alt\",\n" +" \"Control\", \"Meta\", \"Super\", or \"Hyper\" to only\n" +" apply for that type of modifier key.\n" +"\n" " \"t1+t2+t3+t4\" specify four floating point times in\n" " seconds: t1 is how long to wait for the pointer to move,\n" " t2 is how long to wait for the window to start moving\n" @@ -28585,10 +29106,11 @@ static void print_help(int mode) { " region (this may look odd as the remaining pieces come\n" " in, but helps on a slow link). Default: \"%s\"\n" "\n" -" Note: there can be painting errors when using -scale\n" -" so CopyRect is skipped when scaling unless you specify\n" -" \"-wirecopyrect always\" on the command line or by\n" -" remote-control. Or you can also use \"-scale xxx:cr\"\n" +" Note: there can be painting errors or slow response\n" +" when using -scale so you may want to disable CopyRect\n" +" in this case \"-wirecopyrect never\" on the command\n" +" line or by remote-control. Or you can also use the\n" +" \"-scale xxx:nocr\" scale option.\n" "\n" "-debug_wireframe Turn on debugging info printout for the wireframe\n" " heuristics. \"-dwf\" is an alias. Specify multiple\n" @@ -28630,16 +29152,24 @@ static void print_help(int mode) { " 4 Super_L's in a row: reset RECORD context,\n" " 5 Super_L's in a row: try to push a black screen\n" "\n" +" note: Alt_L is the Left \"Alt\" key (a single key)\n" +" Super_L is the Left \"Super\" key (Windows flag).\n" +" Both of these are modifier keys, and so should not\n" +" generate characters when pressed by themselves. Also,\n" +" your VNC viewer may have its own refresh hot-key\n" +" or button.\n" +"\n" " \"mode\" can be \"never\" (same as -noscrollcopyrect)\n" " to never try the copyrect, \"keys\" means to try it\n" " in response to keystrokes only, \"mouse\" means to\n" " try it in response to mouse events only, \"always\"\n" " means to do both. Default: \"%s\"\n" "\n" -" Note: there can be painting errors when using -scale\n" -" so CopyRect is skipped when scaling unless you specify\n" -" \"-scrollcopyrect always\" on the command line or by\n" -" remote-control. You can also use \"-scale xxx:cr\"\n" +" Note: there can be painting errors or slow response\n" +" when using -scale so you may want to disable CopyRect\n" +" in this case \"-scrollcopyrect never\" on the command\n" +" line or by remote-control. Or you can also use the\n" +" \"-scale xxx:nocr\" scale option.\n" "\n" "-scr_area n Set the minimum area in pixels for a rectangle\n" " to be considered for the -scrollcopyrect detection\n" @@ -28785,22 +29315,22 @@ static void print_help(int mode) { " but it can be used for any scenario. This option\n" " periodically performs costly operations and so\n" " interactive response may be reduced when it is on.\n" -" The 3 Alt_L's in a row described under -scrollcopyrect\n" -" can be used instead to manually request a screen repaint\n" -" when it is needed.\n" +" The 3 Alt_L's (the Left \"Alt\" key) taps in a row\n" +" described under -scrollcopyrect can be used instead to\n" +" manually request a screen repaint when it is needed.\n" "\n" -" \"string\" is a comma separated list of one or more\n" -" of the following: \"V=t\", \"C=t\", and \"X=t\".\n" -" In these \"t\" stands for a time in seconds (it is\n" -" a floating point even though one should usually use\n" -" values > 2 to avoid wasting resources). V sets how\n" -" frequently the entire screen should be sent to viewers\n" -" (it is like the 3 Alt_L's). C sets how long after a\n" -" CopyRect the full screen should be repainted. X sets\n" -" how frequently to reread the full X11 framebuffer from\n" -" the X server and push it out to connected viewers.\n" -" Use of X should be rare. Examples: -fixscreen V=10\n" -" -fixscreen C=10\n" +" \"string\" is a comma separated list of one or more of\n" +" the following: \"V=t\", \"C=t\", and \"X=t\". In these\n" +" \"t\" stands for a time in seconds (it is a floating\n" +" point even though one should usually use values > 2 to\n" +" avoid wasting resources). V sets how frequently the\n" +" entire screen should be sent to viewers (it is like the\n" +" 3 Alt_L's). C sets how long to wait after a CopyRect\n" +" to repaint the full screen. X sets how frequently\n" +" to reread the full X11 framebuffer from the X server\n" +" and push it out to connected viewers. Use of X should\n" +" be rare, please report a bug if you find you need it.\n" +" Examples: -fixscreen V=10 -fixscreen C=10\n" "\n" "-debug_scroll Turn on debugging info printout for the scroll\n" " heuristics. \"-ds\" is an alias. Specify it multiple\n" @@ -29258,6 +29788,7 @@ static void print_help(int mode) { " sel disable -nosel mode.\n" " noprimary enable -noprimary mode.\n" " primary disable -noprimary mode.\n" +" seldir:str set -seldir to \"str\"\n" " cursor:mode enable -cursor \"mode\".\n" " show_cursor enable showing a cursor.\n" " noshow_cursor disable showing a cursor. (same as\n" @@ -29297,6 +29828,7 @@ static void print_help(int mode) { " fixscreen:str set -fixscreen to \"str\".\n" " noxrecord disable all use of RECORD extension.\n" " xrecord enable use of RECORD extension.\n" +" reset_record reset RECORD extension (if avail.).\n" " pointer_mode:n set -pointer_mode to n. same as \"pm\"\n" " input_skip:n set -input_skip to n.\n" " speeds:str set -speeds to str.\n" @@ -29386,14 +29918,6 @@ static void print_help(int mode) { " a query straight to the VNC_CONNECT property or connect\n" " file use \"qry=...\" instead of \"cmd=...\"\n" "\n" -" Here is the current list of \"variables\" that can\n" -" be supplied to the -query command. This includes the\n" -" \"N/A\" ones that return no useful info. For variables\n" -" names that do not correspond to an x11vnc option or\n" -" remote command, we hope the name makes it obvious what\n" -" the returned value corresponds to (hint: the ext_*\n" -" variables correspond to the presence of X extensions):\n" -"\n" " ans= stop quit exit shutdown ping blacken zero\n" " refresh reset close disconnect id sid waitmapped\n" " nowaitmapped clip flashcmap noflashcmap shiftcmap\n" @@ -29410,23 +29934,23 @@ static void print_help(int mode) { " modtweak nomodtweak xkb noxkb skip_keycodes skip_dups\n" " noskip_dups add_keysyms noadd_keysyms clear_mods\n" " noclear_mods clear_keys noclear_keys remap repeat\n" -" norepeat fb nofb bell nobell sel nosel primary noprimary\n" -" cursorshape nocursorshape cursorpos nocursorpos cursor\n" -" show_cursor noshow_cursor nocursor arrow xfixes\n" -" noxfixes xdamage noxdamage xd_area xd_mem alphacut\n" -" alphafrac alpharemove noalpharemove alphablend\n" -" noalphablend xwarppointer xwarp noxwarppointer\n" -" noxwarp buttonmap dragging nodragging wireframe_mode\n" -" wireframe wf nowireframe nowf wirecopyrect wcr\n" -" nowirecopyrect nowcr scr_area scr_skip scr_inc scr_keys\n" -" scr_term scr_keyrepeat scr_parms scrollcopyrect scr\n" +" norepeat fb nofb bell nobell sel nosel primary\n" +" noprimary seldir cursorshape nocursorshape cursorpos\n" +" nocursorpos cursor show_cursor noshow_cursor nocursor\n" +" arrow xfixes noxfixes xdamage noxdamage xd_area xd_mem\n" +" alphacut alphafrac alpharemove noalpharemove alphablend\n" +" noalphablend xwarppointer xwarp noxwarppointer noxwarp\n" +" buttonmap dragging nodragging wireframe_mode wireframe\n" +" wf nowireframe nowf wirecopyrect wcr nowirecopyrect\n" +" nowcr scr_area scr_skip scr_inc scr_keys scr_term\n" +" scr_keyrepeat scr_parms scrollcopyrect scr\n" " noscrollcopyrect noscr fixscreen noxrecord xrecord\n" -" pointer_mode pm input_skip input client_input speeds\n" -" debug_pointer dp nodebug_pointer nodp debug_keyboard\n" -" dk nodebug_keyboard nodk deferupdate defer wait_ui\n" -" wait_bog nowait_bog wait readtimeout nap nonap sb\n" -" screen_blank fs gaps grow fuzz snapfb nosnapfb\n" -" rawfb progressive rfbport http nohttp httpport\n" +" reset_record pointer_mode pm input_skip input\n" +" client_input speeds debug_pointer dp nodebug_pointer\n" +" nodp debug_keyboard dk nodebug_keyboard nodk deferupdate\n" +" defer wait_ui wait_bog nowait_bog wait readtimeout\n" +" nap nonap sb screen_blank fs gaps grow fuzz snapfb\n" +" nosnapfb rawfb progressive rfbport http nohttp httpport\n" " httpdir enablehttpproxy noenablehttpproxy alwaysshared\n" " noalwaysshared nevershared noalwaysshared dontdisconnect\n" " nodontdisconnect desktop debug_xevents nodebug_xevents\n" @@ -29436,19 +29960,19 @@ static void print_help(int mode) { " debug_tiles dbt nodebug_tiles nodbt debug_tiles dbg\n" " nodbg noremote\n" "\n" -" aro= display vncdisplay desktopname http_url auth\n" -" users rootshift clipshift scale_str scaled_x scaled_y\n" -" scale_numer scale_denom scale_fac scaling_blend\n" -" scaling_nomult4 scaling_pad scaling_interpolate inetd\n" -" privremote unsafe safer nocmds passwdfile using_shm\n" -" logfile o flag rc norc h help V version lastmod bg\n" -" sigpipe threads readrate netrate netlatency pipeinput\n" -" clients client_count pid ext_xtest ext_xtrap ext_xrecord\n" -" ext_xkb ext_xshm ext_xinerama ext_overlay ext_xfixes\n" -" ext_xdamage ext_xrandr rootwin num_buttons button_mask\n" -" mouse_x mouse_y bpp depth indexed_color dpy_x dpy_y\n" -" wdpy_x wdpy_y off_x off_y cdpy_x cdpy_y coff_x coff_y\n" -" rfbauth passwd\n" +" aro= display vncdisplay desktopname guess_desktop\n" +" http_url auth users rootshift clipshift scale_str\n" +" scaled_x scaled_y scale_numer scale_denom\n" +" scale_fac scaling_blend scaling_nomult4 scaling_pad\n" +" scaling_interpolate inetd privremote unsafe safer nocmds\n" +" passwdfile using_shm logfile o flag rc norc h help V\n" +" version lastmod bg sigpipe threads readrate netrate\n" +" netlatency pipeinput clients client_count pid ext_xtest\n" +" ext_xtrap ext_xrecord ext_xkb ext_xshm ext_xinerama\n" +" ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin\n" +" num_buttons button_mask mouse_x mouse_y bpp depth\n" +" indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y\n" +" cdpy_x cdpy_y coff_x coff_y rfbauth passwd\n" "\n" "-sync By default -remote commands are run asynchronously, that\n" " is, the request is posted and the program immediately\n" @@ -29544,6 +30068,7 @@ static void print_help(int mode) { exit(1); } fprintf(stderr, help, lastmod, + scaling_copyrect ? ":cr":":nocr", view_only ? "on":"off", shared ? "on":"off", vnc_connect ? "-vncconnect":"-novncconnect", @@ -29978,7 +30503,7 @@ int main(int argc, char* argv[]) { for (i=1; i < argc; i++) { len += strlen(argv[i]) + 4 + 1; } - program_cmdline = (char *)malloc(len+1); + program_cmdline = (char *) malloc(len+1); program_cmdline[0] = '\0'; for (i=1; i < argc; i++) { char *s = argv[i]; @@ -30031,11 +30556,12 @@ int main(int argc, char* argv[]) { arg); exit(1); } else if (! pick_windowid(&subwin)) { - fprintf(stderr, "bad %s pick\n", arg); + fprintf(stderr, "invalid %s pick\n", + arg); exit(1); } } else if (! scan_hexdec(argv[i], &subwin)) { - fprintf(stderr, "bad %s arg: %s\n", arg, + fprintf(stderr, "invalid %s arg: %s\n", arg, argv[i]); exit(1); } @@ -30260,6 +30786,9 @@ int main(int argc, char* argv[]) { watch_primary = 0; } else if (!strcmp(arg, "-noprimary")) { watch_primary = 0; + } else if (!strcmp(arg, "-seldir")) { + CHECK_ARGC + sel_direction = strdup(argv[++i]); } else if (!strcmp(arg, "-cursor")) { show_cursor = 1; if (i < argc-1) { @@ -30445,8 +30974,8 @@ int main(int argc, char* argv[]) { if (known_sigpipe_mode(argv[++i])) { sigpipe = strdup(argv[i]); } else { - fprintf(stderr, "bad -sigpipe arg: %s, must " - "be \"ignore\" or \"exit\"\n", argv[i]); + fprintf(stderr, "invalid -sigpipe arg: %s, must" + " be \"ignore\" or \"exit\"\n", argv[i]); exit(1); } #if LIBVNCSERVER_HAVE_LIBPTHREAD @@ -30925,6 +31454,8 @@ int main(int argc, char* argv[]) { fprintf(stderr, " watchbell: %d\n", watch_bell); fprintf(stderr, " watchsel: %d\n", watch_selection); fprintf(stderr, " watchprim: %d\n", watch_primary); + fprintf(stderr, " seldir: %s\n", sel_direction ? + sel_direction : "null"); fprintf(stderr, " cursor: %d\n", show_cursor); fprintf(stderr, " multicurs: %d\n", show_multiple_cursors); fprintf(stderr, " curs_mode: %s\n", multiple_cursors_mode @@ -31150,33 +31681,26 @@ int main(int argc, char* argv[]) { } if (! quiet && wireframe) { - rfbLog("Wireframing: -wireframe mode is in effect for window moves.\n"); - rfbLog(" If this yields undesired behavior (poor response, painting\n"); + rfbLog("Wireframing: -wireframe mode is in effect for window " + "moves.\n"); + rfbLog(" If this yields undesired behavior (poor response, " + "painting\n"); rfbLog(" errors, etc) it may be disabled:\n"); rfbLog(" - use '-nowf' to disable wireframing completely.\n"); - rfbLog(" - use '-nowcr' to disable the Copy Rectangle after the\n"); + rfbLog(" - use '-nowcr' to disable the Copy Rectangle after " + "the\n"); rfbLog(" moved window is released in the new position.\n"); rfbLog(" Also see the -help entry for tuning parameters.\n"); - } - - tmpi = 1; - if (scroll_copyrect) { - if (strstr(scroll_copyrect, "never")) { - tmpi = 0; - } - } else if (scroll_copyrect_default) { - if (strstr(scroll_copyrect_default, "never")) { - tmpi = 0; + rfbLog(" You can press 3 Alt_L's (Left \"Alt\" key) in a row" + " to \n"); + rfbLog(" repaint the screen, also see the -fixscreen option" + " for\n"); + rfbLog(" periodic repaints.\n"); + if (scale_str && !strstr(scale_str, "nocr")) { + rfbLog(" Note: '-scale' is on and this can cause " + "more problems.\n"); } } - if (! quiet && tmpi) { - rfbLog("Scroll Detection: -scrollcopyrect mode is in effect to\n"); - rfbLog(" use RECORD extension to try to detect scrolling windows\n"); - rfbLog(" (induced by either user keystroke or mouse input).\n"); - rfbLog(" If this yields undesired behavior (poor response, painting\n"); - rfbLog(" errors, etc) it may be disabled via: '-noscr'\n"); - rfbLog(" Also see the -help entry for tuning parameters.\n"); - } overlay_present = 0; #ifdef SOLARIS_OVERLAY @@ -31315,6 +31839,43 @@ int main(int argc, char* argv[]) { initialize_xrecord(); + tmpi = 1; + if (scroll_copyrect) { + if (strstr(scroll_copyrect, "never")) { + tmpi = 0; + } + } else if (scroll_copyrect_default) { + if (strstr(scroll_copyrect_default, "never")) { + tmpi = 0; + } + } + if (! xrecord_present) { + tmpi = 0; + } +#if !LIBVNCSERVER_HAVE_RECORD + tmpi = 0; +#endif + if (! quiet && tmpi) { + rfbLog("Scroll Detection: -scrollcopyrect mode is in effect " + "to\n"); + rfbLog(" use RECORD extension to try to detect scrolling " + "windows\n"); + rfbLog(" (induced by either user keystroke or mouse input).\n"); + rfbLog(" If this yields undesired behavior (poor response, " + "painting\n"); + rfbLog(" errors, etc) it may be disabled via: '-noscr'\n"); + rfbLog(" Also see the -help entry for tuning parameters.\n"); + rfbLog(" You can press 3 Alt_L's (Left \"Alt\" key) in a row" + " to \n"); + rfbLog(" repaint the screen, also see the -fixscreen option" + " for\n"); + rfbLog(" periodic repaints.\n"); + if (scale_str && !strstr(scale_str, "nocr")) { + rfbLog(" Note: '-scale' is on and this can cause " + "more problems.\n"); + } + } + /* check for OS with small shm limits */ if (using_shm && ! single_copytile) { if (limit_shm()) { @@ -31436,6 +31997,7 @@ int main(int argc, char* argv[]) { if (! inetd) { if (! screen->port || screen->listenSock < 0) { + rfbLogEnable(1); rfbLog("Error: could not obtain listening port.\n"); clean_up_exit(1); } @@ -31452,11 +32014,13 @@ int main(int argc, char* argv[]) { if ((p = fork()) > 0) { exit(0); } else if (p == -1) { + rfbLogEnable(1); fprintf(stderr, "could not fork\n"); perror("fork"); clean_up_exit(1); } if (setsid() == -1) { + rfbLogEnable(1); fprintf(stderr, "setsid failed\n"); perror("setsid"); clean_up_exit(1); |