diff options
-rw-r--r-- | x11vnc/ChangeLog | 5 | ||||
-rw-r--r-- | x11vnc/README | 1805 | ||||
-rwxr-xr-x | x11vnc/tkx11vnc | 736 | ||||
-rw-r--r-- | x11vnc/tkx11vnc.h | 736 | ||||
-rw-r--r-- | x11vnc/x11vnc.1 | 269 | ||||
-rw-r--r-- | x11vnc/x11vnc.c | 624 |
6 files changed, 2836 insertions, 1339 deletions
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog index babdaaa..ef3247a 100644 --- a/x11vnc/ChangeLog +++ b/x11vnc/ChangeLog @@ -1,3 +1,8 @@ +2005-07-10 Karl Runge <[email protected]> + * more improvements to gui, default values, save-settings.. + * x11vnc scary password warnings. Release settings. -QD option. + add \# to rc files and fix rcfile read bug. + 2005-07-09 Karl Runge <[email protected]> * add -grab_buster helper thread to break up grabs (might not be need any longer due to gett XFlush-ing). Fix scrolls and diff --git a/x11vnc/README b/x11vnc/README index b08bae1..f6db49e 100644 --- a/x11vnc/README +++ b/x11vnc/README @@ -1,5 +1,5 @@ -x11vnc README file Date: Sat Jul 9 00:07:21 EDT 2005 +x11vnc README file Date: Sun Jul 10 23:27:39 EDT 2005 The following information is taken from these URLs: @@ -25,10 +25,10 @@ x11vnc: a VNC server for real X displays I wrote x11vnc because x0rfbserver was basically impossible to build on Solaris and had poor performance. The primary x0rfbserver build problems centered around esoteric C++ toolkits. x11vnc is written in - plain C and uses only standard libraries. I also added a few + plain C and uses only standard libraries. I also added a some enhancements to improve the interactive response, add esoteric features, etc. The [6]FAQ contains a lot of information and solutions - to problems, but please feel free to [7]contact me if you have + to many problems, but please feel free to [7]contact me if you have problems or questions. Background: @@ -44,12 +44,12 @@ x11vnc: a VNC server for real X displays * [9]http://www.realvnc.com * [10]http://www.tightvnc.com - For Unix, the VNC implementation includes a virtual X11 server Xvnc - (usually launched via the vncserver command) that is not associated - with a physical display, but provides a "fake" one X11 clients (xterm, - mozilla, etc.) can attach to. A remote user then connects to Xvnc via - the VNC client vncviewer from anywhere on the network to view and - interact with the whole virtual X11 desktop. + For Unix, the traditional VNC implementation includes a virtual X11 + server Xvnc (usually launched via the vncserver command) that is not + associated with a physical display, but provides a "fake" one X11 + clients (xterm, mozilla, etc.) can attach to. A remote user then + connects to Xvnc via the VNC client vncviewer from anywhere on the + network to view and interact with the whole virtual X11 desktop. The VNC protocol is in most cases better suited for remote connections with low bandwidth and high latency than is the X11 protocol (the @@ -70,8 +70,8 @@ x11vnc: a VNC server for real X displays or a SunRay session) from far away. Maybe you want to close down an application cleanly rather than using kill, or want to work a bit in an already running application, or would like to help a distant - colleague solve a problem with their desktop. This is where x11vnc is - useful. + colleague solve a problem with their desktop, or would just like to + work out on your deck for a while. This is where x11vnc is useful. _________________________________________________________________ How to use x11vnc: @@ -144,7 +144,7 @@ x11vnc: a VNC server for real X displays Shortcut: Of course if you left x11vnc running on far-away.east:0 in a terminal window with the [18]-forever option or as a [19]service, you'd only have to do Step 3 as you moved around. Be sure to use a VNC - [20]password or [21]other measures if you do that. + [20]Password or [21]other measures if you do that. Desktop Sharing: The above more or less assumed nobody was sitting at @@ -171,7 +171,8 @@ x11vnc: a VNC server for real X displays remote machines (certainly when going over the internet) it is best to use ssh, or use a VPN. For x11vnc one can tunnel the VNC protocol through the encrypted ssh channel. It would look something like this: - sitting-here> ssh -L 5900:localhost:5900 far-away.east 'x11vnc -display :0' + sitting-here> ssh -L 5900:localhost:5900 far-away.east 'x11vnc -display :0 -l +ocalhost' (you will likely have to provide passwords/passphrases for the ssh login) and then in another terminal window on sitting-here run the @@ -255,7 +256,7 @@ pid=$! ssh -R 5500:localhost:5500 $host "$cmd" kill $pid - Note the use of the ssh option -R instead of -L to set up a remote + Note the use of the ssh option "-R" instead of "-L" to set up a remote port redirection. _________________________________________________________________ @@ -282,6 +283,8 @@ vncviewer -via $host localhost:0 # must be TightVNC vncviewer. connections (or have it started out of [28]inetd(1)), you can simply use the TightVNC "vncviewer -via gateway host:port" in its default mode to provide secure ssh tunnelling. + _________________________________________________________________ + VNC password file: Also note in the #1. example script that the @@ -292,14 +295,17 @@ vncviewer -via $host localhost:0 # must be TightVNC vncviewer. slightly less secure [31]-passwdfile and "-passwd XXXXX" [32]options to specify passwords. - Important: It is up to you to tell x11vnc to use password protection, - it will not do it for you automatically or force you to. The same goes - for encrypting the channel between the viewer and x11vnc: it is up to - you to use ssh, stunnel, VPN, etc. Also look into the -allow and - -localhost [33]options and building x11vnc with [34]tcp_wrappers + Very Important: It is up to YOU to tell x11vnc to use password + protection (-rfbauth or -passwdfile), it will NOT do it for you + automatically or force you to. The same goes for encrypting the + channel between the viewer and x11vnc: it is up to you to use ssh, + stunnel, VPN, etc. For additional safety, also look into the -allow + and -localhost [33]options and building x11vnc with [34]tcp_wrappers support to limit host access. + _________________________________________________________________ + Chaining ssh's: Note that for use of a ssh gateway and -L redirection to an internal host (e.g. "-L 5900:otherhost:5900") the VNC traffic inside the firewall is not encrypted and you have to manually log into @@ -394,8 +400,8 @@ exec /usr/bin/ssh -t -L 5900:localhost:5900 $gateway \ Or do make install, it will probably install to /usr/local/bin (run ./configure --help for information on customizing your configuration). - You can now run it via typing "x11vnc", "x11vnc -help", "x11vnc -nap - -display :0", etc. + You can now run it via typing "x11vnc", "x11vnc -help", "x11vnc + -forever -shared -display :0", etc. Note: Currently gcc is required to build libvncserver. In some cases it will build with non-gcc compilers, but the resulting binary often @@ -436,7 +442,7 @@ exec /usr/bin/ssh -t -L 5900:localhost:5900 $gateway \ non-standard places (e.g. /usr/local, /usr/sfw, /opt/sfw, etc). Note: If configure cannot find these two libraries then TightVNC and - ZRLE encoding support will be disabled, and you don't want that! The + ZRLE encoding support will be disabled, and you don't want that!!! The TightVNC encoding gives very good compression and performance, it even makes a noticeable difference over a fast LAN. @@ -450,18 +456,15 @@ exec /usr/bin/ssh -t -L 5900:localhost:5900 $gateway \ for the little used -xrandr option, see the script below to pick it up as well). + libjpeg is included in Solaris 9 and later (/usr/sfw/include and /usr/sfw/lib), and zlib in Solaris 8 and later (/usr/include and /usr/lib). So on Solaris 9 you can pick up everything with something like this: - env PATH=/usr/local/bin:/usr/ccs/bin:$PATH CPPFLAGS='-I /usr/sfw/include' LDF -LAGS='-L/usr/sfw/lib -R/usr/sfw/lib' sh -c './configure; make' - - assuming your gcc is in /usr/local/bin. Or starting with the 0.7.1 - x11vnc release: env PATH=/usr/local/bin:/usr/ccs/bin:$PATH sh -c './configure --with-jpeg=/us r/sfw; make' + assuming your gcc is in /usr/local/bin and x11vnc 0.7.1 or later. These are getting pretty long, see those assignments split up in the build script below. @@ -538,6 +541,7 @@ ls -l ./x11vnc/x11vnc If you need to build on Solaris 2.5.1 or earlier or other older Unix OS's, see [50]this workaround FAQ. + Building on FreeBSD, OpenBSD, ...: The jpeg libraries seem to be in /usr/local or /usr/pkg on these OS's. You won't need the openwin stuff in the above script (but you may need /usr/X11R6/...). Also starting @@ -545,6 +549,7 @@ ls -l ./x11vnc/x11vnc ./configure --with-jpeg=/usr/local make + Building on HP-UX: For jpeg and zlib you will need to do the same sort of thing as described above for Solaris. You set CPPFLAGS and LDFLAGS to find them (see below for an example). You do not need to do @@ -553,23 +558,15 @@ ls -l ./x11vnc/x11vnc runtime you may need to set LD_LIBRARY_PATH or SHLIB_PATH to indicate the directory paths so the libraries can be found. It is a good idea to have static archives, e.g. libz.a and libjpeg.a for the nonstandard - libraries so that they get bolted into the x11vnc binary. - - Finally, there seems to be a bug with configure on HP-UX 11.xx: it - thinks it cannot find gettimeofday(). As a workaround add this to - CPPFLAGS: -DLIBVNCSERVER_HAVE_GETTIMEOFDAY=1. You may get some - warnings but we have verified that this generates working x11vnc - binaries on HP-UX hppa and ia64. (This problem will be fixed in - version 0.7.2 by using a newer autoconf). - - Here is what we recently did to build x11vnc 0.7.1 on HP-UX 11.11 -env CPPFLAGS="-DLIBVNCSERVER_HAVE_GETTIMEOFDAY=1 -I $HOME/hpux/jpeg/include -I -$HOME/hpux/zlib/include" LDFLAGS="-L $HOME/hpux/jpeg/lib -L $HOME/hpux/zlib/lib -" ./configure + libraries so that they get bolted into the x11vnc binary (and so won't + get "lost"). + + Here is what we recently did to build x11vnc 0.7.2 on HP-UX 11.11 +./configure --with-jpeg=$HOME/hpux/jpeg --with-zlib=$HOME/hpux/zlib make - Where we had static archives (libjpeg.a, libz.a) only in the - $HOME/hpux/... directories. + Where we had static archives (libjpeg.a, libz.a) only and header files + in the $HOME/hpux/... directories as discussed for the build script. _________________________________________________________________ Beta Testing: @@ -580,7 +577,7 @@ make I'd like to release version 0.7.2 in Jun-Jul/2005 sometime, here is the current tarball: - RC-6 lastmod: 2005-07-08 [51]x11vnc-0.7.2beta.tar.gz + RC-7 lastmod: 2005-07-10 [51]x11vnc-0.7.2beta.tar.gz There are also some Linux, Solaris, and other OS test binaries [52]here. Please kick the tires and report bugs, performance @@ -613,9 +610,9 @@ make x11vnc is both a client and a server at the same time. It is an X client because it connects to the running X server to do the screen polls. Think of it as a rather efficient "screenshot" program running - continuously. It is a server in the sense that it is a VNC server VNC - viewers on the network can connect to and view the screen framebuffer - it manages. + continuously. It is a server in the sense that it is a VNC server that + VNC viewers on the network can connect to and view the screen + framebuffer it manages. When trying to debug problems, remember to think of both roles. E.g. "how is x11vnc connecting to the X server?", "how is the vncviewer @@ -647,7 +644,7 @@ 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 "[63]-rfbport NNNN" + far-away.east:1. You can force the port with the "[63]-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) @@ -680,14 +677,14 @@ make Barbershop mirrors effect: What if x11vnc is started up, and vncviewer is then started up on the same machine and displayed on the same display x11vnc is polling? One might "accidentally" do this when - 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 [66]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! + first testing out the programs. You get an interesting + recursive/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 [66]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) [67]SunRay session (Please remember to use [68]-nap and maybe @@ -740,9 +737,10 @@ make large areas) slow. Experiment with interacting a bit differently than you normally do to minimize the effects (e.g. do fullpage paging rather than line-by-line scrolling, and move windows in a - single, quick motion). Work is in progress to attempt to speed - things up using the copyrect encoding and other things, but they - will likely only speed up certain activities, not all. + single, quick motion). Recent work has provided the + [72]-scrollcopyrect and [73]-wireframe speedups using the CopyRect + VNC encoding and other things, but they only speed up certain + activities, not all. * A rate limiting factor for x11vnc performance is that video hardware is optimized for writing, not reading (x11vnc reads the video framebuffer for the screen image data). The difference can @@ -752,11 +750,11 @@ make 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. + Note: A quick way to get a 2X speedup for x11vnc 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 + you can run 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 @@ -766,19 +764,19 @@ make 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 - this can be read much more quickly). To do this one puts the line - Option "ShadowFB" "true" (and depending on video card driver, - Option "NoAccel" "true" may be needed too) in the Device section - of the /etc/X11/XF86Config file. Note that this disables 2D - acceleration at the physical display and so likely defeats the - purpose. Nevertheless this could be handy in some circumstances, - e.g. if the slower speed while sitting at the physical display was - acceptable (this seems to be true for most video cards these - days). Unfortunately it does not seem shadowfb can be turned on - and off dynamically... + On XFree86/Xorg 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 this can be read much more quickly). To do this one + puts the line Option "ShadowFB" "true" (and depending on video + card driver, Option "NoAccel" "true" may be needed too) in the + Device section of the /etc/X11/XF86Config or /etc/X11/xorg.conf + file. Note that this disables 2D acceleration at the physical + display and so likely defeats the purpose. Nevertheless this could + be handy in some circumstances, e.g. if the slower speed while + sitting at the physical display was acceptable (this seems to be + true for most video cards these days). Unfortunately it does not + seem shadowfb can be turned on and off dynamically... Another amusing thing one can do is use Xvfb as the X server, e.g. "xinit $HOME/.xinitrc -- /usr/X11R6/bin/Xvfb :1 -screen 0 1024x768x16" x11vnc can poll Xvfb efficiently via main memory. @@ -787,31 +785,35 @@ make instead of using vncserver/Xvnc, but we mention it because it may be of use for special purpose applications. Also, a faster and more accurate way is to use the "dummy" XFree86/Xorg device - driver. See [72]this FAQ for details. + driver. See [74]this FAQ for details. * 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" [73]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 - [74]-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 - except that cursors with transparency (alpha channel) need to - approximated to solid RGB values. + and cannot be queried from the X server. So traditionally in + x11vnc the cursor shape stays fixed at an arrow. (see the "-cursor + X" and "-cursor some" [75]options, however, for a partial hack for + the root window, etc.). However, on Solaris using the SUN_OVL + overlay extension, x11vnc can show the correct mouse cursor when + the [76]-overlay option is also supplied. A similar thing is done + on IRIX as well when -overlay is supplied. + More generally, as of Dec/2004 x11vnc supports the new XFIXES + extension (in Xorg and Solaris 10) to query the X server for the + exact cursor shape, this works pretty well except that cursors + with transparency (alpha channel) need to approximated to solid + RGB values (some cursors look worse than others). * Audio from applications is of course not redirected (separate redirectors do exist, e.g. esd). The XBell() "beeps" will work if the X server supports the XKEYBOARD extension. (Note that on Solaris XKEYBOARD is disabled by default. Passing +kb to Xsun enables it). + * The scroll detection algorithm for the [77]-scrollcopyrect option + can give choppy or bunched up transient output and occasionally + painting errors. * Occasionally a patch of tiles will not get updated correctly. Evidently a timing related bug and difficult to reproduce... * Using -threads can expose some bugs in libvncserver. - Please feel free to [75]contact me if you have any questions, + Please feel free to [78]contact me if you have any questions, problems, or comments about x11vnc, etc. - Also, some people ask if they can make a donation, see [76]this link + Also, some people ask if they can make a donation, see [79]this link for that. _________________________________________________________________ @@ -820,282 +822,282 @@ make [Building and Starting] - [77]Q-1: I can't get x11vnc to start up. It says "XOpenDisplay failed + [80]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? - [78]Q-2: I can't get x11vnc and/or libvncserver to compile. + [81]Q-2: I can't get x11vnc and/or libvncserver to compile. - [79]Q-3: I just built x11vnc successfully, but when I use it my + [82]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). - [80]Q-4: Help, I need to run x11vnc on Solaris 2.5.1 (or other old + [83]Q-4: Help, I need to run x11vnc on Solaris 2.5.1 (or other old Unix/Linux) and it doesn't compile! - [81]Q-5: Where can I get a precompiled x11vnc binary for my Operating + [84]Q-5: Where can I get a precompiled x11vnc binary for my Operating System? - [82]Q-6: Where can I get a VNC Viewer binary (or source code) for the + [85]Q-6: Where can I get a VNC Viewer binary (or source code) for the Operating System I will be viewing from? - [83]Q-7: How can I see all of x11vnc's command line options and + [86]Q-7: How can I see all of x11vnc's command line options and documentation on how to use them? - [84]Q-8: I don't like typing arcane command line options every time I + [87]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? - [85]Q-9: Can I make x11vnc more quiet and also go into the background + [88]Q-9: Can I make x11vnc more quiet and also go into the background after starting up? - [86]Q-10: Sometimes when a VNC viewer dies abruptly, x11vnc also dies + [89]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. - [87]Q-11: Are there any build-time customizations possible, e.g. + [90]Q-11: Are there any build-time customizations possible, e.g. change defaults, create a smaller binary, etc? [Win2VNC Related] - [88]Q-12: I have two separate machine displays in front of me, one + [91]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? - [89]Q-13: I am running Win2VNC on my Windows machine and "x11vnc + [92]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] - [90]Q-14: The X display I run x11vnc on is only 8 bits per pixel (bpp) + [93]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. - [91]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. + [94]Q-15: Color problems: Why are the colors for some windows + incorrect 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. - [92]Q-16: How do I figure out the window id to supply to the -id + [95]Q-16: How do I figure out the window id to supply to the -id windowid option? - [93]Q-17: Why don't menus or other transient windows come up when I am + [96]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? - [94]Q-18: My X display is depth 24 at 24bpp (instead of the normal + [97]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] - [95]Q-19: Can I use x11vnc to view and interact with an Xterminal + [98]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? - [96]Q-20: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for + [99]Q-20: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for a Unix/Linux machine acting as an Xterminal? [Remote Control] - [97]Q-21: How do I stop x11vnc once it is running in the background? + [100]Q-21: How do I stop x11vnc once it is running in the background? - [98]Q-22: Can I change settings in x11vnc without having to restart + [101]Q-22: Can I change settings in x11vnc without having to restart it? Can I remote control it? [Security and Permissions] - [99]Q-23: How do I create a VNC password for use with x11vnc? + [102]Q-23: How do I create a VNC password for use with x11vnc? - [100]Q-24: Can I have two passwords for VNC viewers, one for full + [103]Q-24: Can I have two passwords for VNC viewers, one for full access and the other for view-only access to the display? - [101]Q-25: Can I fine tune what types of user input are allowed? E.g. + [104]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? - [102]Q-26: Why does x11vnc exit as soon as the VNC viewer disconnects? + [105]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? - [103]Q-27: Can I limit which machines incoming VNC clients can connect + [106]Q-27: Can I limit which machines incoming VNC clients can connect from? - [104]Q-28: How do I build x11vnc/libvncserver with libwrap + [107]Q-28: How do I build x11vnc/libvncserver with libwrap (tcp_wrappers) support? - [105]Q-29: Can I have x11vnc only listen on one network interface + [108]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? - [106]Q-30: Now that -localhost implies listening only on the loopback - interface, how I can occasionally allow in a non-localhost via the + [109]Q-30: Now that -localhost implies listening only on the loopback + interface, how I can occasionally allow in a non-localhost via the -R allowonce remote control command? - [107]Q-31: How can I tunnel my connection to x11vnc via an encrypted + [110]Q-31: How can I tunnel my connection to x11vnc via an encrypted SSH channel between two Unix machines? - [108]Q-32: How can I tunnel my connection to x11vnc via an encrypted + [111]Q-32: How can I tunnel my connection to x11vnc via an encrypted SSH channel from Windows using an SSH client like Putty? - [109]Q-33: Can I prompt the user at the local X display whether the + [112]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? - [110]Q-34: Does x11vnc support Unix usernames and passwords? Can I + [113]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? - [111]Q-35: I start x11vnc as root because it is launched via inetd(1) + [114]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? - [112]Q-36: I use a screen-lock when I leave my workstation (e.g. + [115]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? - [113]Q-37: Can I have x11vnc automatically lock the screen when I + [116]Q-37: Can I have x11vnc automatically lock the screen when I disconnect the VNC viewer? [Display Managers and Services] - [114]Q-38: How can I run x11vnc as a "service" that is always + [117]Q-38: How can I run x11vnc as a "service" that is always available? - [115]Q-39: How can I use x11vnc to connect to an X login screen like + [118]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). - [116]Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? + [119]Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? - [117]Q-41: How do I make x11vnc work with the Java VNC viewer applet + [120]Q-41: How do I make x11vnc work with the Java VNC viewer applet in a web browser? - [118]Q-42: Are reverse connections (i.e. the VNC server connecting to + [121]Q-42: Are reverse connections (i.e. the VNC server connecting to the VNC viewer) using "vncviewer -listen" and vncconnect(1) supported? - [119]Q-43: Can I use x11vnc as a replacement for Xvnc? (i.e. not for a + [122]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). - [120]Q-44: How can I use x11vnc on "headless" machines? Why might I + [123]Q-44: How can I use x11vnc on "headless" machines? Why might I want to? [Resource Usage and Performance] - [121]Q-45: I have lots of memory, but why does x11vnc fail with + [124]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)? - [122]Q-46: How can I make x11vnc use less system resources? + [125]Q-46: How can I make x11vnc use less system resources? - [123]Q-47: How can I make x11vnc use MORE system resources? + [126]Q-47: How can I make x11vnc use MORE system resources? - [124]Q-48: I use x11vnc over a slow link with high latency (e.g. + [127]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? - [125]Q-49: Does x11vnc support the X DAMAGE Xserver extension to find + [128]Q-49: Does x11vnc support the X DAMAGE Xserver extension to find modified regions of the screen quickly and efficiently? - [126]Q-50: When I drag windows around with the mouse or scroll up and + [129]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? - [127]Q-51: Why not do something like wireframe animations to avoid the + [130]Q-51: Why not do something like wireframe animations to avoid the windows "lurching" when being moved or resized? - [128]Q-52: Can x11vnc try to apply heuristics to detect when an window + [131]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] - [129]Q-53: Why isn't the mouse cursor shape (the little icon shape + [132]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? - [130]Q-54: When using XFIXES cursorshape mode, some of the cursors + [133]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? - [131]Q-55: In XFIXES mode, are there any hacks to handle cursor + [134]Q-55: In XFIXES mode, are there any hacks to handle cursor transparency ("alpha channel") exactly? [Mouse Pointer] - [132]Q-56: Why does the mouse arrow just stay in one corner in my + [135]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? - [133]Q-57: Can I take advantage of the TightVNC extension to the VNC + [136]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)? - [134]Q-58: Is it possible to swap the mouse buttons (e.g. left-handed + [137]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] - [135]Q-59: How can I get my AltGr and Shift modifiers to work between + [138]Q-59: How can I get my AltGr and Shift modifiers to work between keyboards for different languages? - [136]Q-60: When I try to type a "<" (i.e. less than) instead I get ">" + [139]Q-60: When I try to type a "<" (i.e. less than) instead I get ">" (i.e. greater than)! Strangely, typing ">" works OK!! - [137]Q-61: I'm using an "international" keyboard (e.g. German "de", or + [140]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? - [138]Q-62: When typing I sometimes get double, triple, or more of my + [141]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? - [139]Q-63: The x11vnc -norepeat mode is in effect, but I still get + [142]Q-63: The x11vnc -norepeat mode is in effect, but I still get repeated keystrokes!! - [140]Q-64: The machine where I run x11vnc has an AltGr key, but the + [143]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? - [141]Q-65: I have a Sun machine I run x11vnc on. Its Sun keyboard has + [144]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) - [142]Q-66: Can I map a keystroke to a mouse button click on the remote + [145]Q-66: Can I map a keystroke to a mouse button click on the remote machine? [Screen Related Issues and Features] - [143]Q-67: The remote display is larger (in number of pixels) than the + [146]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? - [144]Q-68: Does x11vnc support server-side framebuffer scaling? (E.g. + [147]Q-68: Does x11vnc support server-side framebuffer scaling? (E.g. to make the desktop smaller). - [145]Q-69: Does x11vnc work with Xinerama? (i.e. multiple monitors + [148]Q-69: Does x11vnc work with Xinerama? (i.e. multiple monitors joined together to form one big, single screen). - [146]Q-70: Can I use x11vnc on a multi-headed display that is not + [149]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)? - [147]Q-71: Can x11vnc show only a portion of the display? (E.g. for a + [150]Q-71: Can x11vnc show only a portion of the display? (E.g. for a special purpose rfb application). - [148]Q-72: Does x11vnc support the XRANDR (X Resize, Rotate and + [151]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. - [149]Q-73: Why is the view in my VNC viewer completely black? Or why + [152]Q-73: Why is the view in my VNC viewer completely black? Or why is everything flashing around randomly? - [150]Q-74: I use Linux Virtual Consoles (VC's) to implement 'Fast User + [153]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 @@ -1103,12 +1105,12 @@ make otherwise all messed up unless the X session x11vnc is attached to is in the active VC? - [151]Q-75: Can I use x11vnc to view my VMWare session remotely? + [154]Q-75: Can I use x11vnc to view my VMWare session remotely? - [152]Q-76: Can non-X devices (e.g. a raw framebuffer) be viewed and/or + [155]Q-76: Can non-X devices (e.g. a raw framebuffer) be viewed and/or controlled by x11vnc? - [153]Q-77: I am using x11vnc where my local machine has "popup/hidden + [156]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 @@ -1116,13 +1118,13 @@ make [Misc: Clipboard, Beeps, Thanks, etc.] - [154]Q-78: Does the Clipboard/Selection get transferred between the + [157]Q-78: Does the Clipboard/Selection get transferred between the vncviewer and the X display? - [155]Q-79: Why don't I hear the "Beeps" in my X session (e.g. when + [158]Q-79: Why don't I hear the "Beeps" in my X session (e.g. when typing tput bel in an xterm)? - [156]Q-80: Thanks for your program and for your help! Can I make a + [159]Q-80: Thanks for your program and for your help! Can I make a donation? _________________________________________________________________ @@ -1135,7 +1137,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 [157]-display option to + your DISPLAY environment variable or use the [160]-display option to specify it. Nearly always the correct value will be ":0" @@ -1152,7 +1154,7 @@ 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 [158]-auth option to + your XAUTHORITY environment variable or use the [161]-auth option to point to the correct MIT-MAGIC-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). @@ -1168,7 +1170,7 @@ make solution: x11vnc -display :0 -auth /var/gdm/:0.Xauth - (this is for the display manager gdm, see [159]this faq for other + (this is for the display manager gdm, see [162]this faq for other display manager cookie file names). Less safe, but to avoid figuring out where the XAUTHORITY file is, if @@ -1177,7 +1179,7 @@ make 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 [160]-users option). + documentation on the [163]-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 @@ -1289,7 +1291,7 @@ h earlier and perhaps non-Solaris): First use the environment settings (CPPFLAGS, LDFLAGS, etc.) in the - above [161]Solaris build script to run the configure command. That + above [164]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 @@ -1315,7 +1317,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 - [162]SunOS 4.x + [165]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 @@ -1325,20 +1327,20 @@ typedef unsigned int in_addr_t; Q-5: Where can I get a precompiled x11vnc binary for my Operating System? - Hopefully the [163]build steps above and [164]FAQ provide enough info + Hopefully the [166]build steps above and [167]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) [165]http://packages.debian.org/x11vnc + Debian: (.deb) [168]http://packages.debian.org/x11vnc - Slackware: (.tgz) [166]http://www.linuxpackages.net/ Redhat/Fedora: - (.rpm) [167]http://dag.wieers.com/packages/x11vnc/ SuSE: (.rpm) - [168]http://linux01.gwdg.de/~pbleser/ Solaris: (pkg) - [169]http://www.sunfreeware.com/ wwexptools: (.tgz) - [170]http://www.bell-labs.com/project/wwexptools/packages.html The + Slackware: (.tgz) [169]http://www.linuxpackages.net/ Redhat/Fedora: + (.rpm) [170]http://dag.wieers.com/packages/x11vnc/ SuSE: (.rpm) + [171]http://linux01.gwdg.de/~pbleser/ Solaris: (pkg) + [172]http://www.sunfreeware.com/ wwexptools: (.tgz) + [173]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 @@ -1350,12 +1352,12 @@ 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 [171]build notes above for where to download libz and libjpeg, and + the [174]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 [172]my collection of + (and all else fails!) you can try one of [175]my collection of binaries for various OS's and x11vnc releases. As a general note, the x11vnc program is simple enough you don't @@ -1376,9 +1378,9 @@ typedef unsigned int in_addr_t; To obtain VNC viewers for the viewing side (Windows, Mac OS, or Unix) try here: - * [173]http://www.tightvnc.com/download.html - * [174]http://www.realvnc.com/download-free.html - * [175]http://sourceforge.net/projects/cotvnc/ + * [176]http://www.tightvnc.com/download.html + * [177]http://www.realvnc.com/download-free.html + * [178]http://sourceforge.net/projects/cotvnc/ Q-7: How can I see all of x11vnc's command line options and @@ -1386,7 +1388,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 - [176]here as well. + [179]here as well. Q-8: I don't like typing arcane command line options every time I @@ -1419,7 +1421,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 - [177]-gui option for more info. Examples: "x11vnc ... -gui" and + [180]-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. @@ -1427,11 +1429,11 @@ display :0 Q-9: Can I make x11vnc more quiet and also go into the background after starting up? - Use the [178]-q and [179]-bg options, respectively. (also: -quiet is + Use the [181]-q and [182]-bg options, respectively. (also: -quiet is an alias for -q) Note that under -bg the stderr messages will be lost unless you use - the "[180]-o logfile" option. + the "[183]-o logfile" option. Q-10: Sometimes when a VNC viewer dies abruptly, x11vnc also dies with @@ -1452,7 +1454,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 [181]build + environment variable before running configure (see the [184]build notes for general background). * -DX11VNC_SHARED=1 make -shared the default. * -DX11VNC_FOREVER=1 make -forever the default. @@ -1499,21 +1501,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 "[182]-nofb" option + Yes, for best response start up x11vnc with the "[185]-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 [183]x2vnc, however you would + This will also work X11 to X11 using [186]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: - * [184]Original Win2VNC - * [185]Enhanced Win2VNC and [186]sourceforge link - * [187]x2vnc - * [188]x2x also [189]here - * [190]zvnc (MorphOS) + * [187]Original Win2VNC + * [188]Enhanced Win2VNC and [189]sourceforge link + * [190]x2vnc + * [191]x2x also [192]here + * [193]zvnc (MorphOS) All of them will work with x11vnc (except x2x where it is not needed). @@ -1533,7 +1535,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 [191]-visual option to allow you to + libvncserver CVS, x11vnc has the [194]-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: @@ -1548,7 +1550,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 [192]-flashcmap option to have x11vnc watch for changes in the + Use the [195]-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 @@ -1557,21 +1559,21 @@ 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 [193]-notruecolor option has + Also note that in some rare cases the [196]-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. - Q-15: Color problems: Why are the colors for some windows messed up in + Q-15: Color problems: Why are the colors for some windows incorrect 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. - You may want to review the [194]previous question regarding 8 bpp + You may want to review the [197]previous question regarding 8 bpp PseudoColor. - On some hardware (Sun/SPARC, Sgi), the [195]-overlay option discussed + On some hardware (Sun/SPARC, Sgi), the [198]-overlay option discussed a couple paragraphs down may solve this for you (you may want to skip to it directly). @@ -1609,7 +1611,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 [196]-overlay x11vnc option (Aug/2004) to have x11vnc use the + use the [199]-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 @@ -1631,7 +1633,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 [197]-id option to + possible workaround in this case is to use the [200]-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). @@ -1639,7 +1641,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 - [198]-overlay option works for Solaris machines with overlay visuals + [201]-overlay option works for Solaris machines with overlay visuals where most of this problem occurs. @@ -1650,13 +1652,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 [199]problems. + debugging x11vnc [202]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 "[200]-id pick" to + Also, as of Dec/2004 libvncserver CVS you can use "[203]-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. @@ -1674,7 +1676,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 [201]-sid windowid option ("shifted" windowid). + polling, try the [204]-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. @@ -1727,15 +1729,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 [202]-display option to point the display to that of + machine. Use the [205]-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 [203]-noshm option (this enables the polling over + and also supply the [206]-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 [204]-flipbyteorder if the colors + the polling rate. You may also need [207]-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 @@ -1759,7 +1761,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 - [205]-auth option to point to the correct file). Other options include + [208]-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 - @@ -1771,7 +1773,7 @@ TrueColor defdepth 24 details. If the display name in the cookie file needs to be changed between the - two hosts, see [206]this note on the "xauth add ..." command. + two hosts, see [209]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 @@ -1785,7 +1787,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 [207]poll + Not recommended, but as a last resort, you could have x11vnc [210]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...) @@ -1816,17 +1818,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 - [208]-remote and [209]-query options. To shut down the running x11vnc + [211]-remote and [212]-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 [210]-forever option has not been supplied, + For older versions: If the [213]-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 [211]-bg option + If you have not put x11vnc in the background via the [214]-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 @@ -1835,14 +1837,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 [212]-clear_mods option and [213]-clear_keys + Alt. Alternatively, the [215]-clear_mods option and [216]-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 [214]-remote (same as -R) and [215]-query (same as -Q) + Look at the [217]-remote (same as -R) and [218]-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 @@ -1854,7 +1856,7 @@ TrueColor defdepth 24 be possible. There is also a simple tcl/tk gui based on this remote control - mechanism. See the [216]-gui option for more info. + mechanism. See the [219]-gui option for more info. [Security and Permissions] @@ -1866,12 +1868,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" [217]option, which is the the same + the -storepasswd "pass" "file" [220]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: [218]-rfbauth + You then use the password via the x11vnc option: [221]-rfbauth $HOME/myvncpasswd Compared to vncpasswd(1) the latter two methods are a somewhat unsafe @@ -1880,7 +1882,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 [219]-passwdfile and -passwd/-viewpasswd plain + x11vnc also has the [222]-passwdfile and -passwd/-viewpasswd plain text (i.e. not obscured like the -rfbauth VNC passwords) password options. @@ -1889,13 +1891,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 - [220]-viewpasswd option to supply the view-only password. Note the - full-access password option [221]-passwd must be supplied at the same + [223]-viewpasswd option to supply the view-only password. Note the + full-access password option [224]-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 - [222]-passwdfile option to specify a file containing plain text + [225]-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 @@ -1903,7 +1905,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 [223]-rfbauth + View-only passwords currently do not work for the [226]-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 @@ -1917,7 +1919,7 @@ TrueColor defdepth 24 some users just be able to move the mouse, but not click or type anything? - As of Feb/2005, the [224]-input option allows you to do this. "K", + As of Feb/2005, the [227]-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 @@ -1933,15 +1935,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 [225]-forever option (aka -many) to have + periods of time. Use the [228]-forever option (aka -many) to have x11vnc wait for more connections after the first client disconnects. - Use the [226]-shared option to have x11vnc allow multiple clients to + Use the [229]-shared option to have x11vnc allow multiple clients to connect simultaneously. - Recommended additional safety measures include using ssh ([227]see + Recommended additional safety measures include using ssh ([230]see above), stunnel, or a VPN to authenticate and encrypt the viewer - connections or to at least use the -rfbauth passwd-file [228]option to - use VNC password protection (or [229]-passwdfile) It is up to you to + connections or to at least use the -rfbauth passwd-file [231]option to + use VNC password protection (or [232]-passwdfile) It is up to you to apply these security measures, they will not be done for you automatically. @@ -1949,7 +1951,7 @@ TrueColor defdepth 24 Q-27: Can I limit which machines incoming VNC clients can connect from? - Yes, look at the [230]-allow and [231]-localhost options to limit + Yes, look at the [233]-allow and [234]-localhost options to limit connections by hostname or IP address. E.g. x11vnc -allow 192.168.0.1,192.168.0.2 @@ -1961,7 +1963,7 @@ TrueColor defdepth 24 Note that -localhost is the same as "-allow 127.0.0.1" For more control, build libvncserver with libwrap support - [232](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5) + [235](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5) for complete details. @@ -1981,7 +1983,7 @@ TrueColor defdepth 24 is "vnc", e.g.: vnc: 192.168.100.3 .example.com - Note that if you run x11vnc out of [233]inetd you do not need to build + Note that if you run x11vnc out of [236]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. @@ -1990,41 +1992,41 @@ 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 "[234]-listen + As of Mar/2005 in the libvncserver CVS, there is the "[237]-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 "[235]-allow host1,..." option to allow only specific hosts + use the "[238]-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 [236]-localhost now implies "-listen localhost" since that is + option [239]-localhost now implies "-listen localhost" since that is what most people expect it to do. Q-30: Now that -localhost implies listening only on the loopback - interface, how I can occasionally allow in a non-localhost via the + interface, how I can occasionally allow in a non-localhost via the -R allowonce remote control command? - To do this specify "[237]-allow localhost". Unlike [238]-localhost + To do this specify "[240]-allow localhost". Unlike [241]-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 - ([239]-listen option) via remote control or gui, you may need to also - manually adjust the [240]-allow list if you unexpectedly get into a + ([242]-listen option) via remote control or gui, you may need to also + manually adjust the [243]-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 [241]-localhost on + in on the listening interface. If you just toggle [244]-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 [242]how to tunnel VNC via + See the description earlier on this page on [245]how to tunnel VNC via SSH from Unix to Unix. A number of ways are described along with some issues you may encounter. @@ -2035,7 +2037,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? - [243]Above we described how to tunnel VNC via SSH from Unix to Unix, + [246]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 @@ -2058,8 +2060,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 [244]-localhost - and [245]-rfbauth/[246]-passwdfile options. + For extra protection feel free to run x11vnc with the [247]-localhost + and [248]-rfbauth/[249]-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 @@ -2067,11 +2069,11 @@ TrueColor defdepth 24 dialog setting to: 'Destination: otherhost:5900', Once logged in, you'll need to do a second login (ssh or rsh) to the workstation machine 'otherhost' and then start up x11vnc on it. This can also be - automated by [247]chaining ssh's. + automated by [250]chaining ssh's. - As discussed [248]above another option is to first start the VNC + As discussed [251]above another option is to first start the VNC viewer in "listen" mode, and then launch x11vnc with the - "[249]-connect localhost" option to establish the reverse connection. + "[252]-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). @@ -2082,7 +2084,7 @@ TrueColor defdepth 24 some clients view-only? How about running an arbitrary program to make the decisions? - Yes, look at the "[250]-accept command" option, it allows you to + Yes, look at the "[253]-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 @@ -2101,7 +2103,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 [251]-viewonly option has been + mouse on the "View" button. If the [254]-viewonly option has been supplied, the "View" action will not be present: the whole display is view only in that case. @@ -2117,7 +2119,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 [252]ftp://ftp.x.org/ + is available at [255]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 @@ -2156,7 +2158,7 @@ elif [ $rc = 4 ]; then fi exit 1 - Stefan Radman has written a nice dtksh script [253]dtVncPopup for use + Stefan Radman has written a nice dtksh script [256]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. @@ -2165,7 +2167,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 "[254]-gone + To run a command when a client disconnects, use the "[257]-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 @@ -2180,13 +2182,13 @@ exit 1 such support. One approximate method involves starting x11vnc with the - [255]-localhost option. This basically requires the viewer user to log + [258]-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 [256]elsewhere on this page. Of course a malicious user + mentioned [259]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 @@ -2195,7 +2197,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 [257]-accept option that runs a program to examine + involves using the [260]-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 @@ -2228,7 +2230,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 [258]-users option that allows things + As of Feb/2005 x11vnc has the [261]-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 @@ -2249,7 +2251,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 [259]blockdpy.c The idea behind it is simple (but + source for it is [262]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 @@ -2265,8 +2267,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 [260]-accept option and told - to exit via the [261]-gone option (the vnc client user should + The blockdpy utility is launched by the [263]-accept option and told + to exit via the [264]-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. @@ -2274,7 +2276,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 [262]-gone option under CDE to run a + Yes, a user mentions he uses the [265]-gone option under CDE to run a screen lock program: x11vnc -display :0 -forever -gone 'dtaction LockDisplay' @@ -2297,11 +2299,11 @@ exit 1 # reject it permissions to connect to the X display. Here are some ideas: - * Use the description under "Continuously" in the [263]FAQ on x11vnc + * Use the description under "Continuously" in the [266]FAQ on x11vnc and Display Managers - * Use the description in the [264]FAQ on x11vnc and inetd(1) + * Use the description in the [267]FAQ on x11vnc and inetd(1) * Start x11vnc from your $HOME/.xsession (or $HOME/.xinitrc) - * Although less reliable, see the [265]x11vnc_loop rc.local hack + * Although less reliable, see the [268]x11vnc_loop rc.local hack below. The display manager scheme will not be specific to which user has the @@ -2332,7 +2334,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 [266]-auth option sets the XAUTHORITY variable for you). + (the [269]-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 @@ -2357,7 +2359,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 - [267]the example at the end of this FAQ). Then restart dtlogin, e.g.: + [270]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 @@ -2417,7 +2419,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 [268]full details + killed immediately after the user logs in. Here are [271]full details on how to configure gdm _________________________________________________________________ @@ -2459,13 +2461,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: [269]x11vnc_loop It will need some local + file like rc.local: [272]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 - [270]this FAQ. + [273]this FAQ. Q-40: Can I run x11vnc out of inetd(1)? How about xinetd(1)? @@ -2475,7 +2477,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 [271]-inetd + where the shell script /usr/local/bin/x11vnc_sh uses the [274]-inetd option and looks something like (you'll need to customize to your settings). #!/bin/sh @@ -2488,7 +2490,7 @@ rever -bg and that confuses it greatly, causing it to abort). If you do not use a wrapper script as above but rather call x11vnc directly in /etc/inetd.conf and do not redirect stderr to a file, then you must - specify the -q (aka [272]-quiet) option: "/usr/local/bin/x11vnc -q + specify the -q (aka [275]-quiet) option: "/usr/local/bin/x11vnc -q -inetd ...". When you supply both -q and -inet and no "-o logfile" then stderr will automatically be closed (to prevent, e.g. library stderr messages leaking out to the viewer). The recommended practice @@ -2496,7 +2498,7 @@ rever -bg script with "2>logfile" redirection because the errors and warnings printed out are very useful in troubleshooting problems. - Note also the need to set XAUTHORITY via [273]-auth to point to the + Note also the need to set XAUTHORITY via [276]-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 @@ -2564,7 +2566,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 [274]option: + that connect to it, run x11vnc with this [277]option: -httpdir /path/to/the/java/classes/dir (this directory will contain the files index.vnc and, for example, @@ -2594,7 +2596,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 [275]-connect option. To connect immediately + starts up x11vnc with the [278]-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 @@ -2602,7 +2604,7 @@ service x11vncservice hosts to connect to. To use the vncconnect(1) program (from the core VNC package at - www.realvnc.com) specify the [276]-vncconnect option to x11vnc (Note: + www.realvnc.com) specify the [279]-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 @@ -2646,7 +2648,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 - [277]-add_keysyms option to have keysyms added automatically. Also, to + [280]-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" @@ -2666,7 +2668,7 @@ xmodmap -e "add Control = Control_L Control_R" server code is closely correlated with the real XFree86/Xorg Xserver unlike Xvfb. The main drawback to this method (besides requiring extra configuration and possibly root permission) is that it also does the - Linux Virtual Console/Terminal (VC/VT) [278]switching even though it + Linux Virtual Console/Terminal (VC/VT) [281]switching even though it does not need to (since it doesn't use a real framebuffer). There are some "dual headed" (actually multi-headed/multi-user) patches to the X server that turn off the VT usage in the X server. @@ -2693,7 +2695,7 @@ startx -- :1 -config /etc/X11/xorg.conf.dummy 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 [279]this FAQ) and access it from + display via x11vnc (e.g. see [282]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 @@ -2736,7 +2738,7 @@ startx -- :1 -config /etc/X11/xorg.conf.dummy 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 [280]shm_clear to list and prompt for removal + Here is a shell script [283]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, @@ -2770,35 +2772,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 - [281]-onetile option (corresponds to only 3 shm segments used, and + [284]-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 - [282]-noshm option. Performance will be somewhat degraded but when + [285]-noshm option. Performance will be somewhat degraded but when done over local machine sockets it should be acceptable (see an - [283]earlier question discussing -noshm). + [286]earlier question discussing -noshm). Q-46: How can I make x11vnc use less system resources? - The [284]-nap and "[285]-wait n" (where n is the sleep between polls + The [287]-nap and "[288]-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 - [286]-onetile option will use less memory and use fewer shared memory - slots (add [287]-fs 1.0 for one less slot). + [289]-onetile option will use less memory and use fewer shared memory + slots (add [290]-fs 1.0 for one less slot). Q-47: How can I make x11vnc use MORE system resources? - You can try [288]-threads and dial down the wait time (e.g. -wait 1) - and possibly dial down [289]-defer as well. Note that if you try to + You can try [291]-threads and dial down the wait time (e.g. -wait 1) + and possibly dial down [292]-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 [290]-id option) can be streamed over a LAN or wireless at + the x11vnc [293]-id option) can be streamed over a LAN or wireless at a reasonable frame rate. @@ -2814,7 +2816,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 - [291]-solid [color] option. + [294]-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. @@ -2830,7 +2832,7 @@ ied) worth it, but could be of use in some situations. VNC viewer parameters: - * Use a [292]TightVNC enabled viewer! + * Use a [295]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 @@ -2848,19 +2850,19 @@ ied) vncviewer to be very slow) x11vnc parameters: - * Try using [293]-nodragging (no screen updates when dragging mouse, + * Try using [296]-nodragging (no screen updates when dragging mouse, but sometimes you miss visual feedback) - * Try the [294]-progressive pixelheight mode with the block + * Try the [297]-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 [295]-fs 1.0 (disables fullscreen updates) - * Try increasing [296]-wait or [297]-defer (reduces the maximum + * Set [298]-fs 1.0 (disables fullscreen updates) + * Try increasing [299]-wait or [300]-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 [298]-id (cuts + * If you just want to watch one (simple) window use [301]-id (cuts down extraneous polling and updates, but can be buggy or insufficient) - * Set [299]-nosel (disables all clipboard selection exchange) - * Use [300]-nocursor and [301]-nocursorpos (repainting the remote + * Set [302]-nosel (disables all clipboard selection exchange) + * Use [303]-nocursor and [304]-nocursorpos (repainting the remote cursor position and shape takes resources and round trips) @@ -2882,7 +2884,7 @@ ied) Note that the DAMAGE extension does not speed up the actual reading of pixels from the video card framebuffer memory, by, say, mirroring them - in main memory. So reading the fb is still painfully [302]slow (e.g. + in main memory. So reading the fb is still painfully [305]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. @@ -2898,27 +2900,27 @@ ied) DAMAGE rectangles to contain real damage. The larger rectangles are only used as hints to focus the traditional scanline polling (i.e. if a scanline doesn't intersect a recent DAMAGE rectangle, the scan is - skipped). You can use the "[303]-xd_area A" option to adjust the size + skipped). You can use the "[306]-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 "[304]-xd_mem f" may also be of use in tuning the - algorithm. To disable using DAMAGE entirely use "[305]-noxdamage". + The option "[307]-xd_mem f" may also be of use in tuning the + algorithm. To disable using DAMAGE entirely use "[308]-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 [306]slow hardware read rates from + This problem is primarily due to [309]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 - [307]-pointer_mode option for more info. The next bottleneck is + [310]-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 @@ -2928,25 +2930,25 @@ 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 "[308]-pointer_mode 1" option. + way via the "[311]-pointer_mode 1" option. - Also added was the [309]-nodragging option that disables all screen + Also added was the [312]-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 [310]-pointer_mode n option + As of Dec/2004 in the libvncserver CVS the [313]-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 [311]-threads option can improve + Also, in some circumstances the [314]-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 [312]wireframe FAQ and [313]scrollcopyrect FAQ below for + See the [315]wireframe FAQ and [316]scrollcopyrect FAQ below for schemes to sweep this problem under the rug for window moves or resizes and for some window scrolls. @@ -2962,13 +2964,13 @@ 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 [314]slow video - card read rates (see [315]here too). A displacement, even a small one, + of the intermediate steps. BTW the lurching is due to [317]slow video + card read rates (see [318]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 [316]-nowireframe option + with the problem. It can be disabled with the [319]-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 @@ -3009,13 +3011,13 @@ ied) * Maximum time to show a wireframe animation. * Minimum time between sending wireframe outlines. - See the [317]"-wireframe tweaks" option for more details. On a slow + See the [320]"-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 - [318]"-wirecopyrect mode" option. It is also on by default. This + [321]"-wirecopyrect mode" option. It is also on by default. This instructs x11vnc to not only show the wireframe animation, but to also instruct all connected VNC viewers to locally translate the window image data from the original position to the new position on the @@ -3062,7 +3064,7 @@ ied) 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 - [319]slow). + [322]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. @@ -3084,10 +3086,10 @@ ied) the X server display: if one falls too far behind it could become a mess... - The initial implementation of [320]-scrollcopyrect option is useful in + The initial implementation of [323]-scrollcopyrect option is useful in that it detects many scrolls and thus gives a much nicer working - environment (especially when combined with the [321]-wireframe - [322]-wirecopyrect [323]options, which are also on by default). The + environment (especially when combined with the [324]-wireframe + [325]-wirecopyrect [326]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 @@ -3117,10 +3119,10 @@ ied) One can tap the Alt_L key (Left "Alt" key) 3 times in a row to signal x11vnc to refresh the screen to all viewers. Your VNC-viewer may have its own screen refresh hot-key or button. See - also: [324]-fixscreen + also: [327]-fixscreen * Some applications, notably OpenOffice, do XCopyArea scrolls in weird ways that assume ancestor window clipping is taking place. - See the [325]-scr_skip option for ways to tweak this on a + See the [328]-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 @@ -3137,7 +3139,7 @@ ied) because it fails to detect scrolls in it. Sometimes clicking inside the application window or selecting some text in it to force the focus helps. - * When using the [326]-scale option there will be a quick CopyRect + * When using the [329]-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 @@ -3150,7 +3152,7 @@ ied) If you find the -scrollcopyrect behavior too approximate or distracting you can go back to the standard polling-only update method - with the [327]-noscrollcopyrect or -noscr for short. If you find some + with the [330]-noscrollcopyrect or -noscr for short. If you find some extremely bad and repeatable behavior for -scrollcopyrect please report a bug. @@ -3188,16 +3190,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 "[328]-cursor X" option that + A simple kludge is provided by the "[331]-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 "[329]-cursor some" option for + work for those cases. Also see the "[332]-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 [330]-overlay option is supplied. See [331]this FAQ + cursor when the [333]-overlay option is supplied. See [334]this FAQ for more info. Also as of Dec/2004 in the libvncserver CVS XFIXES X extension support @@ -3205,7 +3207,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 [332]Solaris 10. + distros and [335]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 @@ -3213,7 +3215,7 @@ 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. [333]Details can be found here. + under 32bpp. [336]Details can be found here. Q-54: When using XFIXES cursorshape mode, some of the cursors look @@ -3246,17 +3248,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 "[334]-alphacut n" option lets + course!) some tunable parameters. The "[337]-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 "[335]-alphafrac f" option tries to correct individual + 240. The "[338]-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 [336]-alpharemove that is useful for + Finally, there is an option [339]-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 @@ -3272,11 +3274,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 [337]-nocursorshape x11vnc option. + disabled for all clients with the [340]-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 - [338]-noalphablend option to disable this behavior (always approximate + [341]-noalphablend option to disable this behavior (always approximate transparent cursors with opaque RGB values). The CursorShapeUpdates VNC extension complicates matters because the @@ -3304,9 +3306,9 @@ ied) 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 [339]tightvnc extension + This default takes advantage of a [342]tightvnc extension (CursorShapeUpdates) that allows specifying a cursor image shape for - the local VNC viewer. You may disable it with the [340]-nocursor + the local VNC viewer. You may disable it with the [343]-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 @@ -3320,18 +3322,18 @@ ied) clients (i.e. passive viewers can see the mouse cursor being moved around by another viewer)? - Use the [341]-cursorpos option when starting x11vnc. A VNC viewer must + Use the [344]-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 [342]-nocursorpos - and [343]-nocursorshape. + libvncserver CVS -cursorpos is the default. See also [345]-nocursorpos + and [346]-nocursorshape. 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: [344]-buttonmap + You can remap the mouse buttons via something like: [347]-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. @@ -3339,7 +3341,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 [345]-debug_pointer option prints out much info for + Note that the [348]-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 @@ -3361,7 +3363,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 [346]-buttonmap but rather configuring the X server + consider not using [349]-buttonmap but rather configuring the X server to think it has a mouse with 5 buttons even though the physical mouse does not. @@ -3391,7 +3393,7 @@ ied) Q-59: How can I get my AltGr and Shift modifiers to work between keyboards for different languages? - The option [347]-modtweak should be of some use for this. It is a mode + The option [350]-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. @@ -3400,17 +3402,17 @@ ied) default (use -nomodtweak to get the old behavior). This was done because it was noticed on newer XFree86 setups even on bland "us" keyboards like "pc104 us" XFree86 included a "ghost" key with both "<" - and ">" it. This key does not exist on the keyboard (see [348]this FAQ + and ">" it. This key does not exist on the keyboard (see [351]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 [349]FAQ about the -xkb option for a more powerful method + Also see the [352]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 - [350]-debug_keyboard option prints out much info for every keystroke + [353]-debug_keyboard option prints out much info for every keystroke and so can be useful debugging things. @@ -3461,17 +3463,17 @@ ied) -remap less-comma These are convenient in that they do not modify the actual X server - settings. The former ([351]-modtweak) is a mode that monitors the + settings. The former ([354]-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 ([352]-remap less-comma) is an immediate remapping of the + The latter ([355]-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 [353]FAQ about the -xkb option as a possible workaround + See also the [356]FAQ about the -xkb option as a possible workaround using the XKEYBOARD extension. - Note that the [354]-debug_keyboard option prints out much info for + Note that the [357]-debug_keyboard option prints out much info for every keystroke to aid debugging keyboard problems. @@ -3496,7 +3498,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 [355]-modtweak + This all worked fine with x11vnc running with the [358]-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 @@ -3514,7 +3516,7 @@ ied) * there is a new option -xkb to use the XKEYBOARD extension API to do the Modifier key tweaking. - The [356]-xkb option seems to fix all of the missing keys: "@", "<", + The [359]-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 @@ -3532,7 +3534,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: - [357]-skip_keycodes 93 + [360]-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 @@ -3549,14 +3551,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 [358]-remap x11vnc option: + created using the [361]-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 - [359]-add_keysyms option in the next paragraph. - * To complement the above workaround using the [360]-remap, an - option [361]-add_keysyms was added. This option instructs x11vnc + [362]-add_keysyms option in the next paragraph. + * To complement the above workaround using the [363]-remap, an + option [364]-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 @@ -3573,7 +3575,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) [362]-norepeat x11vnc option. You will still + use the new (Jul/2004) [365]-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. @@ -3595,7 +3597,7 @@ ied) off", does the problem go away? The workaround is to manually apply "xset r off" and "xset r on" as - needed, or to use the [363]-norepeat (which has since Dec/2004 been + needed, or to use the [366]-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 @@ -3606,7 +3608,7 @@ ied) keystrokes!! Are you using x11vnc to log in to an X session? (as described in - [364]this FAQ) If so, x11vnc is starting before your session and it + [367]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 @@ -3630,7 +3632,7 @@ ied) machine where I run the VNC viewer does not. Is there a way I can map a local unused key to send an AltGr? How about a Compose key as well? - Something like "[365]-remap Super_R-Mode_switch" x11vnc option may + Something like "[368]-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)). @@ -3653,7 +3655,7 @@ ied) Since xmodmap(1) modifies the X server mappings you may not want to do this (because it affects local work on that machine). Something like - the [366]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones + the [369]-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. @@ -3664,7 +3666,7 @@ ied) This can be done directly in some X servers using AccessX and Pointer_EnableKeys, but is a bit awkward. It may be more convenient to - have x11vnc do the remapping. This can be done via the [367]-remap + have x11vnc do the remapping. This can be done via the [370]-remap option using the fake "keysyms" Button1, Button2, etc. as the "to" keys (i.e. the ones after the "-") @@ -3672,7 +3674,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: - [368]-remap Super_R-Button2 + [371]-remap Super_R-Button2 maps the Super_R "flag" key press to the Button2 click, thereby making X pasting a bit easier. @@ -3701,7 +3703,7 @@ 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 [369]this + local display. Especially for hand-held devices. See also [372]this FAQ on x11vnc scaling. @@ -3710,7 +3712,7 @@ ied) As of Jun/2004 in the libvncserver CVS x11vnc provides basic server-side scaling. It is a global scaling of the desktop, not a - per-client setting. To enable it use the "[370]-scale fraction" + per-client setting. To enable it use the "[373]-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. @@ -3730,7 +3732,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 - [371]applications. Since with integer scale factors the framebuffers + [374]applications. Since with integer scale factors the framebuffers become huge and scaling operations time consuming, be sure to use ":nb" for the fastest response. @@ -3756,12 +3758,12 @@ ied) If one desires per-client scaling for something like 1:1 from a workstation and 1:2 from a smaller device (e.g. handheld), currently the only option is to run two (or more) x11vnc processes with - different scalings listening on separate ports ([372]-rfbport option, + different scalings listening on separate ports ([375]-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 [373]"-scale_cursor frac" option to set the cursor + that, use the [376]"-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). @@ -3778,16 +3780,16 @@ 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 [374]-blackout x11vnc option allows you + distracting to the viewer. The [377]-blackout x11vnc option allows you to blacken-out rectangles by specifying their WxH+X+Y geometries. If - your system has the libXinerama library, the [375]-xinerama x11vnc + your system has the libXinerama library, the [378]-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 [376]-xwarppointer + of the large display. If this happens try using the [379]-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 @@ -3812,22 +3814,22 @@ 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 [377]FAQ to increase the limit. It - is probably also a good idea to run with the [378]-onetile option in + /etc/system as mentioned in another [380]FAQ to increase the limit. It + is probably also a good idea to run with the [381]-onetile option in this case (to limit each x11vnc to 3 shm segments), or even - [379]-noshm to use no shm segments. + [382]-noshm to use no shm segments. 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 "[380]-clip + As of Mar/2005 in the libvncserver CVS x11vnc has the "[383]-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 [381]-id or [382]-sid options are used. The offset is measured + the [384]-id or [385]-sid options are used. The offset is measured from the upper left corner of the selected window. @@ -3836,7 +3838,7 @@ ied) crash. As of Dec/2004 in the libvncserver CVS x11vnc supports XRANDR. You - enable it with the [383]-xrandr option to make x11vnc monitor XRANDR + enable it with the [386]-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 @@ -3845,7 +3847,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 - [384]-padgeom option to make the region big enough to hold all resizes + [387]-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 @@ -3899,9 +3901,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 [385]this FAQ + desktop in a separate Virtual Console (e.g. VC 8) (see [388]this FAQ on VC's for background). Unfortunately, this Fullscreen VC is not an X - server. So x11vnc cannot access it (however, [386]see this for a + server. So x11vnc cannot access it (however, [389]see this for a possible partial workaround). x11vnc works fine with "Normal X application window" and "Quick-Switch mode" because these use X. @@ -3918,13 +3920,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 [387]is in the active VC. + as long as the VMWare X session [390]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 [388]-id windowid option. The + the VMWare menu buttons) by use of the [391]-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 @@ -4005,7 +4007,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 [389]X API, but you get + of Xvfb x11vnc can poll it much better via the [392]X API, but you get the idea. By default in -rawfb mode x11vnc will actually close any X display it @@ -4058,7 +4060,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 [390]active VC) one + view and interact with VC #2 (assuming it is the [393]active VC) one can run something like: x11vnc -rawfb map:/dev/fb0@1024x768x16 -pipeinput './vcinject.pl 2' @@ -4071,7 +4073,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 - [391]VMWare Fullscreen mode is actually viewable under -rawfb. But + [394]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. @@ -4102,9 +4104,9 @@ ied) As of Jan/2004 in the libvncserver CVS x11vnc supports the "CutText" part of the rfb protocol. Furthermore, x11vnc is able to hold the PRIMARY selection (Xvnc does not seem to do this). If you don't want - the Clipboard/Selection exchanged use the [392]-nosel option. If you + the Clipboard/Selection exchanged use the [395]-nosel option. If you don't want the PRIMARY selection to be polled for changes use the - [393]-noprimary option. + [396]-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 @@ -4119,7 +4121,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 [394]-nobell option. If + If you don't want to hear the beeps use the [397]-nobell option. If you want to hear the audio from the remote applications, consider trying a redirector such as esd. @@ -4135,7 +4137,7 @@ ied) Click on the PayPal button below for more info. Also, in general I always enjoy hearing from x11vnc users, how they use it, what new features they would like, etc. Please send me an - [395]email! + [398]email! [PayPal] @@ -4212,330 +4214,333 @@ References 69. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait 70. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport 71. http://www.karlrunge.com/x11vnc/shm_clear - 72. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb - 73. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 74. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 75. mailto:[email protected] - 76. http://www.karlrunge.com/x11vnc/index.html#faq-thanks - 77. http://www.karlrunge.com/x11vnc/index.html#faq-xperms - 78. http://www.karlrunge.com/x11vnc/index.html#faq-build - 79. http://www.karlrunge.com/x11vnc/index.html#faq-missing-xtest - 80. http://www.karlrunge.com/x11vnc/index.html#faq-solaris251build - 81. http://www.karlrunge.com/x11vnc/index.html#faq-binaries - 82. http://www.karlrunge.com/x11vnc/index.html#faq-viewer-download - 83. http://www.karlrunge.com/x11vnc/index.html#faq-cmdline-opts - 84. http://www.karlrunge.com/x11vnc/index.html#faq-config-file - 85. http://www.karlrunge.com/x11vnc/index.html#faq-quiet-bg - 86. http://www.karlrunge.com/x11vnc/index.html#faq-sigpipe - 87. http://www.karlrunge.com/x11vnc/index.html#faq-build-customizations - 88. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc - 89. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc-8bpp - 90. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp - 91. http://www.karlrunge.com/x11vnc/index.html#faq-overlays - 92. http://www.karlrunge.com/x11vnc/index.html#faq-windowid - 93. http://www.karlrunge.com/x11vnc/index.html#faq-transients-id - 94. http://www.karlrunge.com/x11vnc/index.html#faq-24bpp - 95. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 96. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth - 97. http://www.karlrunge.com/x11vnc/index.html#faq-stop-bg - 98. http://www.karlrunge.com/x11vnc/index.html#faq-remote_control - 99. http://www.karlrunge.com/x11vnc/index.html#faq-passwd - 100. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 101. http://www.karlrunge.com/x11vnc/index.html#faq-input-opt - 102. http://www.karlrunge.com/x11vnc/index.html#faq-forever-shared - 103. http://www.karlrunge.com/x11vnc/index.html#faq-allow-opt - 104. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers - 105. http://www.karlrunge.com/x11vnc/index.html#faq-listen-interface - 106. http://www.karlrunge.com/x11vnc/index.html#faq-listen-localhost - 107. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-unix - 108. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-putty - 109. http://www.karlrunge.com/x11vnc/index.html#faq-accept-opt - 110. http://www.karlrunge.com/x11vnc/index.html#faq-unix-passwords - 111. http://www.karlrunge.com/x11vnc/index.html#faq-users-opt - 112. http://www.karlrunge.com/x11vnc/index.html#faq-blockdpy - 113. http://www.karlrunge.com/x11vnc/index.html#faq-gone-lock - 114. http://www.karlrunge.com/x11vnc/index.html#faq-service - 115. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager - 116. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 117. http://www.karlrunge.com/x11vnc/index.html#faq-java-http - 118. http://www.karlrunge.com/x11vnc/index.html#faq-reverse-connect - 119. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb - 120. http://www.karlrunge.com/x11vnc/index.html#faq-headless - 121. http://www.karlrunge.com/x11vnc/index.html#faq-solshm - 122. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource - 123. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource - 124. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link - 125. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage - 126. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode - 127. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe - 128. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect - 129. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape - 130. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha - 131. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks - 132. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow - 133. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions - 134. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt - 135. http://www.karlrunge.com/x11vnc/index.html#faq-altgr - 136. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless - 137. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak - 138. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys - 139. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still - 140. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt - 141. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta - 142. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click - 143. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars - 144. http://www.karlrunge.com/x11vnc/index.html#faq-scaling - 145. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama - 146. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen - 147. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen - 148. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr - 149. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen - 150. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 151. http://www.karlrunge.com/x11vnc/index.html#faq-vmware - 152. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb - 153. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars - 154. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard - 155. http://www.karlrunge.com/x11vnc/index.html#faq-beeps - 156. http://www.karlrunge.com/x11vnc/index.html#faq-thanks - 157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display - 158. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 159. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager - 160. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users - 161. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 162. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html - 163. http://www.karlrunge.com/x11vnc/index.html#building - 164. http://www.karlrunge.com/x11vnc/index.html#faq-build - 165. http://packages.debian.org/x11vnc - 166. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc - 167. http://dag.wieers.com/packages/x11vnc/ - 168. http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Network/x11vnc/ - 169. http://www.sunfreeware.com/ - 170. http://www.bell-labs.com/project/wwexptools/packages.html - 171. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 172. http://www.karlrunge.com/x11vnc/bins - 173. http://www.tightvnc.com/download.html - 174. http://www.realvnc.com/download-free.html - 175. http://sourceforge.net/projects/cotvnc/ - 176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html - 177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui - 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q - 179. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg - 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o - 181. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding - 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb - 183. http://fredrik.hubbe.net/x2vnc.html - 184. http://www.hubbe.net/~hubbe/win2vnc.html - 185. http://www.deboer.gmxhome.de/ - 186. http://sourceforge.net/projects/win2vnc/ - 187. http://fredrik.hubbe.net/x2vnc.html - 188. http://freshmeat.net/projects/x2x/ - 189. http://ftp.digital.com/pub/Digital/SRC/x2x/ - 190. http://zapek.com/software/zvnc/ - 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual - 192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap - 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor - 194. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp - 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 197. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 72. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 73. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 74. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 75. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 76. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 77. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 78. mailto:[email protected] + 79. http://www.karlrunge.com/x11vnc/index.html#faq-thanks + 80. http://www.karlrunge.com/x11vnc/index.html#faq-xperms + 81. http://www.karlrunge.com/x11vnc/index.html#faq-build + 82. http://www.karlrunge.com/x11vnc/index.html#faq-missing-xtest + 83. http://www.karlrunge.com/x11vnc/index.html#faq-solaris251build + 84. http://www.karlrunge.com/x11vnc/index.html#faq-binaries + 85. http://www.karlrunge.com/x11vnc/index.html#faq-viewer-download + 86. http://www.karlrunge.com/x11vnc/index.html#faq-cmdline-opts + 87. http://www.karlrunge.com/x11vnc/index.html#faq-config-file + 88. http://www.karlrunge.com/x11vnc/index.html#faq-quiet-bg + 89. http://www.karlrunge.com/x11vnc/index.html#faq-sigpipe + 90. http://www.karlrunge.com/x11vnc/index.html#faq-build-customizations + 91. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc + 92. http://www.karlrunge.com/x11vnc/index.html#faq-win2vnc-8bpp + 93. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp + 94. http://www.karlrunge.com/x11vnc/index.html#faq-overlays + 95. http://www.karlrunge.com/x11vnc/index.html#faq-windowid + 96. http://www.karlrunge.com/x11vnc/index.html#faq-transients-id + 97. http://www.karlrunge.com/x11vnc/index.html#faq-24bpp + 98. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 99. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth + 100. http://www.karlrunge.com/x11vnc/index.html#faq-stop-bg + 101. http://www.karlrunge.com/x11vnc/index.html#faq-remote_control + 102. http://www.karlrunge.com/x11vnc/index.html#faq-passwd + 103. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 104. http://www.karlrunge.com/x11vnc/index.html#faq-input-opt + 105. http://www.karlrunge.com/x11vnc/index.html#faq-forever-shared + 106. http://www.karlrunge.com/x11vnc/index.html#faq-allow-opt + 107. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers + 108. http://www.karlrunge.com/x11vnc/index.html#faq-listen-interface + 109. http://www.karlrunge.com/x11vnc/index.html#faq-listen-localhost + 110. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-unix + 111. http://www.karlrunge.com/x11vnc/index.html#faq-ssh-putty + 112. http://www.karlrunge.com/x11vnc/index.html#faq-accept-opt + 113. http://www.karlrunge.com/x11vnc/index.html#faq-unix-passwords + 114. http://www.karlrunge.com/x11vnc/index.html#faq-users-opt + 115. http://www.karlrunge.com/x11vnc/index.html#faq-blockdpy + 116. http://www.karlrunge.com/x11vnc/index.html#faq-gone-lock + 117. http://www.karlrunge.com/x11vnc/index.html#faq-service + 118. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager + 119. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 120. http://www.karlrunge.com/x11vnc/index.html#faq-java-http + 121. http://www.karlrunge.com/x11vnc/index.html#faq-reverse-connect + 122. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 123. http://www.karlrunge.com/x11vnc/index.html#faq-headless + 124. http://www.karlrunge.com/x11vnc/index.html#faq-solshm + 125. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource + 126. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource + 127. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link + 128. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage + 129. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode + 130. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 131. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect + 132. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape + 133. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha + 134. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks + 135. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow + 136. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions + 137. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt + 138. http://www.karlrunge.com/x11vnc/index.html#faq-altgr + 139. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless + 140. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 141. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys + 142. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still + 143. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt + 144. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta + 145. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click + 146. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars + 147. http://www.karlrunge.com/x11vnc/index.html#faq-scaling + 148. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama + 149. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen + 150. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen + 151. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr + 152. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen + 153. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 154. http://www.karlrunge.com/x11vnc/index.html#faq-vmware + 155. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb + 156. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars + 157. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard + 158. http://www.karlrunge.com/x11vnc/index.html#faq-beeps + 159. http://www.karlrunge.com/x11vnc/index.html#faq-thanks + 160. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display + 161. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 162. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager + 163. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users + 164. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 165. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html + 166. http://www.karlrunge.com/x11vnc/index.html#building + 167. http://www.karlrunge.com/x11vnc/index.html#faq-build + 168. http://packages.debian.org/x11vnc + 169. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc + 170. http://dag.wieers.com/packages/x11vnc/ + 171. http://linux01.gwdg.de/~pbleser/rpm-navigation.php?cat=Network/x11vnc/ + 172. http://www.sunfreeware.com/ + 173. http://www.bell-labs.com/project/wwexptools/packages.html + 174. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 175. http://www.karlrunge.com/x11vnc/bins + 176. http://www.tightvnc.com/download.html + 177. http://www.realvnc.com/download-free.html + 178. http://sourceforge.net/projects/cotvnc/ + 179. http://www.karlrunge.com/x11vnc/x11vnc_opts.html + 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui + 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q + 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg + 183. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o + 184. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding + 185. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb + 186. http://fredrik.hubbe.net/x2vnc.html + 187. http://www.hubbe.net/~hubbe/win2vnc.html + 188. http://www.deboer.gmxhome.de/ + 189. http://sourceforge.net/projects/win2vnc/ + 190. http://fredrik.hubbe.net/x2vnc.html + 191. http://freshmeat.net/projects/x2x/ + 192. http://ftp.digital.com/pub/Digital/SRC/x2x/ + 193. http://zapek.com/software/zvnc/ + 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual + 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap + 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor + 197. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 199. http://www.karlrunge.com/x11vnc/index.html#faq-overlays + 199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid - 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display - 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder - 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 206. http://www.karlrunge.com/x11vnc/index.html#xauth_pain - 207. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote - 209. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query - 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever - 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg - 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods - 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys - 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote - 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query - 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui - 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd - 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 219. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd - 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd - 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile - 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input - 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever - 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared - 227. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 228. http://www.karlrunge.com/x11vnc/index.html#faq-passwd - 229. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile - 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#faq-tcp_wrappers - 233. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen - 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-allow - 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen + 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 202. http://www.karlrunge.com/x11vnc/index.html#faq-overlays + 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid + 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display + 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder + 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 209. http://www.karlrunge.com/x11vnc/index.html#xauth_pain + 210. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote + 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query + 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever + 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg + 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods + 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys + 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote + 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query + 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui + 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd + 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 222. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd + 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd + 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile + 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input + 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever + 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared + 230. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 231. http://www.karlrunge.com/x11vnc/index.html#faq-passwd + 232. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile + 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/index.html#faq-tcp_wrappers + 236. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 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/x11vnc_opts.html#opt-allow 241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 242. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 243. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 242. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen + 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow 244. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth - 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile - 247. http://www.karlrunge.com/x11vnc/index.html#gateway_double_ssh - 248. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect - 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly - 252. ftp://ftp.x.org/ - 253. http://www.karlrunge.com/x11vnc/dtVncPopup - 254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone - 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost - 256. http://www.karlrunge.com/x11vnc/index.html#tunnelling - 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users - 259. http://www.karlrunge.com/x11vnc/blockdpy.c + 245. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 246. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth + 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile + 250. http://www.karlrunge.com/x11vnc/index.html#gateway_double_ssh + 251. http://www.karlrunge.com/x11vnc/index.html#tunnelling + 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect + 253. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept + 254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly + 255. ftp://ftp.x.org/ + 256. http://www.karlrunge.com/x11vnc/dtVncPopup + 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost + 259. http://www.karlrunge.com/x11vnc/index.html#tunnelling 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept - 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone - 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone - 263. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously - 264. http://www.karlrunge.com/x11vnc/index.html#faq-inetd - 265. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop - 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 267. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris - 268. http://www.jirka.org/gdm-documentation/x241.html - 269. http://www.karlrunge.com/x11vnc/x11vnc_loop - 270. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth - 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd - 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q - 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth - 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir - 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect - 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect - 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 278. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 279. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously - 280. http://www.karlrunge.com/x11vnc/shm_clear - 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 283. http://www.karlrunge.com/x11vnc/index.html#faq-noshm - 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap - 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait - 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs - 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads - 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer - 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid - 292. http://www.tightvnc.com/ - 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging - 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive - 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs - 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait - 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer - 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel - 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor - 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos - 302. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow - 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area - 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem - 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage - 306. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow - 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 308. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging + 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users + 262. http://www.karlrunge.com/x11vnc/blockdpy.c + 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept + 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone + 266. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously + 267. http://www.karlrunge.com/x11vnc/index.html#faq-inetd + 268. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop + 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 270. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris + 271. http://www.jirka.org/gdm-documentation/x241.html + 272. http://www.karlrunge.com/x11vnc/x11vnc_loop + 273. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth + 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd + 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q + 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth + 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir + 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect + 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect + 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 281. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 282. http://www.karlrunge.com/x11vnc/index.html#display-manager-continuously + 283. http://www.karlrunge.com/x11vnc/shm_clear + 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile + 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 286. http://www.karlrunge.com/x11vnc/index.html#faq-noshm + 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap + 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile + 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs + 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads + 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer + 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid + 295. http://www.tightvnc.com/ + 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging + 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive + 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs + 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait + 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer + 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel + 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor + 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos + 305. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area + 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem + 308. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage + 309. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode - 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads - 312. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe - 313. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect - 314. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode - 315. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow - 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 319. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow - 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode + 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging + 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode + 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads + 315. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 316. http://www.karlrunge.com/x11vnc/index.html#faq-scrollcopyrect + 317. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode + 318. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe - 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wirecopyrect - 323. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe - 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen - 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scr_skip - 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale - 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect - 328. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor - 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay - 331. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode - 332. http://www.karlrunge.com/x11vnc/index.html#solaris10-build - 333. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks - 334. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut - 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac - 336. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove - 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape - 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend - 339. http://www.tightvnc.com/ - 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor - 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos - 342. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos - 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape - 344. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap - 345. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer - 346. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap - 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak - 348. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless - 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-remap - 353. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak - 354. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard - 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak - 356. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb - 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes - 358. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 360. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 361. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms - 362. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat - 363. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat - 364. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager - 365. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 366. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 367. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 322. http://www.karlrunge.com/x11vnc/index.html#fb_read_slow + 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe + 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wirecopyrect + 326. http://www.karlrunge.com/x11vnc/index.html#faq-wireframe + 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fixscreen + 328. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scr_skip + 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale + 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect + 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor + 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay + 334. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode + 335. http://www.karlrunge.com/x11vnc/index.html#solaris10-build + 336. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks + 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut + 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac + 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove + 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape + 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend + 342. http://www.tightvnc.com/ + 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor + 344. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos + 345. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos + 346. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape + 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap + 348. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer + 349. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap + 350. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 351. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless + 352. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 353. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard + 354. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 355. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 356. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak + 357. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard + 358. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak + 359. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb + 360. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes + 361. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 362. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 363. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 364. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms + 365. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat + 366. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat + 367. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager 368. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap - 369. http://www.karlrunge.com/x11vnc/index.html#faq-scaling - 370. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale - 371. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html - 372. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport - 373. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor - 374. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout - 375. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama - 376. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer - 377. http://www.karlrunge.com/x11vnc/index.html#faq-solshm - 378. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile - 379. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm - 380. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip - 381. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 382. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 383. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr - 384. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom - 385. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 386. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb - 387. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 388. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id - 389. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 369. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 370. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 371. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap + 372. http://www.karlrunge.com/x11vnc/index.html#faq-scaling + 373. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale + 374. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html + 375. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport + 376. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor + 377. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout + 378. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama + 379. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer + 380. http://www.karlrunge.com/x11vnc/index.html#faq-solshm + 381. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile + 382. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm + 383. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip + 384. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 385. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 386. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr + 387. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom + 388. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 389. http://www.karlrunge.com/x11vnc/index.html#faq-rawfb 390. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc - 391. http://www.karlrunge.com/x11vnc/index.html#faq-vmware - 392. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel - 393. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary - 394. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell - 395. mailto:[email protected] + 391. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id + 392. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb + 393. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc + 394. http://www.karlrunge.com/x11vnc/index.html#faq-vmware + 395. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel + 396. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary + 397. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell + 398. mailto:[email protected] ======================================================================= @@ -4548,7 +4553,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-07-09 +x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-07-10 x11vnc options: -display disp -auth file @@ -4565,61 +4570,62 @@ x11vnc options: -novncconnect -allow host1[,host2..] -localhost -nolookup -input string -viewpasswd string - -passwdfile filename -storepasswd pass file - -accept string -gone string - -users list -noshm - -flipbyteorder -onetile - -solid [color] -blackout string - -xinerama -xtrap - -xrandr [mode] -padgeom WxH - -o logfile -flag file - -rc filename -norc - -h, -help -?, -opts - -V, -version -dbg - -q -bg - -modtweak -nomodtweak - -xkb -noxkb - -skip_keycodes string -sloppy_keys - -skip_dups -noskip_dups - -add_keysyms -noadd_keysyms - -clear_mods -clear_keys - -remap string -norepeat - -repeat -nofb - -nobell -nosel - -noprimary -seldir string - -cursor [mode] -nocursor - -arrow n -noxfixes - -alphacut n -alphafrac fraction - -alpharemove -noalphablend - -nocursorshape -cursorpos - -nocursorpos -xwarppointer - -buttonmap string -nodragging - -wireframe [str] -nowireframe - -wirecopyrect mode -nowirecopyrect - -debug_wireframe -scrollcopyrect mode - -noscrollcopyrect -scr_area n - -scr_skip list -scr_inc list - -scr_keys list -scr_term list - -scr_keyrepeat lo-hi -scr_parms string - -fixscreen string -debug_scroll - -noxrecord -grab_buster - -nograb_buster -debug_grabs - -pointer_mode n -input_skip n - -speeds rd,bw,lat -wmdt string - -debug_pointer -debug_keyboard - -defer time -wait time - -wait_ui factor -nowait_bog - -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 + -passwdfile filename -nopw + -storepasswd pass file -accept string + -gone string -users list + -noshm -flipbyteorder + -onetile -solid [color] + -blackout string -xinerama + -xtrap -xrandr [mode] + -padgeom WxH -o logfile + -flag file -rc filename + -norc -h, -help + -?, -opts -V, -version + -dbg -q + -bg -modtweak + -nomodtweak -xkb + -noxkb -skip_keycodes string + -sloppy_keys -skip_dups + -noskip_dups -add_keysyms + -noadd_keysyms -clear_mods + -clear_keys -remap string + -norepeat -repeat + -nofb -nobell + -nosel -noprimary + -seldir string -cursor [mode] + -nocursor -arrow n + -noxfixes -alphacut n + -alphafrac fraction -alpharemove + -noalphablend -nocursorshape + -cursorpos -nocursorpos + -xwarppointer -buttonmap string + -nodragging -wireframe [str] + -nowireframe -wirecopyrect mode + -nowirecopyrect -debug_wireframe + -scrollcopyrect mode -noscrollcopyrect + -scr_area n -scr_skip list + -scr_inc list -scr_keys list + -scr_term list -scr_keyrepeat lo-hi + -scr_parms string -fixscreen string + -debug_scroll -noxrecord + -grab_buster -nograb_buster + -debug_grabs -pointer_mode n + -input_skip n -speeds rd,bw,lat + -wmdt string -debug_pointer + -debug_keyboard -defer time + -wait time -wait_ui factor + -nowait_bog -readtimeout n + -nap -nonap + -sb time -noxdamage + -xd_area A -xd_mem f + -sigpipe string -threads + -nothreads -fs f + -gaps n -grow n + -fuzz n -debug_tiles + -snapfb -rawfb string + -pipeinput cmd -gui [gui-opts] + -remote command -query variable + -QD variable -sync -noremote -yesremote -unsafe -safer -privremote -nocmds @@ -4649,7 +4655,7 @@ libvncserver options: % x11vnc -help -x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-07-09 +x11vnc: allow VNC connections to real X11 displays. 0.7.2 lastmod: 2005-07-10 Typical usage is: @@ -4678,6 +4684,8 @@ through an encrypted channel such as ssh(1). In brief: vncviewer -encodings 'copyrect tight zrle hextile' localhost:0 +Also, use of a VNC password (-rfbauth or -passwdfile) is strongly recommend. + For additional info see: http://www.karlrunge.com/x11vnc/ and http://www.karlrunge.com/x11vnc/#faq @@ -4687,9 +4695,10 @@ line in it is treated as a single command line option. Disable with -norc. For each option name, the leading character "-" is not required. E.g. a line that is either "forever" or "-forever" may be used and are equivalent. Likewise "wait 100" or "-wait 100" are acceptable and equivalent lines. -The "#" character comments out to the end of the line in the usual way. -Leading and trailing whitespace is trimmed off. Lines may be continued with -a "\" as the last character of a line (it becomes a space character). +The "#" character comments out to the end of the line in the usual way +(backslash it for a literal). Leading and trailing whitespace is trimmed off. +Lines may be continued with a "\" as the last character of a line (it +becomes a space character). Options: @@ -4756,19 +4765,18 @@ Options: around transient popup menus (but not for the menu itself): a workaround is to disable SaveUnders by passing the "-su" argument to Xsun (in - /etc/dt/config/Xservers). Also note that the mouse - cursor shape is exactly correct in this mode. + /etc/dt/config/Xservers). Use -overlay as a workaround for situations like these: Some legacy applications require the default visual to be 8bpp (8+24), or they will use 8bpp PseudoColor even when the default visual is depth 24 TrueColor (24+8). - In these cases colors in some windows will be messed - up in x11vnc unless -overlay is used. Another use of + In these cases colors in some windows will be incorrect + in x11vnc unless -overlay is used. Another use of -overlay is to enable showing the exact mouse cursor shape (details below). - Under -overlay, performance will be somewhat degraded + Under -overlay, performance will be somewhat slower due to the extra image transformations required. For optimal performance do not use -overlay, but rather configure the X server so that the default visual is @@ -4801,7 +4809,7 @@ Options: More esoteric options: for compatibility with vncviewers the scaled width is adjusted to be a multiple of 4: to disable this use ":n4". ":in" use interpolation - scheme even when shrinking, ":pad", pad scaled width + scheme even when shrinking, ":pad" pad scaled width and height to be multiples of scaling denominator (e.g. 3 for 2/3). @@ -4822,10 +4830,10 @@ Options: -forever Keep listening for more connections rather than exiting as soon as the first client(s) disconnect. Same as -many -timeout n Exit unless a client connects within the first n seconds - of startup. + after startup. -inetd Launched by inetd(1): stdio instead of listening socket. Note: if you are not redirecting stderr to a log file - (via shell 2> or -o option) you must also specify the -q + (via shell 2> or -o option) you MUST also specify the -q option, otherwise the stderr goes to the viewer which will cause it to abort. Specifying both -inetd and -q and no -o will automatically close the stderr. @@ -4843,7 +4851,7 @@ Options: as a file to periodically check for new hosts. The first line is read and then the file is truncated. Be careful for this usage mode if x11vnc is running as - root (e.g. via inetd(1) or gdm(1)). + root (e.g. via gdm(1), etc). -vncconnect Monitor the VNC_CONNECT X property set by the standard -novncconnect VNC program vncconnect(1). When the property is set to "host" or "host:port" establish a reverse @@ -4877,7 +4885,7 @@ Options: -nolookup Do not use gethostbyname() or gethostbyaddr() to look up host names or IP numbers. Use this if name resolution is incorrectly set up and leads to long pauses as name - lookup times out, etc. + lookups time out, etc. -input string Fine tuning of allowed user input. If "string" does not contain a comma "," the tuning applies only to @@ -4890,7 +4898,7 @@ Options: the mouse and "-input KMB,M" lets normal users do anything and enables view-only users to move the mouse. This option is ignored when a global -viewonly is in - effect (all input is discarded). + effect (all input is discarded in that case). -viewpasswd string Supply a 2nd password for view-only logins. The -passwd (full-access) password must also be supplied. -passwdfile filename Specify libvncserver -passwd via the first line of the @@ -4902,7 +4910,9 @@ Options: Note: -passwdfile is a simple plaintext passwd, see also -rfbauth and -storepasswd below for obfuscated VNC password files. Neither file should be readable - by others. + by untrusted users. +-nopw Disable the big warning message when you use x11vnc + without some sort of password. -storepasswd pass file Store password "pass" as the VNC password in the file "file". Once the password is stored the program exits. Use the password via "-rfbauth file" @@ -4935,7 +4945,7 @@ Options: If "string" is "popup" then a builtin popup window is used. The popup will time out after 120 seconds, use "popup:N" to modify the timeout to N seconds - (use 0 for no timeout) + (use 0 for no timeout). If "string" is "xmessage" then an xmessage(1) invocation is used for the command. xmessage must be @@ -4957,7 +4967,9 @@ Options: Note that x11vnc blocks while the external command or popup is running (other clients may see no updates - during this period). + during this period). So a person sitting a the physical + display is needed to respond to an popup prompt. (use + a 2nd x11vnc if you lock yourself out). More -accept tricks: use "popupmouse" to only allow mouse clicks in the builtin popup to be recognized. @@ -5074,11 +5086,12 @@ Options: each rectangle. -xinerama If your screen is composed of multiple monitors glued together via XINERAMA, and that screen is - non-rectangular this option will try to guess the + not a rectangle this option will try to guess the areas to black out (if your system has libXinerama). - In general on XINERAMA displays you may need to use the - -xwarppointer option if the mouse pointer misbehaves. + In general, we have noticed on XINERAMA displays you + may need to use the "-xwarppointer" option if the mouse + pointer misbehaves. -xtrap Use the DEC-XTRAP extension for keystroke and mouse input insertion. For use on legacy systems, e.g. X11R5, @@ -5137,7 +5150,7 @@ Options: -?, -opts Only list the x11vnc options. -V, -version Print program version and last modification date. --dbg instead of exiting after cleaning up, run a simple +-dbg Instead of exiting after cleaning up, run a simple "debug crash shell" when fatal errors are trapped. -q Be quiet by printing less informational output to @@ -5180,7 +5193,7 @@ Options: Key that could give rise to extra unwanted characters (usually only between keyboards of different languages). Only use this option if you observe problems with - some keystrokes. This option may be extended. + some keystrokes. -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 modifier key! @@ -5190,11 +5203,11 @@ Options: 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. - Added Keysyms will be removed periodically and also - when x11vnc exits. Default: -add_keysyms +-add_keysyms If a Keysym is received from a VNC viewer and that +-noadd_keysyms Keysym does not exist in the X server, then add the + Keysym to the X server's keyboard mapping on an unused + key. Added Keysyms will be removed periodically and + also when x11vnc exits. Default: -add_keysyms -clear_mods At startup and exit clear the modifier keys by sending KeyRelease for each one. The Lock modifiers are skipped. Used to clear the state if the display was accidentally @@ -5215,7 +5228,7 @@ Options: Dead keys: "dead" (or silent, mute) keys are keys that do not produce a character but must be followed by a 2nd keystroke. This is often used for accenting characters, - e.g. to put "'" on top of "a" by pressing the dead + e.g. to put "`" on top of "a" by pressing the dead key and then "a". Note that this interpretation is not part of core X11, it is up to the toolkit or application to decide how to react to the sequence. @@ -5261,7 +5274,7 @@ Options: Use "-norepeat N" to set how many times norepeat will be reset if something else (e.g. X session manager) - disables it. The default is 2. Use a negative value + undoes it. The default is 2. Use a negative value for unlimited resets. -nofb Ignore video framebuffer: only process keyboard and @@ -5304,7 +5317,7 @@ Options: information from the X server, then the default is to use that mode. On Solaris this can be done with the SUN_OVL extension using -overlay (see also the - -overlay_nomouse option). A similar overlay scheme + -overlay_nocursor option). A similar overlay scheme is used on IRIX. Xorg (e.g. Linux) and recent Solaris Xsun servers support the XFIXES extension to retrieve the exact cursor shape from the X server. If XFIXES @@ -5314,10 +5327,10 @@ Options: option below. Note that under XFIXES cursors with transparency (alpha - channel) will not be exactly represented and one may - find Overlay preferable. See also the -alphacut and - -alphafrac options below as fudge factors to try to - improve the situation for cursors with transparency + channel) will usually not be exactly represented and one + may find Overlay preferable. See also the -alphacut + and -alphafrac options below as fudge factors to try + to improve the situation for cursors with transparency for a given theme. The "mode" string can be used to fine-tune the @@ -5352,20 +5365,19 @@ Options: -arrow n Choose an alternate "arrow" cursor from a set of some common ones. n can be 1 to 6. Default is: 1 + Ignored when in XFIXES cursor-grabbing mode. -noxfixes Do not use the XFIXES extension to draw the exact cursor shape even if it is available. -alphacut n When using the XFIXES extension for the cursor shape, - cursors with transparency will not be displayed exactly - (but opaque ones will). This option sets n as a cutoff - for cursors that have transparency ("alpha channel" - with values ranging from 0 to 255) Any cursor pixel with - alpha value less than n becomes completely transparent. - Otherwise the pixel is completely opaque. Default 240 - - Note: the options -alphacut, -alphafrac, and -alphafrac - may be removed if a more accurate internal method for - handling cursor transparency is implemented. + cursors with transparency will not usually be displayed + exactly (but opaque ones will). This option sets n as + a cutoff for cursors that have transparency ("alpha + channel" with values ranging from 0 to 255) Any cursor + pixel with alpha value less than n becomes completely + transparent. Otherwise the pixel is completely opaque. + Default 240 + -alphafrac fraction With the threshold in -alphacut some cursors will become almost completely transparent because their alpha values are not high enough. For those cursors adjust the @@ -5425,7 +5437,7 @@ Options: (mouse button held down). Greatly improves response on slow setups, but you lose all visual feedback for drags, text selection, and some menu traversals. It overrides - any -pointer_mode setting + any -pointer_mode setting. -wireframe [str] Try to detect window moves or resizes when a mouse -nowireframe button is held down and show a wireframe instead of @@ -5478,8 +5490,9 @@ Options: or being resized (for some window managers this can be rather long), t3 is how long to keep a wireframe moving before repainting the window. t4 is the minimum time - between sending wireframe "animations". For a slow - link this might be a better choice: 0.25+0.6+6.0+0.15 + between sending wireframe "animations". If a slow + link is detected, these values may be automatically + changed to something better for a slow link. -wirecopyrect mode Since the -wireframe mechanism evidently tracks moving -nowirecopyrect windows accurately, a speedup can be obtained by @@ -5706,9 +5719,9 @@ 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 (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. + You can use 3 Alt_L's (the Left "Alt" key) taps in a + row described under -scrollcopyrect 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 @@ -5733,34 +5746,39 @@ Options: -grab_buster Some of the use of the RECORD extension can leave a -nograb_buster tiny window for XGrabServer deadlock. This is only if - the whole-server grabbing application expects mouse - or keyboard input before releasing the grab. It is - usually a window manager that does this. x11vnc takes - care to avoid the the problem, but if caught x11vnc - will freeze. Without -grab_buster, the only solution - is to go the physical display and give it some input - to satisfy the grabbing app. Or manually kill and - restart the window manager. With -grab_buster, x11vnc + the whole-server grabbing application expects mouse or + keyboard input before releasing the grab. It is usually + a window manager that does this. x11vnc takes care to + avoid the the problem, but if caught x11vnc will freeze. + Without -grab_buster, the only solution is to go the + physical display and give it some input to satisfy the + grabbing app. Or manually kill and restart the window + manager if that is feasible. With -grab_buster, x11vnc will fork a helper thread and if x11vnc appears to be - stuck in a grab after a period of time (20-30 sec) - then it will inject some user input: button clicks, - Escape, mouse motion, etc to try to break the grab. + stuck in a grab after a period of time (20-30 sec) then + it will inject some user input: button clicks, Escape, + mouse motion, etc to try to break the grab. If you + experience a lot of grab deadlock, please report a bug. -debug_grabs Turn on debugging info printout with respect to XGrabServer() deadlock for -scrollcopyrect mode. -pointer_mode n Various pointer motion update schemes. "-pm" is an alias. The problem is pointer motion can cause - rapid changes on the screen: consider the rapid changes - when you drag a large window around. Neither x11vnc's - screen polling and vnc compression routines nor the - bandwidth to the vncviewers can keep up these rapid - screen changes: everything will bog down when dragging - or scrolling. So a scheme has to be used to "eat" - much of that pointer input before re-polling the screen - and sending out framebuffer updates. The mode number - "n" can be 0 to 4 and selects one of the schemes - desribed below. + rapid changes on the screen: consider the rapid + changes when you drag a large window around opaquely. + Neither x11vnc's screen polling and vnc compression + routines nor the bandwidth to the vncviewers can keep + up these rapid screen changes: everything will bog down + when dragging or scrolling. So a scheme has to be used + to "eat" much of that pointer input before re-polling + the screen and sending out framebuffer updates. The + mode number "n" can be 0 to 4 and selects one of + the schemes desribed below. + + Note that the -wireframe and -scrollcopyrect modes + complement -pointer_mode by detecting (and improving) + certain periods of "rapid screen change". n=0: does the same as -nodragging. (all screen polling is suspended if a mouse button is pressed.) @@ -5802,22 +5820,23 @@ Options: -speeds rd,bw,lat x11vnc tries to estimate some speed parameters that are used to optimize scheduling (e.g. -pointer_mode - 4) and other things. Use the -speeds option to set - these manually. The triple "rd,bw,lat" corresponds - to video h/w read rate in MB/sec, network bandwidth to - clients in KB/sec, and network latency to clients in - milliseconds, respectively. If a value is left blank, - e.g. "-speeds ,100,15", then the internal scheme is - used to estimate the empty value(s). + 4, -wireframe, -scrollcopyrect) and other things. + Use the -speeds option to set these manually. + The triple "rd,bw,lat" corresponds to video h/w + read rate in MB/sec, network bandwidth to clients in + KB/sec, and network latency to clients in milliseconds, + respectively. If a value is left blank, e.g. "-speeds + ,100,15", then the internal scheme is used to estimate + the empty value(s). Typical PC video cards have read rates of 5-10 MB/sec. If the framebuffer is in main memory instead of video - h/w (e.g. SunRay, shadowfb, Xvfb), the read rate may - be much faster. "x11perf -getimage500" can be used - to get a lower bound (remember to factor in the bytes - per pixel). It is up to you to estimate the network - bandwith and latency to clients. For the latency the - ping(1) command can be used. + h/w (e.g. SunRay, shadowfb, dummy driver, Xvfb), the + read rate may be much faster. "x11perf -getimage500" + can be used to get a lower bound (remember to factor + in the bytes per pixel). It is up to you to estimate + the network bandwith and latency to clients. For the + latency the ping(1) command can be used. For convenience there are some aliases provided, e.g. "-speeds modem". The aliases are: "modem" for @@ -5852,7 +5871,7 @@ Options: text output. By default x11vnc will try to detect this (3 screen polls in a row each longer than 0.25 sec with no user input), and sleep up to 1.5 secs to let things - "catch up". Use this option to disable the detection. + "catch up". Use this option to disable that detection. -readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On slow links that take a long time to paint the first screen libvncserver may hit the timeout and drop the @@ -5899,7 +5918,8 @@ Options: "ignore" or "exit". For "ignore" libvncserver will handle the abrupt loss of a client and continue, for "exit" x11vnc will cleanup and exit at the 1st - broken connection. Default: "ignore". + broken connection. Default: "ignore". This option + is obsolete. -threads Whether or not to use the threaded libvncserver -nothreads algorithm [rfbRunEventLoop] if libpthread is available Default: -nothreads @@ -5919,7 +5939,7 @@ Options: memory and examine that copy for changes. Under some circumstances this will improve interactive response, or at least make things look smoother, but in others - (many) it will make the response worse. If the video + (most!) it will make the response worse. If the video h/w fb is such that reading small tiles is very slow this mode could help. To keep the "framerate" up the screen size x bpp cannot be too large. Note that @@ -5957,17 +5977,18 @@ Options: (see ipcs(1) and fbset(1) for the first two examples) - All user input is discarded. Most of the X11 (screen, - keyboard, mouse) options do not make sense and many - will cause this mode to crash, so please think twice - before setting/changing them. + All user input is discarded by default (but see the + -pipeinput option). Most of the X11 (screen, keyboard, + mouse) options do not make sense and many will cause + this mode to crash, so please think twice before + setting/changing them. If you don't want x11vnc to close the X DISPLAY in rawfb mode, then capitalize the prefix, SHM:, MAP:, FILE: Keeping the display open enables the default remote-control channel, which could be useful. Also, if you also specify -noviewonly, then the mouse and - keyboard input are still sent to the X display, this + keyboard input are STILL sent to the X display, this usage should be very rare, i.e. doing something strange with /dev/fb0. @@ -5991,9 +6012,10 @@ Options: -gui [gui-opts] Start up a simple tcl/tk gui based on the the remote control options -remote/-query described below. Requires the "wish" program to be installed on the - machine. "gui-opts" is not required: the default is - to start up both the gui and x11vnc with the gui showing - up on the X display in the environment variable DISPLAY. + machine. "gui-opts" is not required: the default + is to start up both the full gui and x11vnc with the + gui showing up on the X display in the environment + variable DISPLAY. "gui-opts" can be a comma separated list of items. Currently there are these types of items: 1) a gui @@ -6026,15 +6048,16 @@ Options: If you do not specify a gui X display in "gui-opts" then the DISPLAY environment variable and -display option are tried (in that order). Regarding the x11vnc - X display the gui will try to connect to, it first - tries -display and then DISPLAY. For example, "x11vnc - -display :0 -gui otherhost:0", will remote control an - x11vnc polling :0 and display the gui on otherhost:0 - The "tray" mode below reverses this preference. + X display the gui will try to communication with, it + first tries -display and then DISPLAY. For example, + "x11vnc -display :0 -gui otherhost:0", will remote + control an x11vnc polling :0 and display the gui on + otherhost:0 The "tray/icon" mode below reverses this + preference, preferring to display on the x11vnc display. 4) When "tray" or "icon" is specified, the gui presents itself as a small icon with behavior typical - of a "system tray" or "dock" applet. The color + of a "system tray" or "dock applet". The color of the icon indicates status (connected clients) and there is also a balloon status. Clicking on the icon gives a menu from which properties, etc, can be set and @@ -6044,7 +6067,8 @@ Options: For "icon" the gui just a small standalone window. For "tray" it will attempt to embed itself in the - "system tray". If "=setpass" is appended then + "system tray" if possible. If "=setpass" is appended the +n at startup the X11 user will be prompted to set the VNC session password. If =<hexnumber> is appended that icon will attempt to embed itself in the window @@ -6070,6 +6094,7 @@ Options: General examples of the -gui option: "x11vnc -gui", "x11vnc -gui ez" "x11vnc -gui localhost:10", "x11vnc -gui conn,host:0", "x11vnc -gui tray,ez" + "x11vnc -gui tray=setpass" If you do not intend to start x11vnc from the gui (i.e. just remote control an existing one), then the @@ -6100,10 +6125,6 @@ Options: 'x11vnc -R shared' will enable shared connections, and 'x11vnc -R scale:3/4' will rescale the desktop. - Note: the more drastic the change induced by the -remote - command, the bigger the chance for bugs or crashes. - Please report reproducible bugs. - The following -remote/-R commands are supported: stop terminate the server, same as "quit" @@ -6194,7 +6215,7 @@ Options: rectangle use "-WxH+X+Y" to delete one xinerama enable -xinerama mode. (if applicable) noxinerama disable -xinerama mode. - xtrap enable -xtrap input mode. + xtrap enable -xtrap input mode(if applicable) noxtrap disable -xtrap input mode. xrandr enable -xrandr mode. (if applicable) noxrandr disable -xrandr mode. @@ -6277,7 +6298,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.). + 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. @@ -6370,16 +6391,24 @@ 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 truecolor notruecolor overlay nooverlay overlay_cursor overlay_yescursor nooverlay_nocursor nooverlay_cursor nooverlay_yescursor overlay_nocursor visual scale - scale_cursor viewonly noviewonly shared noshared forever - noforever once timeout deny lock nodeny unlock connect - allowonce allow localhost nolocalhost listen lookup - nolookup accept popup gone shm noshm flipbyteorder + scale_cursor viewonly noviewonly shared noshared + forever noforever once timeout deny lock nodeny unlock + connect allowonce allow localhost nolocalhost listen + lookup nolookup accept gone shm noshm flipbyteorder noflipbyteorder onetile noonetile solid_color solid nosolid blackout xinerama noxinerama xtrap noxtrap xrandr noxrandr xrandr_mode padgeom quiet q noquiet @@ -6413,9 +6442,9 @@ Options: debug_tiles dbt nodebug_tiles nodbt debug_tiles debug_grabs nodebug_grabs dbg nodbg noremote - aro= display vncdisplay desktopname guess_desktop - http_url auth users rootshift clipshift scale_str - scaled_x scaled_y scale_numer scale_denom + aro= noop display vncdisplay desktopname guess_desktop + http_url auth xauth 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 @@ -6425,7 +6454,11 @@ Options: 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 + cdpy_x cdpy_y coff_x coff_y rfbauth passwd viewpasswd + +-QD variable Just like -query variable, but returns the default + value for that parameter (no running x11vnc server + is consulted) -sync By default -remote commands are run asynchronously, that is, the request is posted and the program immediately @@ -6433,7 +6466,7 @@ Options: acknowledgement from the x11vnc server that command was processed (somehow). On the other hand -query requests are always processed synchronously because they have - to wait for the result. + to wait for the answer. Also note that if both -remote and -query requests are supplied on the command line, the -remote is processed @@ -6474,7 +6507,7 @@ Options: running external programs. If you specify -unsafe, then these remote-control commands are allowed. Note that you can still specify these parameters on the command - line, they just cannot be changed via remote-control. + line, they just cannot be invoked via remote-control. -safer Equivalent to: -novncconnect -noremote and prohibiting -gui and the -connect file. Shuts off communcation channels. diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc index f758cfe..c056f88 100755 --- a/x11vnc/tkx11vnc +++ b/x11vnc/tkx11vnc @@ -64,12 +64,17 @@ Row: Displays Screen Tuning Debugging Misc Actions =SA start =RA stop - =DGA attach + -- + =DSA attach =DRA detach -- =RA ping =RA update-all - =GA clear-all + -- + =GA save-settings + =SFA load-settings: + =SA defaults-all + =0SA clear-all -- D =DRA stop+quit =DGA Quit @@ -314,6 +319,23 @@ proc set_internal_help {} { Launch x11vnc with the settings you have prescribed in the gui. The x11vnc process is started in an xterm window so you can see the output, kill it, etc. + +By viewing this help item, the command built so far will be displayed +in the gui text area. Have a look. If you Press start it will be shown +as well and you will be asked to confirm running it. + +If you want to use a saved profile \"rc file\" you can do \"Misc -> rc\" and +select the file and simply start x11vnc using the rc file. Alternatively, +you could first use the \"Actions -> load-settings\" action to load in +an \"rc file\" and then press \"Actions -> start\" to start up x11vnc +based on those values. +" + set helptext(stop) " +The \"Actions -> stop\" action sends a signal to the running x11vnc +server indicating it should shutdown all connections and exit. + +The GUI stays running in case you want to start a new x11vnc or attach +to another one. Use \"Actions -> Quit\" if you want to have the gui exit. " set helptext(show-start-cmd) " @@ -322,6 +344,9 @@ run by \"Actions -> start\") looks like for the current values of the settings. This can be done even in the attached state. Intended for debugging the gui. The help item for \"Actions -> start\" gives the same info. + +If you want to load in a saved profile \"rc file\" use Misc -> rc +and select the file. " set helptext(debug_gui) " @@ -329,13 +354,22 @@ Set debug_gui to get more output printed in the text area. " set helptext(detach) " -No longer be associated with the x11vnc server. Switch to non-connected -state. +No longer be associated with the x11vnc server. Switch to the +non-connected state. The x11vnc server keeps running: it does not exit. + +You can either later reattach to it \"Actions -> attach\", or start +up a new x11vnc \"Actions -> start\", or exit \"Actions -> Quit\". " set helptext(attach) " -Attach to the x11vnc server, if possible. Switches to connected state -if successful. To change or set the X display use \"Displays -> display\" +Attach to a running x11vnc server, if possible. Switches to connected +state if successful. Usually the channel used to attach is via the X +display (VNC_CONNECT rootwin property) being polled by the x11vnc server. +To change or set the X display to use do \"Displays -> display\". + +Sometimes the \"-connect /path/to/filename\" is used as the communcation +channel. The running x11vnc has to know that \"/path/to/filename\" +is the communication channel (i.e. it is using the same -connect option). " set helptext(ping) " @@ -346,16 +380,60 @@ Check if x11vnc still responds to \"ping\" remote command. Query the x11vnc server for the current values of all variables. Populate the values into the gui's database. -Normally the gui will refresh this info every time it interacts -with the x11vnc server, so one doesn't need to use this action -very often (unless something else is changing the state of the -x11vnc server, or new clients have connected, etc). +Normally the gui will refresh this info every time it interacts with +the x11vnc server (including after a few minutes of inactivity), so one +doesn't need to use this action very often (unless something else is +changing the state of the x11vnc server, or new clients have connected, +etc). " set helptext(clear-all) " -Forget any variable settings either entered in by you or retrieved -from a running x11vnc server. Basically sets everything to 0 or -the string (unset). +Forget any variable settings either entered in by you or set at the +default. Basically sets everything to 0 or the string (unset). + +This action is only available in \"startup\" mode, not when connected +to a running x11vnc server (in that case the variable settings reflect +the state of the running x11vnc). +" + + set helptext(defaults-all) " +Reset all variable settings to the default values. Basically sets +everything to the default queries \"x11vnc -QD var\" retrieved at startup. + +This action is only available in \"startup\" mode, not when connected +to a running x11vnc server (in that case the variable settings reflect +the state of the running x11vnc). +" + + set helptext(load-settings) " +Read in the \"rc file\" you prescribe in the dialog and then set the +variables to those in the rc-file. Any variables not mentioned in the +rc-file are set to their default value. + +You could then do \"Actions -> start\" to start x11vnc with these +parameters. Or you could make some further changes to variables +using the gui before starting x11vnc. + +This action is only available in \"startup\" mode, not when connected +to a running x11vnc server (in that case the variable settings reflect +the state of the running x11vnc). +" + + set helptext(save-settings) " +Construct a ~/.x11vncrc file based on the current settings and +offer to save it in a file (default ~/.x11vncrc). If saved in a +file other than the default, you can access the profile by using +the \"-rc <filename>\" option when starting x11vnc. + +If an rc file entry begins with \"#d\" that means the current +setting is at the Default value and so you probably want to leave +it commented out with the \"#\" character. + +If an rc file entry begins with \"#?\" that means we think +you probably do not really want to force the value to this setting. + +In either case, feel free to uncomment the line and/or change any +of the parameter values in the file. " set helptext(all-settings) " @@ -383,10 +461,11 @@ by the gui process). set helptext(tail-logfile) " Run the tail(1) command with -f option on the logfile in an xterm. +(if it exists and is accessible by the gui process). " set helptext(Quit) " -Terminate the tkx11vnc gui. Any x11vnc servers will be left running. +Terminate the tkx11vnc gui. Any x11vnc server will be left running. " set helptext(current) " @@ -539,7 +618,7 @@ the ViewOnly log in aspect: \"Password\" is still required to log in. set helptext(all) $helpall set helptext(Misc-Tuning:) " -x11vnc has what seems like hundreds of tuning parameters. In this +x11vnc has what seems like hundreds of tuning parameters! In this sub-menu we place some lesser used ones. Most likely you'll want to leave them at their default values, but you can try them out quickly with the gui to see if they improve things. @@ -752,8 +831,8 @@ The items in the sub-menu allow tweaking x11vnc's DAMAGE algorithm. This sub-menu provides some options regarding SYSV shared memory usage (shm) by x11vnc. Usually you want shm turned on because the x11vnc process is nearly always running on the same machine the X server process -is running on. SharedMemory gives a performance speedup. However, -if you need to modify this scenario these options allow you to. +is running on. SharedMemory gives a performance speedup. However, if you +need to modify this scenario for special usage these options allow you to. " set helptext(Misc-Debug:) " @@ -767,6 +846,7 @@ etc. about your local display and environment. This sub-menu contains some options centering around the Selection (also referred to as the Clipboard, Cutbuffers, etc). x11vnc will try to exchange the selections between the VNC viewers and the X server. +You can adjust that behavior with these options. " set helptext(WindowView) " @@ -792,7 +872,7 @@ or \"tray\" mode if you bring up the full gui window via \"Properties -> Advanced\" and then delete it the gui does NOT terminate. Also note that by default in \"icon\" mode if you delete the icon -window both the gui and the x11vnc server terminate. +window both the gui *and* the x11vnc server terminate. " set helptext(gui) " @@ -926,34 +1006,35 @@ GUI components: --- ---------- 1) At the top of the gui is a info text label where information will -be posted, e.g. when traversing menu items text indicating how to get -help on the item and its current value will be displayed. + be posted, e.g. when traversing menu items text indicating how to get + help on the item and its current value will be displayed. -2) Below the info label is the area where the menu buttons, Actions, -Clients, etc., are presented. If a menu item has a checkbox, -it corresponds to a boolean on/off variable. Otherwise it is -either a string variable, or an action not associated with a -variable (for the most part). +2) Below the info label is the area where the menu buttons, \"Actions\", + \"Clients\", etc., are presented. If a menu item has a checkbox, + it corresponds to a boolean on/off variable. Otherwise it is + either a string variable, or an action not associated with a + variable (for the most part). -3) Below the menu button area is a text label indicating the current x11vnc -X display being polled and the corresponding VNC display name. Both -will be \"(*none*)\" when there is no connection established. +3) Below the menu button area is a label indicating the current x11vnc + X display being polled and the corresponding VNC display name. Both + will be \"(*none*)\" when there is no connection established. -4) Below the x11 and vnc displays text label is a text area there scrolling -information about actions being taken and commands being run is displayed. -To scroll click in the area and use PageUp/PageDown or the arrow keys. +4) Below the x11 and vnc displays label is a text area there scrolling + information about actions being taken and commands being run is displayed. + To scroll click in the area and use PageUp/PageDown or the arrow keys. 5) At the bottom is an entry area. When one selects a menu item that -requires supplying a string value, the label will be set to the -parameter name and one types in the new value. Then one presses the -\"OK\" button or presses \"Enter\" to set the value. Or you can press -\"Cancel\" or \"Escape\" to avoid changing the variable. Some variables -are boolean toggles (for example, \"Permissions -> viewonly\") or Radio -button selections. Selecting these menu items will not activate the -entry area but rather toggle the variable directly. + requires supplying a string value, the label will be set to the + parameter name and one types in the new value. Then one presses the + \"OK\" button or presses \"Enter\" to set the value. Or you can press + \"Cancel\" or \"Escape\" to avoid changing the variable. + Many variables are boolean toggles (for example, \"Permissions -> + viewonly\") or Radio button selections. Selecting these menu items + will NOT activate the entry area but rather toggle the variable + immediately. -Cascades Bug: There is a bug not yet worked around for the cascade menus +CASCADES BUG: There is a bug not yet worked around for the cascade menus where the (?) help button gets in the way. To get the mouse over to the cascade menu click and release mouse to activate the cascade, then you can click on its items. Dragging with a mouse button held down will @@ -1026,7 +1107,7 @@ proc make_toplevel {w {title ""}} { } } -proc textwin {name title text} { +proc textwin {name title text {entry ""}} { global max_text_height max_text_width global bfont ffont @@ -1056,13 +1137,40 @@ proc textwin {name title text} { bind $w <Enter> "focus $w.f.t" + if {$entry != ""} { + # varname+Label Name + set list [split $entry "+"] + set varname [lindex $list 0] + set labname [lindex $list 1] + frame $w.f.ef -bd 1 -relief groove + label $w.f.ef.l -text "$labname" -anchor w -font $bfont + entry $w.f.ef.e -relief sunken -font $ffont \ + -textvariable $varname + button $w.f.ef.b -text "OK" -font $bfont \ + -command "set ${varname}_ok 1; destroy $w" + bind $w.f.ef.e <KeyPress-Return> "set ${varname}_ok 1; destroy $w" + + pack $w.f.ef.l -side left + pack $w.f.ef.e -side left -fill x -expand 1 + pack $w.f.ef.b -side right + } + wm withdraw $w pack $w.f.b -side bottom -fill x + if {$entry != ""} { + pack $w.f.ef -side bottom -fill x + bind $w <Enter> "focus $w.f.ef.e" + $w.f.ef.e icursor end + } else { + bind $w <Enter> "focus $w.f.t" + } pack $w.f.y -side right -fill y; pack $w.f.t -side top -fill both -expand 1; update center_win $w + + return $w } proc active_when_connected {item} { @@ -1107,6 +1215,9 @@ proc active_when_starting {item} { if {$item == "display"} { return 1 } + if {$item == "attach"} { + return 1 + } if {$item == "debug_gui"} { return 1 } @@ -1205,11 +1316,10 @@ proc help_win {item} { if {$item == "start"} { set str [get_start_x11vnc_txt] - append text $str append_text "$str\n" - append text "\nPossible \$HOME/.x11vncrc settings for this command:\n\n" - set rctxt [get_start_x11vnc_cmd 1] - append text "$rctxt\n" +# append text "\nPossible \$HOME/.x11vncrc settings for this command:\n\n" +# set rctxt [get_start_x11vnc_cmd 1] +# append text "$rctxt\n" } regsub -all { } $item " " name @@ -2023,6 +2133,75 @@ proc see_if_ok {query item expected} { } } +proc get_default_vars {} { + global default_var + + set qry [all_query_vars] + + append qry ",vncconnect" + + set qargs [list "-QD" $qry] + set all [run_remote_cmd $qargs] + + if {[regexp {ans=} $all]} { + #append_text "Retrieved all default settings.\n" + } else { + #append_text "Failed to retrieve default settings.\n" + } + + set query_result_list [split_query $all] + + set default_var(gui) "" + + foreach piece $query_result_list { + if {[regexp {^([^:][^:]*):(.*)$} $piece m0 item val]} { + if {$val == "N/A"} { + if {$item == "vncconnect"} { + set val 1 + } else { + set val "" + } + } + if {$item == "display"} { + set val "" + } elseif {$item == "desktop"} { + set val "" + } elseif {$item == "auth"} { + set val "" + } + # some hacks we do here for now.. + if {$item == "cursor" && $val == ""} { + set val "most" + } elseif {$item == "scrollcopyrect" && $val == ""} { + set val "always" + } elseif {$item == "wirecopyrect" && $val == ""} { + set val "always" + } elseif {$item == "overlay_nocursor" && $val == 0} { + set val 1 + } + + set default_var($item) $val +#puts "default: $item -> $val" + } + } +} + +proc copy_default_vars {} { + global menu_var default_var + foreach item [array names default_var] { + if {[info exists menu_var($item)]} { + if {[info exists default_var($item)]} { + set menu_var($item) $default_var($item) + } + } + } + foreach item [array names menu_var] { + if {[info exists default_var($item)]} { + set menu_var($item) $default_var($item) + } + } +} + proc update_menu_vars {{query ""}} { global all_settings menu_var query_result_list @@ -2060,6 +2239,163 @@ proc update_menu_vars {{query ""}} { } } +proc load_settings {} { + global menu_var default_var + + if {![info exists menu_var(load-settings)]} { + return + } + set file $menu_var(load-settings) + if {$file == ""} { + return + } + + set fh "" + catch {set fh [open $file "r"]} + + if {$fh == ""} { + append_text "load_settings: *** failed to open $file ***\n" + return + } + copy_default_vars + + set str "" + while {[gets $fh line] > -1} { + regsub -all {\\#} $line {__QUOTED_HASH__} line + if {[regexp {^[ \t]*#} $line]} { + continue + } + for {set i 0} {$i < 5} {incr i} { + regsub {#.*$} $line "" line + } + if {[regexp {^[ \t]*$} $line]} { + continue + } + regsub -all {__QUOTED_HASH__} $line {#} line + if {[regexp {\\$} $line]} { + regsub {\\$} $line " " line + append str "$line" + } else { + append str "$line\n" + } + } + close $fh + + foreach line [split $str "\n"] { + set line [string trim $line] + regsub {^--*} $line "" line + regsub -all {[ \t][ \t]*} $line " " line + set list [split $line] + set item [lindex $list 0] + set value [lindex $list 1] + if {[regexp {^[ \t]*$} $item]} { + continue + } + if {[info exists menu_var($item)]} { + if {[value_is_bool $item]} { + set menu_var($item) 1 + } elseif {[value_is_string $item]} { + if {$value != ""} { + set menu_var($item) $value + } + } + } + } +} + +proc save_settings {} { + set rc_text [get_settings_rcfile] + + set top "# +# This file is based on the current x11vnc settings and can be used as +# as a ~/.x11vncrc defaults file. If saved to another filename, these +# settings can be passed to x11vnc at startup via \"-rc <filename>\". +# +# The rc file comment character is \"#\". Use \"\\#\" for the literal char. +# You can continue lines using \"\\\" as the last character of a line. +# +# Lines beginning with \"#d\" indicate the parameter value is at its default +# setting and you probably want to leave it commented out. +# +# Lines beginning with \"#?\" indicate parameters you probably do not +# want to hardwire to the current setting (uncomment if you want that). +# +# Some parameters are boolean, e.g. -forever, and take no value; while +# the others, e.g. -wait 50, take a string or numerical value. +# +# For booleans, the line will end with comment \"default: on\" or +# \"default: off\" indicating the default setting. (Note: often +# \"-nofoobar\" corresponds to option \"-foobar\" and the former is +# \"the default\", e.g. -norepeat). +# +# For string or numerical options, the value \"\" in a line below +# means the default is unset and you will need to supply some non-empty +# value to use the parameter. For reference, if the default differs +# from your value it placed at the end of the line as a comment. +# +# Feel free to uncomment or comment any of the lines or to change any +# of the values of the parameters. Don't be surprised that most if not +# all of the lines below are commented out (x11vnc has so many parameters, +# most of them will be at their default values). +#------------------------------------------------------------------------- + +" + + set rc_text "$top$rc_text" + + global env save_settings_var save_settings_var_ok + if {[info exists env(HOME)]} { + set save_settings_var "$env(HOME)/.x11vncrc" + } else { + set save_settings_var ".x11vncrc" + } + set save_settings_var_ok 0 + + set w [textwin "save_settings" "Save Settings..." $rc_text \ + "save_settings_var+Save as:"] + + tkwait window $w + + if {$save_settings_var_ok == 1} { + set file $save_settings_var + if {$file == ""} { + return + } + append_text "\nSaving current settings to $file ...\n" + if {[file exists $file]} { + set backup "${file}~" + append_text "Backing up $file -> $backup ...\n" + catch {file delete -force $backup} + set emsg "*** Backup to $backup failed. ***\n" + if {![file exists $backup]} { + catch {file copy -force $file $backup} + if {![file exists $backup]} { + append_text $emsg + bell + } + } else { + append_text $emsg + bell + } + } + set fh "" + catch {set fh [open $file "w"]} + if {$fh != ""} { + puts $fh $rc_text + close $fh + if {![file exists $file]} { + append_text "*** Saving to $file failed. ***\n" + bell + } else { + append_text "Done.\n" + } + } else { + append_text "*** Open of $file failed. ***\n" + bell + } + } +} + proc clear_all {} { global menu_var unset_str @@ -2082,6 +2418,11 @@ proc clear_all {} { append_text "Cleared all settings.\n" } +proc defaults_all {} { + copy_default_vars + append_text "Reset all variables to default values.\n" +} + proc all_query_vars {} { global query_ans_list query_aro_list all_settings global cache_all_query_vars @@ -2121,13 +2462,13 @@ proc query_all {{quiet 0}} { if {[regexp {ans=} $all]} { if {! $quiet} { - append_text "Retrieved all settings.\n" + append_text "Retrieved all current settings.\n" } set all_settings $all update_menu_vars $all } else { if {! $quiet} { - append_text "Failed to retrieve settings.\n" + append_text "Failed to retrieve current settings.\n" } } set last_query_all_time [clock seconds] @@ -2187,7 +2528,7 @@ proc show_logfile {} { set logfile $menu_var(logfile) if {$logfile == "" || $logfile == $unset_str} { - set txt "\nNo logfile has been specified.\n\n" + set txt "\nNo logfile was specified at x11vnc startup.\n\n" } elseif {![file exists $logfile]} { set txt "\nLogfile \"$logfile\" does not exist.\n\n" } else { @@ -2213,7 +2554,7 @@ proc tail_logfile {} { set txt "" if {$logfile == "" || $logfile == $unset_str} { - set txt "\nNo logfile has been specified.\n\n" + set txt "\nNo logfile was specified at x11vnc startup.\n\n" } elseif {![file exists $logfile]} { set txt "\nLogfile \"$logfile\" does not exist.\n\n" } else { @@ -2300,6 +2641,12 @@ proc do_action {item} { } elseif {$item == "clear-all"} { clear_all return + } elseif {$item == "defaults-all"} { + defaults_all + return + } elseif {$item == "save-settings"} { + save_settings + return } elseif {$item == "show-start-cmd"} { show_start_cmd return @@ -2333,6 +2680,11 @@ proc do_action {item} { set name $item } + if {$item == "load-settings"} { + load_settings + return + } + if {! $connected_to_x11vnc} { ; } elseif {[regexp {^(stop|quit|exit|shutdown)$} $item]} { @@ -2359,6 +2711,7 @@ proc do_var {item} { set debug [in_debug_mode] + set string 0 if {[is_action $item] || $item == "WindowView"} { # Menu item is action: @@ -2370,7 +2723,6 @@ proc do_var {item} { return } - if {[value_is_string $item]} { # Menu item is a string: if {$item_cascade($item) != ""} { @@ -2442,6 +2794,9 @@ proc is_browse {item} { proc value_is_string {item} { global item_bool + if {![info exists item_bool($item)]} { + return 0 + } if {! $item_bool($item)} { return 1 } else { @@ -2451,6 +2806,9 @@ proc value_is_string {item} { proc value_is_bool {item} { global item_bool + if {![info exists item_bool($item)]} { + return 0 + } if {$item_bool($item)} { return 1 } else { @@ -2825,9 +3183,6 @@ proc toggle_simple_gui {} { make_menu_items set_widgets set_internal_help -# if {$connected_to_x11vnc} { -# query_all -# } append_text "\n" } @@ -3114,7 +3469,7 @@ proc menu_posted {} { # puts "menu_posted $refresh" if {$now > $refresh} { - append_text "Refreshing settings... " + append_text "Refreshing current settings... " query_all $quiet if {$quiet} { append_text "done\n" @@ -3195,20 +3550,79 @@ proc props_apply {} { after 500 } + set fpw 0 if {$props_passwd != $prop0_passwd} { - push_new_value "passwd" "passwd" "$props_passwd" 0 - set prop0_passwd $props_passwd + set fpw 1 + } + set vpw 0 + if {$props_viewpasswd != $prop0_viewpasswd} { + set vpw 1 + } + + set pw_ord [list] + if {!$fpw && !$vpw } { + # neither change + ; + } elseif {$fpw && !$vpw} { + # full password change if {$props_passwd == ""} { - set props_viewpasswd "" + if {$prop0_viewpasswd != ""} { + # set view to "" as well and first + set props_viewpasswd "" + set pw_ord [list vpw fpw] + } else { + set pw_ord [list fpw] + } + } else { + # assume view state OK + set pw_ord [list fpw] + } + + } elseif {!$fpw && $vpw} { + # view password change + if {$props_viewpasswd == ""} { + # assume full state OK + set pw_ord [list vpw] + } else { + if {$prop0_passwd == ""} { + # could be trouble, x11vnc makes random + # full passwd... + set pw_ord [list vpw] + } else { + # OK, full non-null. + set pw_ord [list vpw] + } + } + } elseif {$fpw && $vpw} { + # both full and view password change + if {$props_passwd == "" && $props_viewpasswd == ""} { + # OK, do view first + set pw_ord [list vpw fpw] + } elseif {$props_passwd == "" && $props_viewpasswd != ""} { + # Not good, do view first anyway x11vnc will fix. + set pw_ord [list vpw fpw] + } elseif {$props_passwd != "" && $props_viewpasswd == ""} { + # OK, view first + set pw_ord [list vpw fpw] + } elseif {$props_passwd != "" && $props_viewpasswd != ""} { + # OK, full first + set pw_ord [list fpw vpw] + } + } + + foreach case $pw_ord { + if {$case == "fpw"} { + push_new_value "passwd" "passwd" "$props_passwd" 1 + set prop0_passwd $props_passwd + after 500 + } + if {$case == "vpw"} { + push_new_value "viewpasswd" "viewpasswd" "$props_viewpasswd" 1 + set prop0_viewpasswd $props_viewpasswd + after 500 } - after 500 } - if {$props_viewpasswd != $prop0_viewpasswd} { - push_new_value "viewpasswd" "viewpasswd" "$props_viewpasswd" 0 - set prop0_viewpasswd $props_viewpasswd - after 500 - } props_widgets normal } @@ -3533,7 +3947,7 @@ proc read_client_info {} { proc show_client_balloon {} { global icon_mode icon_win props_win full_win - global client_balloon ffont + global client_balloon ffont connected_to_x11vnc set noinfo "tkx11vnc: no client information" set noinfo "$noinfo\navailable from x11vnc ..." @@ -3547,11 +3961,16 @@ proc show_client_balloon {} { set x [expr [winfo rootx $icon_win] + ([winfo width $icon_win]/2)] set y [expr [winfo rooty $icon_win] + [winfo height $icon_win] + 4] + set infotext $client_balloon + if {!$connected_to_x11vnc} { + set infotext "Not currently attached to x11vnc\nLast available info:\n$infotext" + } + set w .client_balloon catch {destroy $w} toplevel $w -bg black -screen [winfo screen $icon_win] wm overrideredirect $w 1 - label $w.l -text "$client_balloon" -relief flat -bg "#ffffaa" -fg black \ + label $w.l -text "$infotext" -relief flat -bg "#ffffaa" -fg black \ -padx 2 -pady 0 -anchor w -justify left -font $ffont pack $w.l -side left -padx 1 -pady 1 @@ -3975,6 +4394,7 @@ proc make_gui {mode} { } if {$make_gui_count == 1} { + copy_default_vars if {$x11vnc_connect} { try_connect_and_query_all } @@ -4293,6 +4713,139 @@ proc double_check_noremote {} { return [warning_dialog $msg "noremote"] } +proc get_settings_rcfile {} { + global menu_var default_var unset_str + global x11vnc_gui_params + + set rc_txt "" + + set menu_var(gui) $x11vnc_gui_params + + foreach item [lsort [array names menu_var]] { + if {$item == "gui"} { + ; + } elseif {![active_when_starting $item]} { + continue + } elseif {[is_action $item]} { + continue + } + if {$item == "debug_gui"} { + continue + } + if {$item == "WindowView"} { + continue + } + if {$item == "rc" || $item == "norc"} { + continue + } + set def "" + if {[info exists default_var($item)]} { + set def $default_var($item) + } + + set qst "" + set hmm "#? " + if {$item == "display"} { + set qst $hmm + } elseif {$item == "desktop"} { + set qst $hmm + } elseif {$item == "dontdisconnect"} { + set qst $hmm + } elseif {$item == "alwaysshared"} { + set qst $hmm + } elseif {$item == "nevershared"} { + set qst $hmm + } + + if {![info exists menu_var($item)]} { + set mv $def + } else { + set mv $menu_var($item) + } + if {$mv == $unset_str} { + set mv "" + } + set ntab 3 + + if {$item == "gui" || [value_is_string $item]} { + set nitem $item + if {$nitem == "screen_blank"} { + set nitem "sb" + } elseif {$nitem == "xrandr_mode"} { + set nitem "xrandr" + } elseif {$nitem == "wireframe_mode"} { + set nitem "wireframe" + } elseif {$nitem == "solid_color"} { + set nitem "solid" + } + + if {$mv == "" && $def != ""} { + set qst $hmm + } + set n 0 + if {$qst != ""} { + append rc_txt $qst + incr n [string length $qst] + } elseif {$mv == $def} { + append rc_txt "#d " + incr n [string length "#d "] + } + set mt $mv + regsub -all {#} $mt {\#} mt + if {$mt == ""} { + set mt {""} + } + append rc_txt "-$nitem $mt" + + if {$mv != $def} { + set m [string length "-$nitem $mt"] + incr n $m + set n [expr $n / 8] + set c 0 + for {set i $n} {$i <= $ntab} {incr i} { + append rc_txt "\t" + incr c + } + if {$c == 0} { + append rc_txt "\t" + } + regsub -all {#} $def {\#} def + if {$def == ""} { + set def {""} + } + append rc_txt "# default: $def" + } + append rc_txt "\n" + + } elseif {[value_is_bool $item]} { + set n 0 + if {$qst != ""} { + append rc_txt $qst + incr n [string length $qst] + } elseif {$mv == $def} { + append rc_txt "#d " + incr n [string length "#d "] + } + if {$def == 1} { + set dv "on" + } else { + set dv "off" + } + append rc_txt "-$item" + set m [string length "-$item"] + incr n $m + set n [expr $n / 8] + for {set i $n} {$i <= $ntab} {incr i} { + append rc_txt "\t" + } + append rc_txt "# default: $dv" + append rc_txt "\n" + + } + } + return $rc_txt +} + proc double_check_start_x11vnc {} { global hostname set msg [get_start_x11vnc_txt] @@ -4319,7 +4872,7 @@ proc show_start_cmd {} { } proc get_start_x11vnc_cmd {{show_rc 0}} { - global menu_var unset_str x11vnc_prog + global menu_var default_var unset_str x11vnc_prog set xterm_cmd "xterm -iconic -geometry 80x35 -title x11vnc-console -e" @@ -4332,15 +4885,19 @@ proc get_start_x11vnc_cmd {{show_rc 0}} { set saw_id 0 foreach item [lsort [array names menu_var]] { - if {![active_when_starting $item]} { + if {$item == "gui"} { + ; + } elseif {![active_when_starting $item]} { continue - } - if {[is_action $item]} { + } elseif {[is_action $item]} { continue } if {$item == "debug_gui"} { continue } + if {$item == "WindowView"} { + continue + } if {$item == "id" || $item == "sid"} { set val $menu_var($item); if {$val == "0x0" || $val == "root"} { @@ -4368,7 +4925,15 @@ proc get_start_x11vnc_cmd {{show_rc 0}} { if {[value_is_bool $item]} { if {[info exists menu_var($item)]} { - if {$menu_var($item)} { + set add 1 + if {[info exists default_var($item)]} { + if {$menu_var($item) == $default_var($item)} { + set add 0; + } + } elseif {! $menu_var($item)} { + set add 0 + } + if {$add} { lappend cmd "-$item" append rc_txt "-$item\n" } @@ -4377,6 +4942,7 @@ proc get_start_x11vnc_cmd {{show_rc 0}} { if {[info exists menu_var($item)]} { if {$menu_var($item) != "" && $menu_var($item) != $unset_str} { + set add 1 set nitem $item if {$nitem == "screen_blank"} { set nitem "sb" @@ -4387,9 +4953,18 @@ proc get_start_x11vnc_cmd {{show_rc 0}} { } elseif {$nitem == "solid_color"} { set nitem "solid" } - lappend cmd "-$nitem" - lappend cmd $menu_var($item) - append rc_txt "-$nitem $menu_var($item)\n" + if {[info exists default_var($item)]} { + if {$menu_var($item) == $default_var($item)} { + set add 0; + } + } + if {$add} { + lappend cmd "-$nitem" + lappend cmd $menu_var($item) + set mt $menu_var($item) + regsub -all {#} $mt {\#} mt + append rc_txt "-$nitem $mt\n" + } } } } @@ -4445,6 +5020,15 @@ proc start_x11vnc {} { catch {[eval exec $cmd]} after 500 try_connect_and_query_all 3 + if {!$connected_to_x11vnc} { + append_text "\nStarting x11vnc seems to have failed.\n" + if {[regexp -- {-o } $str] || [regexp -- {-logfile} $str]} { + append_text "Examine the logfile (Debugging -> show-logfile) for error messages.\n" + } else { + append_text "Rerun with a logfile (if needed) and examine the logfile\n" + append_text "(Debugging -> show-logfile) for error messages.\n" + } + } } proc run_remote_cmd {opts} { @@ -4711,6 +5295,7 @@ proc undo_tray_embed {} { global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect; global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url +global x11vnc_gui_params global x11vnc_auth_file x11vnc_connect_file beginner_mode simple_gui_created global helpall helptext helpremote helplabel hostname osname global all_settings reply_xdisplay always_update @@ -4840,6 +5425,11 @@ if {[info exists env(X11VNC_GUI_GEOM)]} { } else { set x11vnc_gui_geom "" } +if {[info exists env(X11VNC_GUI_PARAMS)]} { + set x11vnc_gui_params $env(X11VNC_GUI_PARAMS); +} else { + set x11vnc_gui_params "" +} if {[info exists env(X11VNC_CONNECT_FILE)]} { set x11vnc_connect_file $env(X11VNC_CONNECT_FILE); @@ -4954,6 +5544,8 @@ set_name "tkx11vnc" key_bindings; +get_default_vars + if {$icon_mode} { if {$tray_embed} { make_gui "tray" diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index 5c84314..721d936 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -70,12 +70,17 @@ "Actions\n" " =SA start\n" " =RA stop\n" -" =DGA attach\n" +" --\n" +" =DSA attach\n" " =DRA detach\n" " --\n" " =RA ping\n" " =RA update-all\n" -" =GA clear-all\n" +" --\n" +" =GA save-settings\n" +" =SFA load-settings:\n" +" =SA defaults-all\n" +" =0SA clear-all\n" " -- D\n" " =DRA stop+quit \n" " =DGA Quit \n" @@ -320,6 +325,23 @@ "Launch x11vnc with the settings you have prescribed in the gui.\n" "The x11vnc process is started in an xterm window so you can see the\n" "output, kill it, etc.\n" +"\n" +"By viewing this help item, the command built so far will be displayed\n" +"in the gui text area. Have a look. If you Press start it will be shown\n" +"as well and you will be asked to confirm running it.\n" +"\n" +"If you want to use a saved profile \\\"rc file\\\" you can do \\\"Misc -> rc\\\" and\n" +"select the file and simply start x11vnc using the rc file. Alternatively,\n" +"you could first use the \\\"Actions -> load-settings\\\" action to load in\n" +"an \\\"rc file\\\" and then press \\\"Actions -> start\\\" to start up x11vnc\n" +"based on those values.\n" +"\"\n" +" set helptext(stop) \"\n" +"The \\\"Actions -> stop\\\" action sends a signal to the running x11vnc\n" +"server indicating it should shutdown all connections and exit.\n" +"\n" +"The GUI stays running in case you want to start a new x11vnc or attach\n" +"to another one. Use \\\"Actions -> Quit\\\" if you want to have the gui exit.\n" "\"\n" "\n" " set helptext(show-start-cmd) \"\n" @@ -328,6 +350,9 @@ "settings. This can be done even in the attached state. Intended for\n" "debugging the gui. The help item for \\\"Actions -> start\\\" gives the\n" "same info.\n" +"\n" +"If you want to load in a saved profile \\\"rc file\\\" use Misc -> rc\n" +"and select the file.\n" "\"\n" "\n" " set helptext(debug_gui) \"\n" @@ -335,13 +360,22 @@ "\"\n" "\n" " set helptext(detach) \"\n" -"No longer be associated with the x11vnc server. Switch to non-connected\n" -"state.\n" +"No longer be associated with the x11vnc server. Switch to the\n" +"non-connected state. The x11vnc server keeps running: it does not exit.\n" +"\n" +"You can either later reattach to it \\\"Actions -> attach\\\", or start\n" +"up a new x11vnc \\\"Actions -> start\\\", or exit \\\"Actions -> Quit\\\".\n" "\"\n" "\n" " set helptext(attach) \"\n" -"Attach to the x11vnc server, if possible. Switches to connected state\n" -"if successful. To change or set the X display use \\\"Displays -> display\\\"\n" +"Attach to a running x11vnc server, if possible. Switches to connected\n" +"state if successful. Usually the channel used to attach is via the X\n" +"display (VNC_CONNECT rootwin property) being polled by the x11vnc server.\n" +"To change or set the X display to use do \\\"Displays -> display\\\".\n" +"\n" +"Sometimes the \\\"-connect /path/to/filename\\\" is used as the communcation\n" +"channel. The running x11vnc has to know that \\\"/path/to/filename\\\"\n" +"is the communication channel (i.e. it is using the same -connect option).\n" "\"\n" "\n" " set helptext(ping) \"\n" @@ -352,16 +386,60 @@ "Query the x11vnc server for the current values of all variables.\n" "Populate the values into the gui's database.\n" "\n" -"Normally the gui will refresh this info every time it interacts\n" -"with the x11vnc server, so one doesn't need to use this action\n" -"very often (unless something else is changing the state of the\n" -"x11vnc server, or new clients have connected, etc).\n" +"Normally the gui will refresh this info every time it interacts with\n" +"the x11vnc server (including after a few minutes of inactivity), so one\n" +"doesn't need to use this action very often (unless something else is\n" +"changing the state of the x11vnc server, or new clients have connected,\n" +"etc).\n" "\"\n" "\n" " set helptext(clear-all) \"\n" -"Forget any variable settings either entered in by you or retrieved\n" -"from a running x11vnc server. Basically sets everything to 0 or\n" -"the string (unset).\n" +"Forget any variable settings either entered in by you or set at the\n" +"default. Basically sets everything to 0 or the string (unset).\n" +"\n" +"This action is only available in \\\"startup\\\" mode, not when connected\n" +"to a running x11vnc server (in that case the variable settings reflect\n" +"the state of the running x11vnc).\n" +"\"\n" +"\n" +" set helptext(defaults-all) \"\n" +"Reset all variable settings to the default values. Basically sets\n" +"everything to the default queries \\\"x11vnc -QD var\\\" retrieved at startup.\n" +"\n" +"This action is only available in \\\"startup\\\" mode, not when connected\n" +"to a running x11vnc server (in that case the variable settings reflect\n" +"the state of the running x11vnc).\n" +"\"\n" +"\n" +" set helptext(load-settings) \"\n" +"Read in the \\\"rc file\\\" you prescribe in the dialog and then set the\n" +"variables to those in the rc-file. Any variables not mentioned in the\n" +"rc-file are set to their default value.\n" +"\n" +"You could then do \\\"Actions -> start\\\" to start x11vnc with these\n" +"parameters. Or you could make some further changes to variables\n" +"using the gui before starting x11vnc.\n" +"\n" +"This action is only available in \\\"startup\\\" mode, not when connected\n" +"to a running x11vnc server (in that case the variable settings reflect\n" +"the state of the running x11vnc).\n" +"\"\n" +"\n" +" set helptext(save-settings) \"\n" +"Construct a ~/.x11vncrc file based on the current settings and\n" +"offer to save it in a file (default ~/.x11vncrc). If saved in a\n" +"file other than the default, you can access the profile by using\n" +"the \\\"-rc <filename>\\\" option when starting x11vnc.\n" +"\n" +"If an rc file entry begins with \\\"#d\\\" that means the current\n" +"setting is at the Default value and so you probably want to leave\n" +"it commented out with the \\\"#\\\" character.\n" +"\n" +"If an rc file entry begins with \\\"#?\\\" that means we think\n" +"you probably do not really want to force the value to this setting.\n" +"\n" +"In either case, feel free to uncomment the line and/or change any\n" +"of the parameter values in the file. \n" "\"\n" "\n" " set helptext(all-settings) \"\n" @@ -389,10 +467,11 @@ "\n" " set helptext(tail-logfile) \"\n" "Run the tail(1) command with -f option on the logfile in an xterm.\n" +"(if it exists and is accessible by the gui process).\n" "\"\n" "\n" " set helptext(Quit) \"\n" -"Terminate the tkx11vnc gui. Any x11vnc servers will be left running.\n" +"Terminate the tkx11vnc gui. Any x11vnc server will be left running.\n" "\"\n" "\n" " set helptext(current) \"\n" @@ -545,7 +624,7 @@ " set helptext(all) $helpall\n" "\n" " set helptext(Misc-Tuning:) \"\n" -"x11vnc has what seems like hundreds of tuning parameters. In this\n" +"x11vnc has what seems like hundreds of tuning parameters! In this\n" "sub-menu we place some lesser used ones. Most likely you'll want to\n" "leave them at their default values, but you can try them out quickly\n" "with the gui to see if they improve things.\n" @@ -758,8 +837,8 @@ "This sub-menu provides some options regarding SYSV shared memory usage\n" "(shm) by x11vnc. Usually you want shm turned on because the x11vnc\n" "process is nearly always running on the same machine the X server process\n" -"is running on. SharedMemory gives a performance speedup. However,\n" -"if you need to modify this scenario these options allow you to.\n" +"is running on. SharedMemory gives a performance speedup. However, if you\n" +"need to modify this scenario for special usage these options allow you to.\n" "\"\n" "\n" " set helptext(Misc-Debug:) \"\n" @@ -773,6 +852,7 @@ "This sub-menu contains some options centering around the Selection\n" "(also referred to as the Clipboard, Cutbuffers, etc). x11vnc will try\n" "to exchange the selections between the VNC viewers and the X server.\n" +"You can adjust that behavior with these options.\n" "\"\n" "\n" " set helptext(WindowView) \"\n" @@ -798,7 +878,7 @@ "Advanced\\\" and then delete it the gui does NOT terminate.\n" "\n" "Also note that by default in \\\"icon\\\" mode if you delete the icon\n" -"window both the gui and the x11vnc server terminate.\n" +"window both the gui *and* the x11vnc server terminate.\n" "\"\n" "\n" " set helptext(gui) \"\n" @@ -932,34 +1012,35 @@ "--- ----------\n" "\n" "1) At the top of the gui is a info text label where information will\n" -"be posted, e.g. when traversing menu items text indicating how to get\n" -"help on the item and its current value will be displayed.\n" +" be posted, e.g. when traversing menu items text indicating how to get\n" +" help on the item and its current value will be displayed.\n" "\n" -"2) Below the info label is the area where the menu buttons, Actions,\n" -"Clients, etc., are presented. If a menu item has a checkbox,\n" -"it corresponds to a boolean on/off variable. Otherwise it is\n" -"either a string variable, or an action not associated with a\n" -"variable (for the most part).\n" +"2) Below the info label is the area where the menu buttons, \\\"Actions\\\",\n" +" \\\"Clients\\\", etc., are presented. If a menu item has a checkbox,\n" +" it corresponds to a boolean on/off variable. Otherwise it is\n" +" either a string variable, or an action not associated with a\n" +" variable (for the most part).\n" "\n" -"3) Below the menu button area is a text label indicating the current x11vnc\n" -"X display being polled and the corresponding VNC display name. Both\n" -"will be \\\"(*none*)\\\" when there is no connection established.\n" +"3) Below the menu button area is a label indicating the current x11vnc\n" +" X display being polled and the corresponding VNC display name. Both\n" +" will be \\\"(*none*)\\\" when there is no connection established.\n" "\n" -"4) Below the x11 and vnc displays text label is a text area there scrolling\n" -"information about actions being taken and commands being run is displayed.\n" -"To scroll click in the area and use PageUp/PageDown or the arrow keys.\n" +"4) Below the x11 and vnc displays label is a text area there scrolling\n" +" information about actions being taken and commands being run is displayed.\n" +" To scroll click in the area and use PageUp/PageDown or the arrow keys.\n" "\n" "5) At the bottom is an entry area. When one selects a menu item that\n" -"requires supplying a string value, the label will be set to the\n" -"parameter name and one types in the new value. Then one presses the\n" -"\\\"OK\\\" button or presses \\\"Enter\\\" to set the value. Or you can press\n" -"\\\"Cancel\\\" or \\\"Escape\\\" to avoid changing the variable. Some variables\n" -"are boolean toggles (for example, \\\"Permissions -> viewonly\\\") or Radio\n" -"button selections. Selecting these menu items will not activate the\n" -"entry area but rather toggle the variable directly.\n" +" requires supplying a string value, the label will be set to the\n" +" parameter name and one types in the new value. Then one presses the\n" +" \\\"OK\\\" button or presses \\\"Enter\\\" to set the value. Or you can press\n" +" \\\"Cancel\\\" or \\\"Escape\\\" to avoid changing the variable.\n" "\n" +" Many variables are boolean toggles (for example, \\\"Permissions ->\n" +" viewonly\\\") or Radio button selections. Selecting these menu items\n" +" will NOT activate the entry area but rather toggle the variable\n" +" immediately.\n" "\n" -"Cascades Bug: There is a bug not yet worked around for the cascade menus\n" +"CASCADES BUG: There is a bug not yet worked around for the cascade menus\n" "where the (?) help button gets in the way. To get the mouse over to\n" "the cascade menu click and release mouse to activate the cascade, then\n" "you can click on its items. Dragging with a mouse button held down will\n" @@ -1032,7 +1113,7 @@ " }\n" "}\n" "\n" -"proc textwin {name title text} {\n" +"proc textwin {name title text {entry \"\"}} {\n" " global max_text_height max_text_width\n" " global bfont ffont\n" "\n" @@ -1062,13 +1143,40 @@ "\n" " bind $w <Enter> \"focus $w.f.t\"\n" "\n" +" if {$entry != \"\"} {\n" +" # varname+Label Name\n" +" set list [split $entry \"+\"]\n" +" set varname [lindex $list 0]\n" +" set labname [lindex $list 1]\n" +" frame $w.f.ef -bd 1 -relief groove\n" +" label $w.f.ef.l -text \"$labname\" -anchor w -font $bfont\n" +" entry $w.f.ef.e -relief sunken -font $ffont \\\n" +" -textvariable $varname\n" +" button $w.f.ef.b -text \"OK\" -font $bfont \\\n" +" -command \"set ${varname}_ok 1; destroy $w\" \n" +" bind $w.f.ef.e <KeyPress-Return> \"set ${varname}_ok 1; destroy $w\"\n" +" \n" +" pack $w.f.ef.l -side left\n" +" pack $w.f.ef.e -side left -fill x -expand 1\n" +" pack $w.f.ef.b -side right\n" +" }\n" +"\n" " wm withdraw $w\n" " pack $w.f.b -side bottom -fill x \n" +" if {$entry != \"\"} {\n" +" pack $w.f.ef -side bottom -fill x \n" +" bind $w <Enter> \"focus $w.f.ef.e\"\n" +" $w.f.ef.e icursor end\n" +" } else {\n" +" bind $w <Enter> \"focus $w.f.t\"\n" +" }\n" " pack $w.f.y -side right -fill y;\n" " pack $w.f.t -side top -fill both -expand 1;\n" " update\n" "\n" " center_win $w\n" +"\n" +" return $w\n" "}\n" "\n" "proc active_when_connected {item} {\n" @@ -1113,6 +1221,9 @@ " if {$item == \"display\"} {\n" " return 1\n" " }\n" +" if {$item == \"attach\"} {\n" +" return 1\n" +" }\n" " if {$item == \"debug_gui\"} {\n" " return 1\n" " }\n" @@ -1211,11 +1322,10 @@ "\n" " if {$item == \"start\"} {\n" " set str [get_start_x11vnc_txt]\n" -" append text $str\n" " append_text \"$str\\n\"\n" -" append text \"\\nPossible \\$HOME/.x11vncrc settings for this command:\\n\\n\"\n" -" set rctxt [get_start_x11vnc_cmd 1]\n" -" append text \"$rctxt\\n\"\n" +"# append text \"\\nPossible \\$HOME/.x11vncrc settings for this command:\\n\\n\"\n" +"# set rctxt [get_start_x11vnc_cmd 1]\n" +"# append text \"$rctxt\\n\"\n" " }\n" "\n" " regsub -all { } $item \" \" name\n" @@ -2029,6 +2139,75 @@ " }\n" "}\n" "\n" +"proc get_default_vars {} {\n" +" global default_var\n" +"\n" +" set qry [all_query_vars]\n" +"\n" +" append qry \",vncconnect\"\n" +"\n" +" set qargs [list \"-QD\" $qry]\n" +" set all [run_remote_cmd $qargs]\n" +"\n" +" if {[regexp {ans=} $all]} {\n" +" #append_text \"Retrieved all default settings.\\n\"\n" +" } else {\n" +" #append_text \"Failed to retrieve default settings.\\n\"\n" +" }\n" +"\n" +" set query_result_list [split_query $all]\n" +"\n" +" set default_var(gui) \"\"\n" +"\n" +" foreach piece $query_result_list {\n" +" if {[regexp {^([^:][^:]*):(.*)$} $piece m0 item val]} {\n" +" if {$val == \"N/A\"} {\n" +" if {$item == \"vncconnect\"} {\n" +" set val 1\n" +" } else {\n" +" set val \"\"\n" +" }\n" +" }\n" +" if {$item == \"display\"} {\n" +" set val \"\"\n" +" } elseif {$item == \"desktop\"} {\n" +" set val \"\"\n" +" } elseif {$item == \"auth\"} {\n" +" set val \"\"\n" +" } \n" +" # some hacks we do here for now..\n" +" if {$item == \"cursor\" && $val == \"\"} {\n" +" set val \"most\"\n" +" } elseif {$item == \"scrollcopyrect\" && $val == \"\"} {\n" +" set val \"always\"\n" +" } elseif {$item == \"wirecopyrect\" && $val == \"\"} {\n" +" set val \"always\"\n" +" } elseif {$item == \"overlay_nocursor\" && $val == 0} {\n" +" set val 1\n" +" }\n" +"\n" +" set default_var($item) $val\n" +"#puts \"default: $item -> $val\"\n" +" }\n" +" }\n" +"}\n" +"\n" +"proc copy_default_vars {} {\n" +" global menu_var default_var\n" +" foreach item [array names default_var] {\n" +" if {[info exists menu_var($item)]} {\n" +" if {[info exists default_var($item)]} {\n" +" set menu_var($item) $default_var($item)\n" +" }\n" +" }\n" +" }\n" +" foreach item [array names menu_var] {\n" +" if {[info exists default_var($item)]} {\n" +" set menu_var($item) $default_var($item)\n" +" }\n" +" }\n" +"}\n" +"\n" "proc update_menu_vars {{query \"\"}} {\n" " global all_settings menu_var query_result_list\n" "\n" @@ -2066,6 +2245,163 @@ " }\n" "}\n" "\n" +"proc load_settings {} {\n" +" global menu_var default_var\n" +"\n" +" if {![info exists menu_var(load-settings)]} {\n" +" return\n" +" }\n" +" set file $menu_var(load-settings)\n" +" if {$file == \"\"} {\n" +" return\n" +" }\n" +"\n" +" set fh \"\"\n" +" catch {set fh [open $file \"r\"]}\n" +"\n" +" if {$fh == \"\"} {\n" +" append_text \"load_settings: *** failed to open $file ***\\n\"\n" +" return\n" +" }\n" +" copy_default_vars\n" +"\n" +" set str \"\"\n" +" while {[gets $fh line] > -1} {\n" +" regsub -all {\\\\#} $line {__QUOTED_HASH__} line\n" +" if {[regexp {^[ \\t]*#} $line]} {\n" +" continue\n" +" }\n" +" for {set i 0} {$i < 5} {incr i} {\n" +" regsub {#.*$} $line \"\" line\n" +" }\n" +" if {[regexp {^[ \\t]*$} $line]} {\n" +" continue\n" +" }\n" +" regsub -all {__QUOTED_HASH__} $line {#} line\n" +" if {[regexp {\\\\$} $line]} {\n" +" regsub {\\\\$} $line \" \" line\n" +" append str \"$line\"\n" +" } else {\n" +" append str \"$line\\n\"\n" +" }\n" +" }\n" +" close $fh\n" +"\n" +" foreach line [split $str \"\\n\"] {\n" +" set line [string trim $line]\n" +" regsub {^--*} $line \"\" line\n" +" regsub -all {[ \\t][ \\t]*} $line \" \" line\n" +" set list [split $line]\n" +" set item [lindex $list 0]\n" +" set value [lindex $list 1]\n" +" if {[regexp {^[ \\t]*$} $item]} {\n" +" continue\n" +" }\n" +" if {[info exists menu_var($item)]} {\n" +" if {[value_is_bool $item]} {\n" +" set menu_var($item) 1\n" +" } elseif {[value_is_string $item]} {\n" +" if {$value != \"\"} {\n" +" set menu_var($item) $value\n" +" }\n" +" }\n" +" }\n" +" }\n" +"}\n" +"\n" +"proc save_settings {} {\n" +" set rc_text [get_settings_rcfile]\n" +"\n" +" set top \"#\n" +"# This file is based on the current x11vnc settings and can be used as\n" +"# as a ~/.x11vncrc defaults file. If saved to another filename, these\n" +"# settings can be passed to x11vnc at startup via \\\"-rc <filename>\\\".\n" +"#\n" +"# The rc file comment character is \\\"#\\\". Use \\\"\\\\#\\\" for the literal char.\n" +"# You can continue lines using \\\"\\\\\\\" as the last character of a line.\n" +"#\n" +"# Lines beginning with \\\"#d\\\" indicate the parameter value is at its default\n" +"# setting and you probably want to leave it commented out.\n" +"#\n" +"# Lines beginning with \\\"#?\\\" indicate parameters you probably do not\n" +"# want to hardwire to the current setting (uncomment if you want that).\n" +"# \n" +"# Some parameters are boolean, e.g. -forever, and take no value; while\n" +"# the others, e.g. -wait 50, take a string or numerical value.\n" +"#\n" +"# For booleans, the line will end with comment \\\"default: on\\\" or\n" +"# \\\"default: off\\\" indicating the default setting. (Note: often\n" +"# \\\"-nofoobar\\\" corresponds to option \\\"-foobar\\\" and the former is\n" +"# \\\"the default\\\", e.g. -norepeat).\n" +"#\n" +"# For string or numerical options, the value \\\"\\\" in a line below\n" +"# means the default is unset and you will need to supply some non-empty\n" +"# value to use the parameter. For reference, if the default differs\n" +"# from your value it placed at the end of the line as a comment.\n" +"# \n" +"# Feel free to uncomment or comment any of the lines or to change any\n" +"# of the values of the parameters. Don't be surprised that most if not\n" +"# all of the lines below are commented out (x11vnc has so many parameters,\n" +"# most of them will be at their default values).\n" +"#-------------------------------------------------------------------------\n" +"\n" +"\"\n" +"\n" +" set rc_text \"$top$rc_text\"\n" +"\n" +" global env save_settings_var save_settings_var_ok\n" +" if {[info exists env(HOME)]} {\n" +" set save_settings_var \"$env(HOME)/.x11vncrc\"\n" +" } else {\n" +" set save_settings_var \".x11vncrc\"\n" +" }\n" +" set save_settings_var_ok 0\n" +"\n" +" set w [textwin \"save_settings\" \"Save Settings...\" $rc_text \\\n" +" \"save_settings_var+Save as:\"]\n" +"\n" +" tkwait window $w\n" +"\n" +" if {$save_settings_var_ok == 1} {\n" +" set file $save_settings_var\n" +" if {$file == \"\"} {\n" +" return\n" +" }\n" +" append_text \"\\nSaving current settings to $file ...\\n\" \n" +" if {[file exists $file]} {\n" +" set backup \"${file}~\"\n" +" append_text \"Backing up $file -> $backup ...\\n\"\n" +" catch {file delete -force $backup}\n" +" set emsg \"*** Backup to $backup failed. ***\\n\"\n" +" if {![file exists $backup]} {\n" +" catch {file copy -force $file $backup}\n" +" if {![file exists $backup]} {\n" +" append_text $emsg\n" +" bell\n" +" }\n" +" } else {\n" +" append_text $emsg\n" +" bell\n" +" }\n" +" }\n" +" set fh \"\"\n" +" catch {set fh [open $file \"w\"]}\n" +" if {$fh != \"\"} {\n" +" puts $fh $rc_text\n" +" close $fh\n" +" if {![file exists $file]} {\n" +" append_text \"*** Saving to $file failed. ***\\n\"\n" +" bell\n" +" } else {\n" +" append_text \"Done.\\n\"\n" +" }\n" +" } else {\n" +" append_text \"*** Open of $file failed. ***\\n\"\n" +" bell\n" +" }\n" +" }\n" +"}\n" +"\n" "proc clear_all {} {\n" " global menu_var unset_str\n" "\n" @@ -2088,6 +2424,11 @@ " append_text \"Cleared all settings.\\n\"\n" "}\n" "\n" +"proc defaults_all {} {\n" +" copy_default_vars\n" +" append_text \"Reset all variables to default values.\\n\"\n" +"}\n" +"\n" "proc all_query_vars {} {\n" " global query_ans_list query_aro_list all_settings\n" " global cache_all_query_vars\n" @@ -2127,13 +2468,13 @@ "\n" " if {[regexp {ans=} $all]} {\n" " if {! $quiet} {\n" -" append_text \"Retrieved all settings.\\n\"\n" +" append_text \"Retrieved all current settings.\\n\"\n" " }\n" " set all_settings $all\n" " update_menu_vars $all\n" " } else {\n" " if {! $quiet} {\n" -" append_text \"Failed to retrieve settings.\\n\"\n" +" append_text \"Failed to retrieve current settings.\\n\"\n" " }\n" " }\n" " set last_query_all_time [clock seconds]\n" @@ -2193,7 +2534,7 @@ " set logfile $menu_var(logfile)\n" " \n" " if {$logfile == \"\" || $logfile == $unset_str} {\n" -" set txt \"\\nNo logfile has been specified.\\n\\n\" \n" +" set txt \"\\nNo logfile was specified at x11vnc startup.\\n\\n\" \n" " } elseif {![file exists $logfile]} {\n" " set txt \"\\nLogfile \\\"$logfile\\\" does not exist.\\n\\n\"\n" " } else {\n" @@ -2219,7 +2560,7 @@ " \n" " set txt \"\"\n" " if {$logfile == \"\" || $logfile == $unset_str} {\n" -" set txt \"\\nNo logfile has been specified.\\n\\n\" \n" +" set txt \"\\nNo logfile was specified at x11vnc startup.\\n\\n\" \n" " } elseif {![file exists $logfile]} {\n" " set txt \"\\nLogfile \\\"$logfile\\\" does not exist.\\n\\n\"\n" " } else {\n" @@ -2306,6 +2647,12 @@ " } elseif {$item == \"clear-all\"} {\n" " clear_all\n" " return\n" +" } elseif {$item == \"defaults-all\"} {\n" +" defaults_all\n" +" return\n" +" } elseif {$item == \"save-settings\"} {\n" +" save_settings\n" +" return\n" " } elseif {$item == \"show-start-cmd\"} {\n" " show_start_cmd\n" " return\n" @@ -2339,6 +2686,11 @@ " set name $item\n" " }\n" "\n" +" if {$item == \"load-settings\"} {\n" +" load_settings\n" +" return\n" +" }\n" +"\n" " if {! $connected_to_x11vnc} {\n" " ;\n" " } elseif {[regexp {^(stop|quit|exit|shutdown)$} $item]} {\n" @@ -2365,6 +2717,7 @@ "\n" " set debug [in_debug_mode]\n" "\n" +"\n" " set string 0\n" " if {[is_action $item] || $item == \"WindowView\"} {\n" " # Menu item is action:\n" @@ -2376,7 +2729,6 @@ " return\n" " }\n" "\n" -"\n" " if {[value_is_string $item]} {\n" " # Menu item is a string:\n" " if {$item_cascade($item) != \"\"} {\n" @@ -2448,6 +2800,9 @@ "\n" "proc value_is_string {item} {\n" " global item_bool\n" +" if {![info exists item_bool($item)]} {\n" +" return 0\n" +" }\n" " if {! $item_bool($item)} {\n" " return 1\n" " } else {\n" @@ -2457,6 +2812,9 @@ "\n" "proc value_is_bool {item} {\n" " global item_bool\n" +" if {![info exists item_bool($item)]} {\n" +" return 0\n" +" }\n" " if {$item_bool($item)} {\n" " return 1\n" " } else {\n" @@ -2831,9 +3189,6 @@ " make_menu_items\n" " set_widgets\n" " set_internal_help\n" -"# if {$connected_to_x11vnc} {\n" -"# query_all\n" -"# }\n" " append_text \"\\n\"\n" "}\n" "\n" @@ -3120,7 +3475,7 @@ " # puts \"menu_posted $refresh\"\n" "\n" " if {$now > $refresh} {\n" -" append_text \"Refreshing settings... \"\n" +" append_text \"Refreshing current settings... \"\n" " query_all $quiet\n" " if {$quiet} {\n" " append_text \"done\\n\"\n" @@ -3201,20 +3556,79 @@ " after 500\n" " }\n" "\n" +" set fpw 0\n" " if {$props_passwd != $prop0_passwd} {\n" -" push_new_value \"passwd\" \"passwd\" \"$props_passwd\" 0\n" -" set prop0_passwd $props_passwd\n" +" set fpw 1\n" +" }\n" +" set vpw 0\n" +" if {$props_viewpasswd != $prop0_viewpasswd} {\n" +" set vpw 1\n" +" }\n" +"\n" +" set pw_ord [list]\n" +" if {!$fpw && !$vpw } {\n" +" # neither change\n" +" ;\n" +" } elseif {$fpw && !$vpw} {\n" +" # full password change\n" " if {$props_passwd == \"\"} {\n" -" set props_viewpasswd \"\"\n" +" if {$prop0_viewpasswd != \"\"} {\n" +" # set view to \"\" as well and first\n" +" set props_viewpasswd \"\"\n" +" set pw_ord [list vpw fpw]\n" +" } else {\n" +" set pw_ord [list fpw]\n" +" }\n" +" } else {\n" +" # assume view state OK\n" +" set pw_ord [list fpw]\n" +" }\n" +" \n" +" } elseif {!$fpw && $vpw} {\n" +" # view password change\n" +" if {$props_viewpasswd == \"\"} {\n" +" # assume full state OK\n" +" set pw_ord [list vpw]\n" +" } else {\n" +" if {$prop0_passwd == \"\"} {\n" +" # could be trouble, x11vnc makes random\n" +" # full passwd...\n" +" set pw_ord [list vpw]\n" +" } else {\n" +" # OK, full non-null.\n" +" set pw_ord [list vpw]\n" +" }\n" +" }\n" +" } elseif {$fpw && $vpw} {\n" +" # both full and view password change\n" +" if {$props_passwd == \"\" && $props_viewpasswd == \"\"} {\n" +" # OK, do view first\n" +" set pw_ord [list vpw fpw]\n" +" } elseif {$props_passwd == \"\" && $props_viewpasswd != \"\"} {\n" +" # Not good, do view first anyway x11vnc will fix.\n" +" set pw_ord [list vpw fpw]\n" +" } elseif {$props_passwd != \"\" && $props_viewpasswd == \"\"} {\n" +" # OK, view first\n" +" set pw_ord [list vpw fpw]\n" +" } elseif {$props_passwd != \"\" && $props_viewpasswd != \"\"} {\n" +" # OK, full first\n" +" set pw_ord [list fpw vpw]\n" +" }\n" +" }\n" +"\n" +" foreach case $pw_ord {\n" +" if {$case == \"fpw\"} {\n" +" push_new_value \"passwd\" \"passwd\" \"$props_passwd\" 1\n" +" set prop0_passwd $props_passwd\n" +" after 500\n" +" }\n" +" if {$case == \"vpw\"} {\n" +" push_new_value \"viewpasswd\" \"viewpasswd\" \"$props_viewpasswd\" 1\n" +" set prop0_viewpasswd $props_viewpasswd\n" +" after 500\n" " }\n" -" after 500\n" " }\n" "\n" -" if {$props_viewpasswd != $prop0_viewpasswd} {\n" -" push_new_value \"viewpasswd\" \"viewpasswd\" \"$props_viewpasswd\" 0\n" -" set prop0_viewpasswd $props_viewpasswd\n" -" after 500\n" -" }\n" " props_widgets normal\n" "}\n" "\n" @@ -3539,7 +3953,7 @@ "\n" "proc show_client_balloon {} {\n" " global icon_mode icon_win props_win full_win\n" -" global client_balloon ffont\n" +" global client_balloon ffont connected_to_x11vnc\n" "\n" " set noinfo \"tkx11vnc: no client information\"\n" " set noinfo \"$noinfo\\navailable from x11vnc ...\"\n" @@ -3553,11 +3967,16 @@ " set x [expr [winfo rootx $icon_win] + ([winfo width $icon_win]/2)]\n" " set y [expr [winfo rooty $icon_win] + [winfo height $icon_win] + 4]\n" "\n" +" set infotext $client_balloon\n" +" if {!$connected_to_x11vnc} {\n" +" set infotext \"Not currently attached to x11vnc\\nLast available info:\\n$infotext\"\n" +" }\n" +"\n" " set w .client_balloon\n" " catch {destroy $w}\n" " toplevel $w -bg black -screen [winfo screen $icon_win]\n" " wm overrideredirect $w 1\n" -" label $w.l -text \"$client_balloon\" -relief flat -bg \"#ffffaa\" -fg black \\\n" +" label $w.l -text \"$infotext\" -relief flat -bg \"#ffffaa\" -fg black \\\n" " -padx 2 -pady 0 -anchor w -justify left -font $ffont\n" " pack $w.l -side left -padx 1 -pady 1\n" "\n" @@ -3981,6 +4400,7 @@ " }\n" "\n" " if {$make_gui_count == 1} {\n" +" copy_default_vars\n" " if {$x11vnc_connect} {\n" " try_connect_and_query_all\n" " }\n" @@ -4299,6 +4719,139 @@ " return [warning_dialog $msg \"noremote\"]\n" "}\n" "\n" +"proc get_settings_rcfile {} {\n" +" global menu_var default_var unset_str\n" +" global x11vnc_gui_params\n" +"\n" +" set rc_txt \"\"\n" +"\n" +" set menu_var(gui) $x11vnc_gui_params\n" +"\n" +" foreach item [lsort [array names menu_var]] {\n" +" if {$item == \"gui\"} {\n" +" ;\n" +" } elseif {![active_when_starting $item]} {\n" +" continue\n" +" } elseif {[is_action $item]} {\n" +" continue\n" +" }\n" +" if {$item == \"debug_gui\"} {\n" +" continue\n" +" }\n" +" if {$item == \"WindowView\"} {\n" +" continue\n" +" }\n" +" if {$item == \"rc\" || $item == \"norc\"} {\n" +" continue\n" +" }\n" +" set def \"\"\n" +" if {[info exists default_var($item)]} {\n" +" set def $default_var($item)\n" +" }\n" +"\n" +" set qst \"\"\n" +" set hmm \"#? \"\n" +" if {$item == \"display\"} {\n" +" set qst $hmm\n" +" } elseif {$item == \"desktop\"} {\n" +" set qst $hmm\n" +" } elseif {$item == \"dontdisconnect\"} {\n" +" set qst $hmm\n" +" } elseif {$item == \"alwaysshared\"} {\n" +" set qst $hmm\n" +" } elseif {$item == \"nevershared\"} {\n" +" set qst $hmm\n" +" }\n" +"\n" +" if {![info exists menu_var($item)]} {\n" +" set mv $def\n" +" } else {\n" +" set mv $menu_var($item)\n" +" }\n" +" if {$mv == $unset_str} {\n" +" set mv \"\"\n" +" }\n" +" set ntab 3\n" +"\n" +" if {$item == \"gui\" || [value_is_string $item]} {\n" +" set nitem $item\n" +" if {$nitem == \"screen_blank\"} {\n" +" set nitem \"sb\"\n" +" } elseif {$nitem == \"xrandr_mode\"} {\n" +" set nitem \"xrandr\"\n" +" } elseif {$nitem == \"wireframe_mode\"} {\n" +" set nitem \"wireframe\"\n" +" } elseif {$nitem == \"solid_color\"} {\n" +" set nitem \"solid\"\n" +" }\n" +"\n" +" if {$mv == \"\" && $def != \"\"} {\n" +" set qst $hmm\n" +" }\n" +" set n 0\n" +" if {$qst != \"\"} {\n" +" append rc_txt $qst\n" +" incr n [string length $qst]\n" +" } elseif {$mv == $def} {\n" +" append rc_txt \"#d \"\n" +" incr n [string length \"#d \"]\n" +" }\n" +" set mt $mv\n" +" regsub -all {#} $mt {\\#} mt\n" +" if {$mt == \"\"} {\n" +" set mt {\"\"}\n" +" }\n" +" append rc_txt \"-$nitem $mt\"\n" +"\n" +" if {$mv != $def} {\n" +" set m [string length \"-$nitem $mt\"]\n" +" incr n $m\n" +" set n [expr $n / 8]\n" +" set c 0\n" +" for {set i $n} {$i <= $ntab} {incr i} {\n" +" append rc_txt \"\\t\"\n" +" incr c\n" +" }\n" +" if {$c == 0} {\n" +" append rc_txt \"\\t\"\n" +" }\n" +" regsub -all {#} $def {\\#} def\n" +" if {$def == \"\"} {\n" +" set def {\"\"}\n" +" }\n" +" append rc_txt \"# default: $def\"\n" +" }\n" +" append rc_txt \"\\n\"\n" +"\n" +" } elseif {[value_is_bool $item]} {\n" +" set n 0\n" +" if {$qst != \"\"} {\n" +" append rc_txt $qst\n" +" incr n [string length $qst]\n" +" } elseif {$mv == $def} {\n" +" append rc_txt \"#d \"\n" +" incr n [string length \"#d \"]\n" +" }\n" +" if {$def == 1} {\n" +" set dv \"on\"\n" +" } else {\n" +" set dv \"off\"\n" +" }\n" +" append rc_txt \"-$item\"\n" +" set m [string length \"-$item\"]\n" +" incr n $m\n" +" set n [expr $n / 8]\n" +" for {set i $n} {$i <= $ntab} {incr i} {\n" +" append rc_txt \"\\t\"\n" +" }\n" +" append rc_txt \"# default: $dv\"\n" +" append rc_txt \"\\n\"\n" +"\n" +" }\n" +" }\n" +" return $rc_txt\n" +"}\n" +"\n" "proc double_check_start_x11vnc {} {\n" " global hostname\n" " set msg [get_start_x11vnc_txt]\n" @@ -4325,7 +4878,7 @@ "}\n" "\n" "proc get_start_x11vnc_cmd {{show_rc 0}} {\n" -" global menu_var unset_str x11vnc_prog\n" +" global menu_var default_var unset_str x11vnc_prog\n" "\n" " set xterm_cmd \"xterm -iconic -geometry 80x35 -title x11vnc-console -e\"\n" "\n" @@ -4338,15 +4891,19 @@ " set saw_id 0\n" "\n" " foreach item [lsort [array names menu_var]] {\n" -" if {![active_when_starting $item]} {\n" +" if {$item == \"gui\"} {\n" +" ;\n" +" } elseif {![active_when_starting $item]} {\n" " continue\n" -" }\n" -" if {[is_action $item]} {\n" +" } elseif {[is_action $item]} {\n" " continue\n" " }\n" " if {$item == \"debug_gui\"} {\n" " continue\n" " }\n" +" if {$item == \"WindowView\"} {\n" +" continue\n" +" }\n" " if {$item == \"id\" || $item == \"sid\"} {\n" " set val $menu_var($item);\n" " if {$val == \"0x0\" || $val == \"root\"} {\n" @@ -4374,7 +4931,15 @@ "\n" " if {[value_is_bool $item]} {\n" " if {[info exists menu_var($item)]} {\n" -" if {$menu_var($item)} {\n" +" set add 1\n" +" if {[info exists default_var($item)]} {\n" +" if {$menu_var($item) == $default_var($item)} {\n" +" set add 0;\n" +" }\n" +" } elseif {! $menu_var($item)} {\n" +" set add 0\n" +" }\n" +" if {$add} {\n" " lappend cmd \"-$item\"\n" " append rc_txt \"-$item\\n\"\n" " }\n" @@ -4383,6 +4948,7 @@ " if {[info exists menu_var($item)]} {\n" " if {$menu_var($item) != \"\"\n" " && $menu_var($item) != $unset_str} {\n" +" set add 1\n" " set nitem $item\n" " if {$nitem == \"screen_blank\"} {\n" " set nitem \"sb\"\n" @@ -4393,9 +4959,18 @@ " } elseif {$nitem == \"solid_color\"} {\n" " set nitem \"solid\"\n" " }\n" -" lappend cmd \"-$nitem\"\n" -" lappend cmd $menu_var($item)\n" -" append rc_txt \"-$nitem $menu_var($item)\\n\"\n" +" if {[info exists default_var($item)]} {\n" +" if {$menu_var($item) == $default_var($item)} {\n" +" set add 0;\n" +" }\n" +" }\n" +" if {$add} {\n" +" lappend cmd \"-$nitem\"\n" +" lappend cmd $menu_var($item)\n" +" set mt $menu_var($item)\n" +" regsub -all {#} $mt {\\#} mt\n" +" append rc_txt \"-$nitem $mt\\n\"\n" +" }\n" " }\n" " }\n" " }\n" @@ -4451,6 +5026,15 @@ " catch {[eval exec $cmd]}\n" " after 500\n" " try_connect_and_query_all 3\n" +" if {!$connected_to_x11vnc} {\n" +" append_text \"\\nStarting x11vnc seems to have failed.\\n\"\n" +" if {[regexp -- {-o } $str] || [regexp -- {-logfile} $str]} {\n" +" append_text \"Examine the logfile (Debugging -> show-logfile) for error messages.\\n\"\n" +" } else {\n" +" append_text \"Rerun with a logfile (if needed) and examine the logfile\\n\"\n" +" append_text \"(Debugging -> show-logfile) for error messages.\\n\"\n" +" }\n" +" }\n" "}\n" "\n" "proc run_remote_cmd {opts} {\n" @@ -4717,6 +5301,7 @@ "\n" "global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;\n" "global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url\n" +"global x11vnc_gui_params\n" "global x11vnc_auth_file x11vnc_connect_file beginner_mode simple_gui_created\n" "global helpall helptext helpremote helplabel hostname osname\n" "global all_settings reply_xdisplay always_update\n" @@ -4846,6 +5431,11 @@ "} else {\n" " set x11vnc_gui_geom \"\"\n" "}\n" +"if {[info exists env(X11VNC_GUI_PARAMS)]} {\n" +" set x11vnc_gui_params $env(X11VNC_GUI_PARAMS);\n" +"} else {\n" +" set x11vnc_gui_params \"\"\n" +"}\n" "\n" "if {[info exists env(X11VNC_CONNECT_FILE)]} {\n" " set x11vnc_connect_file $env(X11VNC_CONNECT_FILE);\n" @@ -4960,6 +5550,8 @@ "\n" "key_bindings;\n" "\n" +"get_default_vars\n" +"\n" "if {$icon_mode} {\n" " if {$tray_embed} {\n" " make_gui \"tray\"\n" diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1 index 9f2242c..fc6a224 100644 --- a/x11vnc/x11vnc.1 +++ b/x11vnc/x11vnc.1 @@ -2,7 +2,7 @@ .TH X11VNC "1" "July 2005" "x11vnc " "User Commands" .SH NAME x11vnc - allow VNC connections to real X11 displays - version: 0.7.2, lastmod: 2005-07-09 + version: 0.7.2, lastmod: 2005-07-10 .SH SYNOPSIS .B x11vnc [OPTION]... @@ -37,6 +37,8 @@ ssh -L 5900:localhost:5900 far-host 'x11vnc -localhost -display :0' .IP vncviewer -encodings 'copyrect tight zrle hextile' localhost:0 .PP +Also, use of a VNC password (-rfbauth or \fB-passwdfile)\fR is strongly recommend. +.PP For additional info see: http://www.karlrunge.com/x11vnc/ and http://www.karlrunge.com/x11vnc/#faq .PP @@ -45,9 +47,10 @@ line in it is treated as a single command line option. Disable with \fB-norc.\f For each option name, the leading character "-" is not required. E.g. a line that is either "forever" or "\fB-forever\fR" may be used and are equivalent. Likewise "wait 100" or "\fB-wait\fR \fI100\fR" are acceptable and equivalent lines. -The "#" character comments out to the end of the line in the usual way. -Leading and trailing whitespace is trimmed off. Lines may be continued with -a "\\" as the last character of a line (it becomes a space character). +The "#" character comments out to the end of the line in the usual way +(backslash it for a literal). Leading and trailing whitespace is trimmed off. +Lines may be continued with a "\\" as the last character of a line (it +becomes a space character). .PP .SH OPTIONS @@ -151,19 +154,18 @@ On Solaris there is a problem with image "bleeding" around transient popup menus (but not for the menu itself): a workaround is to disable SaveUnders by passing the "\fB-su\fR" argument to Xsun (in -/etc/dt/config/Xservers). Also note that the mouse -cursor shape is exactly correct in this mode. +/etc/dt/config/Xservers). .IP Use \fB-overlay\fR as a workaround for situations like these: Some legacy applications require the default visual to be 8bpp (8+24), or they will use 8bpp PseudoColor even when the default visual is depth 24 TrueColor (24+8). -In these cases colors in some windows will be messed -up in x11vnc unless \fB-overlay\fR is used. Another use of +In these cases colors in some windows will be incorrect +in x11vnc unless \fB-overlay\fR is used. Another use of \fB-overlay\fR is to enable showing the exact mouse cursor shape (details below). .IP -Under \fB-overlay,\fR performance will be somewhat degraded +Under \fB-overlay,\fR performance will be somewhat slower due to the extra image transformations required. For optimal performance do not use \fB-overlay,\fR but rather configure the X server so that the default visual is @@ -201,7 +203,7 @@ automatically. Default: :cr More esoteric options: for compatibility with vncviewers the scaled width is adjusted to be a multiple of 4: to disable this use ":n4". ":in" use interpolation -scheme even when shrinking, ":pad", pad scaled width +scheme even when shrinking, ":pad" pad scaled width and height to be multiples of scaling denominator (e.g. 3 for 2/3). .PP @@ -238,7 +240,7 @@ as soon as the first client(s) disconnect. Same as \fB-many\fR \fB-timeout\fR \fIn\fR .IP Exit unless a client connects within the first n seconds -of startup. +after startup. .PP \fB-inetd\fR .IP @@ -246,7 +248,7 @@ Launched by .IR inetd (1): stdio instead of listening socket. Note: if you are not redirecting stderr to a log file -(via shell 2> or \fB-o\fR option) you must also specify the \fB-q\fR +(via shell 2> or \fB-o\fR option) you MUST also specify the \fB-q\fR option, otherwise the stderr goes to the viewer which will cause it to abort. Specifying both \fB-inetd\fR and \fB-q\fR and no \fB-o\fR will automatically close the stderr. @@ -271,10 +273,8 @@ as a file to periodically check for new hosts. The first line is read and then the file is truncated. Be careful for this usage mode if x11vnc is running as root (e.g. via -.IR inetd (1) -or .IR gdm (1) -). +, etc). .PP \fB-vncconnect,\fR \fB-novncconnect\fR .IP @@ -322,7 +322,7 @@ vice versa) to avoid situations where no connections Do not use gethostbyname() or gethostbyaddr() to look up host names or IP numbers. Use this if name resolution is incorrectly set up and leads to long pauses as name -lookup times out, etc. +lookups time out, etc. .PP \fB-input\fR \fIstring\fR .IP @@ -337,7 +337,7 @@ E.g. "\fB-input\fR \fIM\fR" means normal users can only move the mouse and "\fB-input\fR \fIKMB,M\fR" lets normal users do anything and enables view-only users to move the mouse. This option is ignored when a global \fB-viewonly\fR is in -effect (all input is discarded). +effect (all input is discarded in that case). .PP \fB-viewpasswd\fR \fIstring\fR .IP @@ -357,7 +357,12 @@ for either field the string "__EMPTY__" may be used. Note: \fB-passwdfile\fR is a simple plaintext passwd, see also \fB-rfbauth\fR and \fB-storepasswd\fR below for obfuscated VNC password files. Neither file should be readable -by others. +by untrusted users. +.PP +\fB-nopw\fR +.IP +Disable the big warning message when you use x11vnc +without some sort of password. .PP \fB-storepasswd\fR \fIpass\fR \fIfile\fR .IP @@ -403,7 +408,7 @@ in RFB_CLIENT_COUNT. RFB_MODE will be "accept" If \fIstring\fR is "popup" then a builtin popup window is used. The popup will time out after 120 seconds, use "popup:N" to modify the timeout to N seconds -(use 0 for no timeout) +(use 0 for no timeout). .IP If \fIstring\fR is "xmessage" then an .IR xmessage (1) @@ -426,7 +431,9 @@ unexpected value). E.g. "no:*" is a good choice. .IP Note that x11vnc blocks while the external command or popup is running (other clients may see no updates -during this period). +during this period). So a person sitting a the physical +display is needed to respond to an popup prompt. (use +a 2nd x11vnc if you lock yourself out). .IP More \fB-accept\fR tricks: use "popupmouse" to only allow mouse clicks in the builtin popup to be recognized. @@ -576,11 +583,12 @@ each rectangle. .IP If your screen is composed of multiple monitors glued together via XINERAMA, and that screen is -non-rectangular this option will try to guess the +not a rectangle this option will try to guess the areas to black out (if your system has libXinerama). .IP -In general on XINERAMA displays you may need to use the -\fB-xwarppointer\fR option if the mouse pointer misbehaves. +In general, we have noticed on XINERAMA displays you +may need to use the "\fB-xwarppointer\fR" option if the mouse +pointer misbehaves. .PP \fB-xtrap\fR .IP @@ -665,7 +673,7 @@ Print program version and last modification date. .PP \fB-dbg\fR .IP -instead of exiting after cleaning up, run a simple +Instead of exiting after cleaning up, run a simple "debug crash shell" when fatal errors are trapped. .PP \fB-q\fR @@ -728,7 +736,7 @@ press Shift+Key but then release the Shift before Key that could give rise to extra unwanted characters (usually only between keyboards of different languages). Only use this option if you observe problems with -some keystrokes. This option may be extended. +some keystrokes. .PP \fB-skip_dups,\fR \fB-noskip_dups\fR .IP @@ -744,11 +752,11 @@ Default: \fB-noskip_dups\fR .PP \fB-add_keysyms,\fR \fB-noadd_keysyms\fR .IP -If a Keysym is received from a VNC viewer and -that Keysym does not exist in the X server, then -add the Keysym to the X server's keyboard mapping. -Added Keysyms will be removed periodically and also -when x11vnc exits. Default: \fB-add_keysyms\fR +If a Keysym is received from a VNC viewer and that +Keysym does not exist in the X server, then add the +Keysym to the X server's keyboard mapping on an unused +key. Added Keysyms will be removed periodically and +also when x11vnc exits. Default: \fB-add_keysyms\fR .PP \fB-clear_mods\fR .IP @@ -779,7 +787,7 @@ To map a key to a button click, use the fake Keysyms Dead keys: "dead" (or silent, mute) keys are keys that do not produce a character but must be followed by a 2nd keystroke. This is often used for accenting characters, -e.g. to put "'" on top of "a" by pressing the dead +e.g. to put "`" on top of "a" by pressing the dead key and then "a". Note that this interpretation is not part of core X11, it is up to the toolkit or application to decide how to react to the sequence. @@ -829,7 +837,7 @@ the real X display. .IP Use "\fB-norepeat\fR \fIN\fR" to set how many times norepeat will be reset if something else (e.g. X session manager) -disables it. The default is 2. Use a negative value +undoes it. The default is 2. Use a negative value for unlimited resets. .PP \fB-nofb\fR @@ -888,7 +896,7 @@ If the X display supports retrieving the cursor shape information from the X server, then the default is to use that mode. On Solaris this can be done with the SUN_OVL extension using \fB-overlay\fR (see also the -\fB-overlay_nomouse\fR option). A similar overlay scheme +\fB-overlay_nocursor\fR option). A similar overlay scheme is used on IRIX. Xorg (e.g. Linux) and recent Solaris Xsun servers support the XFIXES extension to retrieve the exact cursor shape from the X server. If XFIXES @@ -898,10 +906,10 @@ with \fB-nocursor,\fR and also some values of the "mode" option below. .IP Note that under XFIXES cursors with transparency (alpha -channel) will not be exactly represented and one may -find Overlay preferable. See also the \fB-alphacut\fR and -\fB-alphafrac\fR options below as fudge factors to try to -improve the situation for cursors with transparency +channel) will usually not be exactly represented and one +may find Overlay preferable. See also the \fB-alphacut\fR +and \fB-alphafrac\fR options below as fudge factors to try +to improve the situation for cursors with transparency for a given theme. .IP The "mode" string can be used to fine-tune the @@ -938,6 +946,7 @@ is not available, \fB-overlay\fR mode will be attempted. .IP Choose an alternate "arrow" cursor from a set of some common ones. n can be 1 to 6. Default is: 1 +Ignored when in XFIXES cursor-grabbing mode. .PP \fB-noxfixes\fR .IP @@ -947,16 +956,13 @@ shape even if it is available. \fB-alphacut\fR \fIn\fR .IP When using the XFIXES extension for the cursor shape, -cursors with transparency will not be displayed exactly -(but opaque ones will). This option sets n as a cutoff -for cursors that have transparency ("alpha channel" -with values ranging from 0 to 255) Any cursor pixel with -alpha value less than n becomes completely transparent. -Otherwise the pixel is completely opaque. Default 240 -.IP -Note: the options \fB-alphacut,\fR \fB-alphafrac,\fR and \fB-alphafrac\fR -may be removed if a more accurate internal method for -handling cursor transparency is implemented. +cursors with transparency will not usually be displayed +exactly (but opaque ones will). This option sets n as +a cutoff for cursors that have transparency ("alpha +channel" with values ranging from 0 to 255) Any cursor +pixel with alpha value less than n becomes completely +transparent. Otherwise the pixel is completely opaque. +Default 240 .PP \fB-alphafrac\fR \fIfraction\fR .IP @@ -1043,7 +1049,7 @@ Do not update the display during mouse dragging events (mouse button held down). Greatly improves response on slow setups, but you lose all visual feedback for drags, text selection, and some menu traversals. It overrides -any \fB-pointer_mode\fR setting +any \fB-pointer_mode\fR setting. .PP \fB-wireframe\fR \fI[str],\fR \fB-nowireframe\fR .IP @@ -1098,8 +1104,9 @@ t2 is how long to wait for the window to start moving or being resized (for some window managers this can be rather long), t3 is how long to keep a wireframe moving before repainting the window. t4 is the minimum time -between sending wireframe "animations". For a slow -link this might be a better choice: 0.25+0.6+6.0+0.15 +between sending wireframe "animations". If a slow +link is detected, these values may be automatically +changed to something better for a slow link. .PP \fB-wirecopyrect\fR \fImode,\fR \fB-nowirecopyrect\fR .IP @@ -1349,9 +1356,9 @@ 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 (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. +You can use 3 Alt_L's (the Left "Alt" key) taps in a +row described under \fB-scrollcopyrect\fR 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 @@ -1382,18 +1389,19 @@ monitor X server grabs. .IP Some of the use of the RECORD extension can leave a tiny window for XGrabServer deadlock. This is only if -the whole-server grabbing application expects mouse -or keyboard input before releasing the grab. It is -usually a window manager that does this. x11vnc takes -care to avoid the the problem, but if caught x11vnc -will freeze. Without \fB-grab_buster,\fR the only solution -is to go the physical display and give it some input -to satisfy the grabbing app. Or manually kill and -restart the window manager. With \fB-grab_buster,\fR x11vnc +the whole-server grabbing application expects mouse or +keyboard input before releasing the grab. It is usually +a window manager that does this. x11vnc takes care to +avoid the the problem, but if caught x11vnc will freeze. +Without \fB-grab_buster,\fR the only solution is to go the +physical display and give it some input to satisfy the +grabbing app. Or manually kill and restart the window +manager if that is feasible. With \fB-grab_buster,\fR x11vnc will fork a helper thread and if x11vnc appears to be -stuck in a grab after a period of time (20-30 sec) -then it will inject some user input: button clicks, -Escape, mouse motion, etc to try to break the grab. +stuck in a grab after a period of time (20-30 sec) then +it will inject some user input: button clicks, Escape, +mouse motion, etc to try to break the grab. If you +experience a lot of grab deadlock, please report a bug. .PP \fB-debug_grabs\fR .IP @@ -1404,16 +1412,20 @@ XGrabServer() deadlock for \fB-scrollcopyrect__mode_.\fR .IP Various pointer motion update schemes. "\fB-pm\fR" is an alias. The problem is pointer motion can cause -rapid changes on the screen: consider the rapid changes -when you drag a large window around. Neither x11vnc's -screen polling and vnc compression routines nor the -bandwidth to the vncviewers can keep up these rapid -screen changes: everything will bog down when dragging -or scrolling. So a scheme has to be used to "eat" -much of that pointer input before re-polling the screen -and sending out framebuffer updates. The mode number -\fIn\fR can be 0 to 4 and selects one of the schemes -desribed below. +rapid changes on the screen: consider the rapid +changes when you drag a large window around opaquely. +Neither x11vnc's screen polling and vnc compression +routines nor the bandwidth to the vncviewers can keep +up these rapid screen changes: everything will bog down +when dragging or scrolling. So a scheme has to be used +to "eat" much of that pointer input before re-polling +the screen and sending out framebuffer updates. The +mode number \fIn\fR can be 0 to 4 and selects one of +the schemes desribed below. +.IP +Note that the \fB-wireframe\fR and \fB-scrollcopyrect__mode_s\fR +complement \fB-pointer_mode\fR by detecting (and improving) +certain periods of "rapid screen change". .IP n=0: does the same as \fB-nodragging.\fR (all screen polling is suspended if a mouse button is pressed.) @@ -1459,21 +1471,23 @@ Default: 10 .IP x11vnc tries to estimate some speed parameters that are used to optimize scheduling (e.g. \fB-pointer_mode\fR -4) and other things. Use the \fB-speeds\fR option to set -these manually. The triple \fIrd,bw,lat\fR corresponds -to video h/w read rate in MB/sec, network bandwidth to -clients in KB/sec, and network latency to clients in -milliseconds, respectively. If a value is left blank, -e.g. "\fB-speeds\fR \fI,100,15\fR", then the internal scheme is -used to estimate the empty value(s). +4, \fB-wireframe,\fR \fB-scrollcopyrect)\fR and other things. +Use the \fB-speeds\fR option to set these manually. +The triple \fIrd,bw,lat\fR corresponds to video h/w +read rate in MB/sec, network bandwidth to clients in +KB/sec, and network latency to clients in milliseconds, +respectively. If a value is left blank, e.g. "-speeds +,100,15", then the internal scheme is used to estimate +the empty value(s). .IP Typical PC video cards have read rates of 5-10 MB/sec. If the framebuffer is in main memory instead of video -h/w (e.g. SunRay, shadowfb, Xvfb), the read rate may -be much faster. "x11perf \fB-getimage500"\fR can be used -to get a lower bound (remember to factor in the bytes -per pixel). It is up to you to estimate the network -bandwith and latency to clients. For the latency the +h/w (e.g. SunRay, shadowfb, dummy driver, Xvfb), the +read rate may be much faster. "x11perf \fB-getimage500"\fR +can be used to get a lower bound (remember to factor +in the bytes per pixel). It is up to you to estimate +the network bandwith and latency to clients. For the +latency the .IR ping (1) command can be used. .IP @@ -1529,7 +1543,7 @@ with a long build running in it continously streaming text output. By default x11vnc will try to detect this (3 screen polls in a row each longer than 0.25 sec with no user input), and sleep up to 1.5 secs to let things -"catch up". Use this option to disable the detection. +"catch up". Use this option to disable that detection. .PP \fB-readtimeout\fR \fIn\fR .IP @@ -1597,7 +1611,8 @@ Broken pipe (SIGPIPE) handling. \fIstring\fR can be "ignore" or "exit". For "ignore" libvncserver will handle the abrupt loss of a client and continue, for "exit" x11vnc will cleanup and exit at the 1st -broken connection. Default: "ignore". +broken connection. Default: "ignore". This option +is obsolete. .PP \fB-threads,\fR \fB-nothreads\fR .IP @@ -1636,7 +1651,7 @@ changes, periodically copy all of X display fb into main memory and examine that copy for changes. Under some circumstances this will improve interactive response, or at least make things look smoother, but in others -(many) it will make the response worse. If the video +(most!) it will make the response worse. If the video h/w fb is such that reading small tiles is very slow this mode could help. To keep the "framerate" up the screen size x bpp cannot be too large. Note that @@ -1687,17 +1702,18 @@ and .IR fbset (1) for the first two examples) .IP -All user input is discarded. Most of the X11 (screen, -keyboard, mouse) options do not make sense and many -will cause this mode to crash, so please think twice -before setting/changing them. +All user input is discarded by default (but see the +\fB-pipeinput\fR option). Most of the X11 (screen, keyboard, +mouse) options do not make sense and many will cause +this mode to crash, so please think twice before +setting/changing them. .IP If you don't want x11vnc to close the X DISPLAY in rawfb mode, then capitalize the prefix, SHM:, MAP:, FILE: Keeping the display open enables the default remote-control channel, which could be useful. Also, if you also specify \fB-noviewonly,\fR then the mouse and -keyboard input are still sent to the X display, this +keyboard input are STILL sent to the X display, this usage should be very rare, i.e. doing something strange with /dev/fb0. .PP @@ -1725,9 +1741,10 @@ to use if it wants. Do 'env | grep X11VNC' for more. Start up a simple tcl/tk gui based on the the remote control options \fB-remote/-query\fR described below. Requires the "wish" program to be installed on the -machine. "gui-opts" is not required: the default is -to start up both the gui and x11vnc with the gui showing -up on the X display in the environment variable DISPLAY. +machine. "gui-opts" is not required: the default +is to start up both the full gui and x11vnc with the +gui showing up on the X display in the environment +variable DISPLAY. .IP "gui-opts" can be a comma separated list of items. Currently there are these types of items: 1) a gui @@ -1760,15 +1777,16 @@ display (e.g. localhost:10). If you do not specify a gui X display in "gui-opts" then the DISPLAY environment variable and \fB-display\fR option are tried (in that order). Regarding the x11vnc -X display the gui will try to connect to, it first -tries \fB-display\fR and then DISPLAY. For example, "x11vnc -\fB-display\fR :0 \fB-gui\fR otherhost:0", will remote control an -x11vnc polling :0 and display the gui on otherhost:0 -The "tray" mode below reverses this preference. +X display the gui will try to communication with, it +first tries \fB-display\fR and then DISPLAY. For example, +"x11vnc \fB-display\fR :0 \fB-gui\fR otherhost:0", will remote +control an x11vnc polling :0 and display the gui on +otherhost:0 The "tray/icon" mode below reverses this +preference, preferring to display on the x11vnc display. .IP 4) When "tray" or "icon" is specified, the gui presents itself as a small icon with behavior typical -of a "system tray" or "dock" applet. The color +of a "system tray" or "dock applet". The color of the icon indicates status (connected clients) and there is also a balloon status. Clicking on the icon gives a menu from which properties, etc, can be set and @@ -1778,7 +1796,7 @@ fully functional, the gui mode should be "start" .IP For "icon" the gui just a small standalone window. For "tray" it will attempt to embed itself in the -"system tray". If "=setpass" is appended then +"system tray" if possible. If "=setpass" is appended then at startup the X11 user will be prompted to set the VNC session password. If =<hexnumber> is appended that icon will attempt to embed itself in the window @@ -1804,6 +1822,7 @@ with "iconfont=...". The following could be useful: General examples of the \fB-gui\fR option: "x11vnc \fB-gui",\fR "x11vnc \fB-gui\fR ez" "x11vnc \fB-gui\fR localhost:10", "x11vnc \fB-gui\fR conn,host:0", "x11vnc \fB-gui\fR tray,ez" +"x11vnc \fB-gui\fR tray=setpass" .IP If you do not intend to start x11vnc from the gui (i.e. just remote control an existing one), then the @@ -1836,10 +1855,6 @@ For example: 'x11vnc \fB-remote\fR stop' (which is the same as \'x11vnc \fB-R\fR shared' will enable shared connections, and \'x11vnc \fB-R\fR scale:3/4' will rescale the desktop. .IP -Note: the more drastic the change induced by the \fB-remote\fR -command, the bigger the chance for bugs or crashes. -Please report reproducible bugs. -.IP .IP The following \fB-remote/-R\fR commands are supported: .IP @@ -1989,7 +2004,7 @@ xinerama enable \fB-xinerama\fR mode. (if applicable) .IP noxinerama disable \fB-xinerama\fR mode. .IP -xtrap enable \fB-xtrap\fR input mode. +xtrap enable \fB-xtrap\fR input mode(if applicable) .IP noxtrap disable \fB-xtrap\fR input mode. .IP @@ -2143,7 +2158,7 @@ noxrecord disable all use of RECORD extension. .IP xrecord enable use of RECORD extension. .IP -reset_record reset RECORD extension (if avail.). +reset_record reset RECORD extension (if avail.) .IP pointer_mode:n set \fB-pointer_mode\fR to n. same as "pm" .IP @@ -2309,16 +2324,24 @@ 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 truecolor notruecolor overlay nooverlay overlay_cursor overlay_yescursor nooverlay_nocursor nooverlay_cursor nooverlay_yescursor overlay_nocursor visual scale -scale_cursor viewonly noviewonly shared noshared forever -noforever once timeout deny lock nodeny unlock connect -allowonce allow localhost nolocalhost listen lookup -nolookup accept popup gone shm noshm flipbyteorder +scale_cursor viewonly noviewonly shared noshared +forever noforever once timeout deny lock nodeny unlock +connect allowonce allow localhost nolocalhost listen +lookup nolookup accept gone shm noshm flipbyteorder noflipbyteorder onetile noonetile solid_color solid nosolid blackout xinerama noxinerama xtrap noxtrap xrandr noxrandr xrandr_mode padgeom quiet q noquiet @@ -2352,9 +2375,9 @@ debug_wireframe debug_scroll nodebug_scroll debug_scroll debug_tiles dbt nodebug_tiles nodbt debug_tiles debug_grabs nodebug_grabs dbg nodbg noremote .IP -aro= display vncdisplay desktopname guess_desktop -http_url auth users rootshift clipshift scale_str -scaled_x scaled_y scale_numer scale_denom +aro= noop display vncdisplay desktopname guess_desktop +http_url auth xauth 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 @@ -2364,7 +2387,13 @@ 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 +cdpy_x cdpy_y coff_x coff_y rfbauth passwd viewpasswd +.PP +\fB-QD\fR \fIvariable\fR +.IP +Just like \fB-query\fR variable, but returns the default +value for that parameter (no running x11vnc server +is consulted) .PP \fB-sync\fR .IP @@ -2374,7 +2403,7 @@ exits. Use \fB-sync\fR to have the program wait for an acknowledgement from the x11vnc server that command was processed (somehow). On the other hand \fB-query\fR requests are always processed synchronously because they have -to wait for the result. +to wait for the answer. .IP Also note that if both \fB-remote\fR and \fB-query\fR requests are supplied on the command line, the \fB-remote\fR is processed @@ -2419,7 +2448,7 @@ rawfb:setup:<cmd>) because they are associated with running external programs. If you specify \fB-unsafe,\fR then these remote-control commands are allowed. Note that you can still specify these parameters on the command -line, they just cannot be changed via remote-control. +line, they just cannot be invoked via remote-control. .PP \fB-safer\fR .IP diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c index 82c7f65..48e646d 100644 --- a/x11vnc/x11vnc.c +++ b/x11vnc/x11vnc.c @@ -166,6 +166,7 @@ * * -DHARDWIRE_PASSWD=... hardwired passwords, quoting necessary. * -DHARDWIRE_VIEWPASSWD=... + * -DNOPW=1 make -nopw the default (skip warning) * * -DWIREFRAME=0 to have -nowireframe as the default. * -DWIREFRAME_COPYRECT=0 to have -nowirecopyrect as the default. @@ -194,6 +195,10 @@ #define REMOTE_CONTROL 1 #endif +#ifndef NOPW +#define NOPW 0 +#endif + /* * Beginning of support for small binary footprint build for embedded * systems, PDA's etc. It currently just cuts out the low-hanging @@ -382,7 +387,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-07-09"; +char lastmod[] = "0.7.2 lastmod: 2005-07-10"; int hack_val = 0; /* X display info */ @@ -814,6 +819,7 @@ int deny_all = 0; /* global locking of new clients */ #define REMOTE_DEFAULT 1 #endif int accept_remote_cmds = REMOTE_DEFAULT; /* -noremote */ +int query_default = 0; int safe_remote_only = 1; /* -unsafe */ int priv_remote = 0; /* -privremote */ int more_safe = 0; /* -safer */ @@ -907,7 +913,7 @@ Display *gdpy_ctrl = NULL; int xserver_grabbed = 0; /* XXX CHECK BEFORE RELEASE */ -int grab_buster = 1; +int grab_buster = 0; int grab_buster_delay = 20; int sync_tod_delay = 3; pid_t grab_buster_pid = 0; @@ -5110,7 +5116,7 @@ char *crash_stack_command1 = NULL; char *crash_stack_command2 = NULL; char *crash_debug_command = NULL; /* XXX CHECK BEFORE RELEASE */ -int crash_debug = 1; +int crash_debug = 0; void initialize_crash_handler(void) { int pid = program_pid; @@ -6750,7 +6756,7 @@ void read_vnc_connect_prop(void) { ; } else if (strstr(vnc_connect_str, "cmd=") && strstr(vnc_connect_str, "passwd")) { - rfbLog("read VNC_CONNECT\n"); + rfbLog("read VNC_CONNECT: *\n"); } else if (strlen(vnc_connect_str) > 38) { char trim[100]; trim[0] = '\0'; @@ -7382,7 +7388,6 @@ int add_keysym(KeySym keysym) { static int first = 1; KeySym *keymap; - if (first) { for (n=0; n < 0x100; n++) { added_keysyms[n] = NoSymbol; @@ -12108,6 +12113,9 @@ void check_keycode_state(void) { if (! client_count) { return; } + + if (raw_fb && ! dpy) return; /* raw_fb hack */ + /* * periodically update our model of the keycode_state[] * by correlating with the Xserver. wait for a pause in @@ -12626,10 +12634,16 @@ int send_remote_cmd(char *cmd, int query, int wait) { return 0; } -int do_remote_query(char *remote_cmd, char *query_cmd, int remote_sync) { +int do_remote_query(char *remote_cmd, char *query_cmd, int remote_sync, + int qdefault) { char *rcmd = NULL, *qcmd = NULL; int rc = 1; + if (qdefault && !query_cmd) { + query_cmd = remote_cmd; + remote_cmd = NULL; + } + if (remote_cmd) { rcmd = (char *) malloc(strlen(remote_cmd) + 5); strcpy(rcmd, "cmd="); @@ -12640,6 +12654,16 @@ int do_remote_query(char *remote_cmd, char *query_cmd, int remote_sync) { strcpy(qcmd, "qry="); strcat(qcmd, query_cmd); } + if (qdefault) { + char *res; + if (!qcmd) { + return 1; + } + res = process_remote_cmd(qcmd, 1); + fprintf(stdout, "%s\n", res); + fflush(stdout); + return 0; + } if (rcmd && qcmd) { rc = send_remote_cmd(rcmd, 0, 1); @@ -13067,12 +13091,12 @@ char *process_remote_cmd(char *cmd, int stringonly) { int query = 0; static char *prev_cursors_mode = NULL; - if (! accept_remote_cmds) { + if (!query_default && !accept_remote_cmds) { rfbLog("remote commands disabled: %s\n", cmd); return NULL; } - if (priv_remote) { + if (!query_default && priv_remote) { if (! remote_control_access_ok()) { rfbLog("** Disabling remote commands in -privremote " "mode.\n"); @@ -13846,9 +13870,9 @@ char *process_remote_cmd(char *cmd, int stringonly) { } p += strlen("accept:"); if (safe_remote_only) { - if (icon_mode && !strcmp(p, "")) { + if (icon_mode && !strcmp(p, "")) { /* skip-cmd-list */ ; - } else if (icon_mode && !strcmp(p, "popup")) { + } else if (icon_mode && !strcmp(p, "popup")) { /* skip-cmd-list */ ; } else { rfbLog("unsafe: %s\n", p); @@ -15310,8 +15334,12 @@ char *process_remote_cmd(char *cmd, int stringonly) { int d; COLON_CHECK("deferupdate:") if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, - screen->deferUpdateTime); + if (!screen) { + d = defer_update; + } else { + d = screen->deferUpdateTime; + } + snprintf(buf, bufn, "ans=%s%s%d", p, co, d); goto qry; } p += strlen("deferupdate:"); @@ -15325,8 +15353,12 @@ char *process_remote_cmd(char *cmd, int stringonly) { int d; COLON_CHECK("defer:") if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, - screen->deferUpdateTime); + if (!screen) { + d = defer_update; + } else { + d = screen->deferUpdateTime; + } + snprintf(buf, bufn, "ans=%s%s%d", p, co, d); goto qry; } p += strlen("defer:"); @@ -15352,14 +15384,14 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "wait_bog")) { if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, wait_bog); + snprintf(buf, bufn, "ans=%s:%d", p, wait_bog); goto qry; } wait_bog = 1; rfbLog("remote_cmd: setting wait_bog to %d\n", wait_bog); } else if (!strcmp(p, "nowait_bog")) { if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, !wait_bog); + snprintf(buf, bufn, "ans=%s:%d", p, !wait_bog); goto qry; } wait_bog = 0; @@ -15539,8 +15571,12 @@ char *process_remote_cmd(char *cmd, int stringonly) { int f; COLON_CHECK("progressive:") if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, - screen->progressiveSliceHeight); + if (!screen) { + f = 0; + } else { + f = screen->progressiveSliceHeight; + } + snprintf(buf, bufn, "ans=%s%s%d", p, co, f); goto qry; } p += strlen("progressive:"); @@ -15551,10 +15587,10 @@ char *process_remote_cmd(char *cmd, int stringonly) { screen->progressiveSliceHeight = f; } else if (strstr(p, "rfbport") == p) { - int rp, orig = screen->port; + int rp, orig = screen ? screen->port : 5900; COLON_CHECK("rfbport:") if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, screen->port); + snprintf(buf, bufn, "ans=%s%s%d", p, co, orig); goto qry; } p += strlen("rfbport:"); @@ -15563,8 +15599,8 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "http")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - (screen->httpListenSock > -1)); + int ls = screen ? screen->httpListenSock : -1; + snprintf(buf, bufn, "ans=%s:%d", p, (ls > -1)); goto qry; } if (screen->httpListenSock > -1) { @@ -15577,8 +15613,8 @@ char *process_remote_cmd(char *cmd, int stringonly) { } } else if (!strcmp(p, "nohttp")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - !(screen->httpListenSock > -1)); + int ls = screen ? screen->httpListenSock : -1; + snprintf(buf, bufn, "ans=%s:%d", p, !(ls > -1)); goto qry; } if (screen->httpListenSock < 0) { @@ -15591,11 +15627,10 @@ char *process_remote_cmd(char *cmd, int stringonly) { } } else if (strstr(p, "httpport") == p) { - int hp, orig = screen->httpPort; + int hp, orig = screen ? screen->httpPort : 0; COLON_CHECK("httpport:") if (query) { - snprintf(buf, bufn, "ans=%s%s%d", p, co, - screen->httpPort); + snprintf(buf, bufn, "ans=%s%s%d", p, co, orig); goto qry; } p += strlen("httpport:"); @@ -15625,16 +15660,16 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "enablehttpproxy")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->httpEnableProxyConnect != 0); + int ht = screen ? screen->httpEnableProxyConnect : 0; + snprintf(buf, bufn, "ans=%s:%d", p, ht != 0); goto qry; } rfbLog("turning on enablehttpproxy.\n"); screen->httpEnableProxyConnect = 1; } else if (!strcmp(p, "noenablehttpproxy")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->httpEnableProxyConnect == 0); + int ht = screen ? screen->httpEnableProxyConnect : 0; + snprintf(buf, bufn, "ans=%s:%d", p, ht == 0); goto qry; } rfbLog("turning off enablehttpproxy.\n"); @@ -15642,16 +15677,16 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "alwaysshared")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->alwaysShared != 0); + int t = screen ? screen->alwaysShared : 0; + snprintf(buf, bufn, "ans=%s:%d", p, t != 0); goto qry; } rfbLog("turning on alwaysshared.\n"); screen->alwaysShared = 1; } else if (!strcmp(p, "noalwaysshared")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->alwaysShared == 0); + int t = screen ? screen->alwaysShared : 0; + snprintf(buf, bufn, "ans=%s:%d", p, t == 0); goto qry; } rfbLog("turning off alwaysshared.\n"); @@ -15659,16 +15694,16 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "nevershared")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->neverShared != 0); + int t = screen ? screen->neverShared : 1; + snprintf(buf, bufn, "ans=%s:%d", p, t != 0); goto qry; } rfbLog("turning on nevershared.\n"); screen->neverShared = 1; } else if (!strcmp(p, "noalwaysshared")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->neverShared == 0); + int t = screen ? screen->neverShared : 1; + snprintf(buf, bufn, "ans=%s:%d", p, t == 0); goto qry; } rfbLog("turning off nevershared.\n"); @@ -15676,16 +15711,16 @@ char *process_remote_cmd(char *cmd, int stringonly) { } else if (!strcmp(p, "dontdisconnect")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->dontDisconnect != 0); + int t = screen ? screen->dontDisconnect : 1; + snprintf(buf, bufn, "ans=%s:%d", p, t != 0); goto qry; } rfbLog("turning on dontdisconnect.\n"); screen->dontDisconnect = 1; } else if (!strcmp(p, "nodontdisconnect")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, - screen->dontDisconnect == 0); + int t = screen ? screen->dontDisconnect : 1; + snprintf(buf, bufn, "ans=%s:%d", p, t == 0); goto qry; } rfbLog("turning off dontdisconnect.\n"); @@ -15976,8 +16011,7 @@ char *process_remote_cmd(char *cmd, int stringonly) { snprintf(buf, bufn, "aro=%s:rawfb:%p", p, raw_fb_addr); } else if (! dpy) { - snprintf(buf, bufn, "aro=%s:%s", p, - "no-display"); + snprintf(buf, bufn, "aro=%s:", p); } else { char *d; d = DisplayString(dpy); @@ -15999,14 +16033,16 @@ char *process_remote_cmd(char *cmd, int stringonly) { snprintf(buf, bufn, "aro=%s:%s", p, NONUL(guess_desktop())); } else if (!strcmp(p, "http_url")) { - if (screen->httpListenSock > -1) { + if (!screen) { + snprintf(buf, bufn, "aro=%s:", p); + } else if (screen->httpListenSock > -1) { snprintf(buf, bufn, "aro=%s:http://%s:%d", p, NONUL(screen->thisHost), screen->httpPort); } else { snprintf(buf, bufn, "aro=%s:%s", p, "http_not_active"); } - } else if (!strcmp(p, "auth")) { + } else if (!strcmp(p, "auth") || !strcmp(p, "xauth")) { snprintf(buf, bufn, "aro=%s:%s", p, NONUL(auth_file)); } else if (!strcmp(p, "users")) { snprintf(buf, bufn, "aro=%s:%s", p, NONUL(users_list)); @@ -16145,6 +16181,8 @@ char *process_remote_cmd(char *cmd, int stringonly) { NOTAPPRO } else if (!strcmp(p, "passwd")) { NOTAPPRO + } else if (!strcmp(p, "viewpasswd")) { + NOTAPPRO } else { NOTAPP } @@ -20751,6 +20789,10 @@ char *guess_desktop() { return "root"; } + if (! dpy) { + return ""; + } + prop = XInternAtom(dpy, "XFCE_DESKTOP_WINDOW", True); if (prop != None) return "xfce"; @@ -23923,7 +23965,7 @@ char gui_code[] = ""; #endif void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui, - pid_t parent) { + pid_t parent, char *gui_opts) { char *x11vnc_xdisplay = NULL; char extra_path[] = ":/usr/local/bin:/usr/bin/X11:/usr/sfw/bin" ":/usr/X11R6/bin:/usr/openwin/bin:/usr/dt/bin"; @@ -24067,6 +24109,9 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui, if (simple_gui) { set_env("X11VNC_SIMPLE_GUI", "1"); } + if (gui_opts) { + set_env("X11VNC_GUI_PARAMS", gui_opts); + } if (gui_geometry) { set_env("X11VNC_GUI_GEOM", gui_geometry); } @@ -24159,7 +24204,7 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui, exit(0); } -void do_gui(char *opts) { +void do_gui(char *opts, int sleep) { char *s, *p; char *old_xauth = NULL; char *gui_xdisplay = NULL; @@ -24327,8 +24372,11 @@ void do_gui(char *opts) { perror("fork"); clean_up_exit(1); } else { + if (sleep > 0) { + usleep(sleep * 1000 * 1000); + } run_gui(gui_xdisplay, connect_to_x11vnc, simple_gui, - parent); + parent, opts); exit(1); } #else @@ -24338,7 +24386,7 @@ void do_gui(char *opts) { #endif } if (!start_x11vnc) { - run_gui(gui_xdisplay, connect_to_x11vnc, simple_gui, 0); + run_gui(gui_xdisplay, connect_to_x11vnc, simple_gui, 0, opts); exit(1); } if (old_xauth) { @@ -28755,7 +28803,11 @@ int get_rate(int which) { int count = 0; double slowest = -1.0, rate; static double save_rate = 1000 * NETRATE0; - + + if (!screen) { + return 0; + } + iter = rfbGetClientIterator(screen); while( (cl = rfbClientIteratorNext(iter)) ) { ClientData *cd = (ClientData *) cl->clientData; @@ -28811,6 +28863,10 @@ int get_latency(void) { static double save_lat = ((double) LATENCY0)/1000.0; int count = 0; + if (!screen) { + return 0; + } + iter = rfbGetClientIterator(screen); while( (cl = rfbClientIteratorNext(iter)) ) { ClientData *cd = (ClientData *) cl->clientData; @@ -29024,6 +29080,10 @@ void measure_send_rates(int init) { nclients = 0; + if (!screen) { + return; + } + iter = rfbGetClientIterator(screen); while( (cl = rfbClientIteratorNext(iter)) ) { int defer, i, cbs, rbs; @@ -29715,6 +29775,8 @@ static void print_help(int mode) { "\n" " vncviewer -encodings 'copyrect tight zrle hextile' localhost:0\n" "\n" +"Also, use of a VNC password (-rfbauth or -passwdfile) is strongly recommend.\n" +"\n" "For additional info see: http://www.karlrunge.com/x11vnc/\n" " and http://www.karlrunge.com/x11vnc/#faq\n" "\n" @@ -29724,9 +29786,10 @@ static void print_help(int mode) { "For each option name, the leading character \"-\" is not required. E.g. a\n" "line that is either \"forever\" or \"-forever\" may be used and are equivalent.\n" "Likewise \"wait 100\" or \"-wait 100\" are acceptable and equivalent lines.\n" -"The \"#\" character comments out to the end of the line in the usual way.\n" -"Leading and trailing whitespace is trimmed off. Lines may be continued with\n" -"a \"\\\" as the last character of a line (it becomes a space character).\n" +"The \"#\" character comments out to the end of the line in the usual way\n" +"(backslash it for a literal). Leading and trailing whitespace is trimmed off.\n" +"Lines may be continued with a \"\\\" as the last character of a line (it\n" +"becomes a space character).\n" "\n" "Options:\n" "\n" @@ -29793,19 +29856,18 @@ static void print_help(int mode) { " around transient popup menus (but not for the menu\n" " itself): a workaround is to disable SaveUnders\n" " by passing the \"-su\" argument to Xsun (in\n" -" /etc/dt/config/Xservers). Also note that the mouse\n" -" cursor shape is exactly correct in this mode.\n" +" /etc/dt/config/Xservers).\n" "\n" " Use -overlay as a workaround for situations like these:\n" " Some legacy applications require the default visual to\n" " be 8bpp (8+24), or they will use 8bpp PseudoColor even\n" " when the default visual is depth 24 TrueColor (24+8).\n" -" In these cases colors in some windows will be messed\n" -" up in x11vnc unless -overlay is used. Another use of\n" +" In these cases colors in some windows will be incorrect\n" +" in x11vnc unless -overlay is used. Another use of\n" " -overlay is to enable showing the exact mouse cursor\n" " shape (details below).\n" "\n" -" Under -overlay, performance will be somewhat degraded\n" +" Under -overlay, performance will be somewhat slower\n" " due to the extra image transformations required.\n" " For optimal performance do not use -overlay, but rather\n" " configure the X server so that the default visual is\n" @@ -29838,7 +29900,7 @@ static void print_help(int mode) { " More esoteric options: for compatibility with vncviewers\n" " the scaled width is adjusted to be a multiple of 4:\n" " to disable this use \":n4\". \":in\" use interpolation\n" -" scheme even when shrinking, \":pad\", pad scaled width\n" +" scheme even when shrinking, \":pad\" pad scaled width\n" " and height to be multiples of scaling denominator\n" " (e.g. 3 for 2/3).\n" "\n" @@ -29859,10 +29921,10 @@ static void print_help(int mode) { "-forever Keep listening for more connections rather than exiting\n" " as soon as the first client(s) disconnect. Same as -many\n" "-timeout n Exit unless a client connects within the first n seconds\n" -" of startup.\n" +" after startup.\n" "-inetd Launched by inetd(1): stdio instead of listening socket.\n" " Note: if you are not redirecting stderr to a log file\n" -" (via shell 2> or -o option) you must also specify the -q\n" +" (via shell 2> or -o option) you MUST also specify the -q\n" " option, otherwise the stderr goes to the viewer which\n" " will cause it to abort. Specifying both -inetd and -q\n" " and no -o will automatically close the stderr.\n" @@ -29880,7 +29942,7 @@ static void print_help(int mode) { " as a file to periodically check for new hosts.\n" " The first line is read and then the file is truncated.\n" " Be careful for this usage mode if x11vnc is running as\n" -" root (e.g. via inetd(1) or gdm(1)).\n" +" root (e.g. via gdm(1), etc).\n" "-vncconnect Monitor the VNC_CONNECT X property set by the standard\n" "-novncconnect VNC program vncconnect(1). When the property is\n" " set to \"host\" or \"host:port\" establish a reverse\n" @@ -29914,7 +29976,7 @@ static void print_help(int mode) { "-nolookup Do not use gethostbyname() or gethostbyaddr() to look up\n" " host names or IP numbers. Use this if name resolution\n" " is incorrectly set up and leads to long pauses as name\n" -" lookup times out, etc.\n" +" lookups time out, etc.\n" "\n" "-input string Fine tuning of allowed user input. If \"string\" does\n" " not contain a comma \",\" the tuning applies only to\n" @@ -29927,7 +29989,7 @@ static void print_help(int mode) { " the mouse and \"-input KMB,M\" lets normal users do\n" " anything and enables view-only users to move the mouse.\n" " This option is ignored when a global -viewonly is in\n" -" effect (all input is discarded).\n" +" effect (all input is discarded in that case).\n" "-viewpasswd string Supply a 2nd password for view-only logins. The -passwd\n" " (full-access) password must also be supplied.\n" "-passwdfile filename Specify libvncserver -passwd via the first line of the\n" @@ -29939,7 +30001,9 @@ static void print_help(int mode) { " Note: -passwdfile is a simple plaintext passwd, see\n" " also -rfbauth and -storepasswd below for obfuscated\n" " VNC password files. Neither file should be readable\n" -" by others.\n" +" by untrusted users.\n" +"-nopw Disable the big warning message when you use x11vnc\n" +" without some sort of password.\n" "-storepasswd pass file Store password \"pass\" as the VNC password in the\n" " file \"file\". Once the password is stored the\n" " program exits. Use the password via \"-rfbauth file\"\n" @@ -29972,7 +30036,7 @@ static void print_help(int mode) { " If \"string\" is \"popup\" then a builtin popup window\n" " is used. The popup will time out after 120 seconds,\n" " use \"popup:N\" to modify the timeout to N seconds\n" -" (use 0 for no timeout)\n" +" (use 0 for no timeout).\n" "\n" " If \"string\" is \"xmessage\" then an xmessage(1)\n" " invocation is used for the command. xmessage must be\n" @@ -29994,7 +30058,9 @@ static void print_help(int mode) { "\n" " Note that x11vnc blocks while the external command\n" " or popup is running (other clients may see no updates\n" -" during this period).\n" +" during this period). So a person sitting a the physical\n" +" display is needed to respond to an popup prompt. (use\n" +" a 2nd x11vnc if you lock yourself out).\n" "\n" " More -accept tricks: use \"popupmouse\" to only allow\n" " mouse clicks in the builtin popup to be recognized.\n" @@ -30111,11 +30177,12 @@ static void print_help(int mode) { " each rectangle.\n" "-xinerama If your screen is composed of multiple monitors\n" " glued together via XINERAMA, and that screen is\n" -" non-rectangular this option will try to guess the\n" +" not a rectangle this option will try to guess the\n" " areas to black out (if your system has libXinerama).\n" "\n" -" In general on XINERAMA displays you may need to use the\n" -" -xwarppointer option if the mouse pointer misbehaves.\n" +" In general, we have noticed on XINERAMA displays you\n" +" may need to use the \"-xwarppointer\" option if the mouse\n" +" pointer misbehaves.\n" "\n" "-xtrap Use the DEC-XTRAP extension for keystroke and mouse\n" " input insertion. For use on legacy systems, e.g. X11R5,\n" @@ -30174,7 +30241,7 @@ static void print_help(int mode) { "-?, -opts Only list the x11vnc options.\n" "-V, -version Print program version and last modification date.\n" "\n" -"-dbg instead of exiting after cleaning up, run a simple\n" +"-dbg Instead of exiting after cleaning up, run a simple\n" " \"debug crash shell\" when fatal errors are trapped.\n" "\n" "-q Be quiet by printing less informational output to\n" @@ -30195,10 +30262,6 @@ static void print_help(int mode) { " identical keyboards). Also useful in resolving cases\n" " where a Keysym is bound to multiple keys (e.g. \"<\" + \">\"\n" " and \",\" + \"<\" keys). Default: %s\n" -#if 0 -"-isolevel3 When in modtweak mode, always send ISO_Level3_Shift to\n" -" the X server instead of Mode_switch (AltGr).\n" -#endif "-xkb When in modtweak mode, use the XKEYBOARD extension (if\n" "-noxkb the X display supports it) to do the modifier tweaking.\n" " This is powerful and should be tried if there are still\n" @@ -30221,7 +30284,7 @@ static void print_help(int mode) { " Key that could give rise to extra unwanted characters\n" " (usually only between keyboards of different languages).\n" " Only use this option if you observe problems with\n" -" some keystrokes. This option may be extended.\n" +" some keystrokes.\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 same\n" " key, or 20 downs in a row for the same modifier key!\n" @@ -30231,11 +30294,11 @@ static void print_help(int mode) { " 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" -" Added Keysyms will be removed periodically and also\n" -" when x11vnc exits. Default: %s\n" +"-add_keysyms If a Keysym is received from a VNC viewer and that\n" +"-noadd_keysyms Keysym does not exist in the X server, then add the\n" +" Keysym to the X server's keyboard mapping on an unused\n" +" key. Added Keysyms will be removed periodically and\n" +" also when x11vnc exits. Default: %s\n" #if 0 "-xkbcompat Ignore the XKEYBOARD extension. Use as a workaround for\n" " some keyboard mapping problems. E.g. if you are using\n" @@ -30264,7 +30327,7 @@ static void print_help(int mode) { " Dead keys: \"dead\" (or silent, mute) keys are keys that\n" " do not produce a character but must be followed by a 2nd\n" " keystroke. This is often used for accenting characters,\n" -" e.g. to put \"'\" on top of \"a\" by pressing the dead\n" +" e.g. to put \"`\" on top of \"a\" by pressing the dead\n" " key and then \"a\". Note that this interpretation\n" " is not part of core X11, it is up to the toolkit or\n" " application to decide how to react to the sequence.\n" @@ -30310,7 +30373,7 @@ static void print_help(int mode) { "\n" " Use \"-norepeat N\" to set how many times norepeat will\n" " be reset if something else (e.g. X session manager)\n" -" disables it. The default is 2. Use a negative value\n" +" undoes it. The default is 2. Use a negative value\n" " for unlimited resets.\n" "\n" "-nofb Ignore video framebuffer: only process keyboard and\n" @@ -30353,7 +30416,7 @@ static void print_help(int mode) { " information from the X server, then the default is\n" " to use that mode. On Solaris this can be done with\n" " the SUN_OVL extension using -overlay (see also the\n" -" -overlay_nomouse option). A similar overlay scheme\n" +" -overlay_nocursor option). A similar overlay scheme\n" " is used on IRIX. Xorg (e.g. Linux) and recent Solaris\n" " Xsun servers support the XFIXES extension to retrieve\n" " the exact cursor shape from the X server. If XFIXES\n" @@ -30363,10 +30426,10 @@ static void print_help(int mode) { " option below.\n" " \n" " Note that under XFIXES cursors with transparency (alpha\n" -" channel) will not be exactly represented and one may\n" -" find Overlay preferable. See also the -alphacut and\n" -" -alphafrac options below as fudge factors to try to\n" -" improve the situation for cursors with transparency\n" +" channel) will usually not be exactly represented and one\n" +" may find Overlay preferable. See also the -alphacut\n" +" and -alphafrac options below as fudge factors to try\n" +" to improve the situation for cursors with transparency\n" " for a given theme.\n" "\n" " The \"mode\" string can be used to fine-tune the\n" @@ -30401,20 +30464,19 @@ static void print_help(int mode) { "\n" "-arrow n Choose an alternate \"arrow\" cursor from a set of\n" " some common ones. n can be 1 to %d. Default is: %d\n" +" Ignored when in XFIXES cursor-grabbing mode.\n" "\n" "-noxfixes Do not use the XFIXES extension to draw the exact cursor\n" " shape even if it is available.\n" "-alphacut n When using the XFIXES extension for the cursor shape,\n" -" cursors with transparency will not be displayed exactly\n" -" (but opaque ones will). This option sets n as a cutoff\n" -" for cursors that have transparency (\"alpha channel\"\n" -" with values ranging from 0 to 255) Any cursor pixel with\n" -" alpha value less than n becomes completely transparent.\n" -" Otherwise the pixel is completely opaque. Default %d\n" +" cursors with transparency will not usually be displayed\n" +" exactly (but opaque ones will). This option sets n as\n" +" a cutoff for cursors that have transparency (\"alpha\n" +" channel\" with values ranging from 0 to 255) Any cursor\n" +" pixel with alpha value less than n becomes completely\n" +" transparent. Otherwise the pixel is completely opaque.\n" +" Default %d\n" " \n" -" Note: the options -alphacut, -alphafrac, and -alphafrac\n" -" may be removed if a more accurate internal method for\n" -" handling cursor transparency is implemented.\n" "-alphafrac fraction With the threshold in -alphacut some cursors will become\n" " almost completely transparent because their alpha values\n" " are not high enough. For those cursors adjust the\n" @@ -30474,7 +30536,7 @@ static void print_help(int mode) { " (mouse button held down). Greatly improves response on\n" " slow setups, but you lose all visual feedback for drags,\n" " text selection, and some menu traversals. It overrides\n" -" any -pointer_mode setting\n" +" any -pointer_mode setting.\n" "\n" "-wireframe [str] Try to detect window moves or resizes when a mouse\n" "-nowireframe button is held down and show a wireframe instead of\n" @@ -30527,8 +30589,9 @@ static void print_help(int mode) { " or being resized (for some window managers this can be\n" " rather long), t3 is how long to keep a wireframe moving\n" " before repainting the window. t4 is the minimum time\n" -" between sending wireframe \"animations\". For a slow\n" -" link this might be a better choice: 0.25+0.6+6.0+0.15\n" +" between sending wireframe \"animations\". If a slow\n" +" link is detected, these values may be automatically\n" +" changed to something better for a slow link.\n" "\n" "-wirecopyrect mode Since the -wireframe mechanism evidently tracks moving\n" "-nowirecopyrect windows accurately, a speedup can be obtained by\n" @@ -30755,9 +30818,9 @@ 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 (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" +" You can use 3 Alt_L's (the Left \"Alt\" key) taps in a\n" +" row described under -scrollcopyrect instead to manually\n" +" request a screen repaint when it is needed.\n" "\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" @@ -30782,34 +30845,39 @@ static void print_help(int mode) { "\n" "-grab_buster Some of the use of the RECORD extension can leave a\n" "-nograb_buster tiny window for XGrabServer deadlock. This is only if\n" -" the whole-server grabbing application expects mouse\n" -" or keyboard input before releasing the grab. It is\n" -" usually a window manager that does this. x11vnc takes\n" -" care to avoid the the problem, but if caught x11vnc\n" -" will freeze. Without -grab_buster, the only solution\n" -" is to go the physical display and give it some input\n" -" to satisfy the grabbing app. Or manually kill and\n" -" restart the window manager. With -grab_buster, x11vnc\n" +" the whole-server grabbing application expects mouse or\n" +" keyboard input before releasing the grab. It is usually\n" +" a window manager that does this. x11vnc takes care to\n" +" avoid the the problem, but if caught x11vnc will freeze.\n" +" Without -grab_buster, the only solution is to go the\n" +" physical display and give it some input to satisfy the\n" +" grabbing app. Or manually kill and restart the window\n" +" manager if that is feasible. With -grab_buster, x11vnc\n" " will fork a helper thread and if x11vnc appears to be\n" -" stuck in a grab after a period of time (20-30 sec)\n" -" then it will inject some user input: button clicks,\n" -" Escape, mouse motion, etc to try to break the grab.\n" +" stuck in a grab after a period of time (20-30 sec) then\n" +" it will inject some user input: button clicks, Escape,\n" +" mouse motion, etc to try to break the grab. If you\n" +" experience a lot of grab deadlock, please report a bug.\n" "\n" "-debug_grabs Turn on debugging info printout with respect to\n" " XGrabServer() deadlock for -scrollcopyrect mode.\n" "\n" "-pointer_mode n Various pointer motion update schemes. \"-pm\" is\n" " an alias. The problem is pointer motion can cause\n" -" rapid changes on the screen: consider the rapid changes\n" -" when you drag a large window around. Neither x11vnc's\n" -" screen polling and vnc compression routines nor the\n" -" bandwidth to the vncviewers can keep up these rapid\n" -" screen changes: everything will bog down when dragging\n" -" or scrolling. So a scheme has to be used to \"eat\"\n" -" much of that pointer input before re-polling the screen\n" -" and sending out framebuffer updates. The mode number\n" -" \"n\" can be 0 to %d and selects one of the schemes\n" -" desribed below.\n" +" rapid changes on the screen: consider the rapid\n" +" changes when you drag a large window around opaquely.\n" +" Neither x11vnc's screen polling and vnc compression\n" +" routines nor the bandwidth to the vncviewers can keep\n" +" up these rapid screen changes: everything will bog down\n" +" when dragging or scrolling. So a scheme has to be used\n" +" to \"eat\" much of that pointer input before re-polling\n" +" the screen and sending out framebuffer updates. The\n" +" mode number \"n\" can be 0 to %d and selects one of\n" +" the schemes desribed below.\n" +"\n" +" Note that the -wireframe and -scrollcopyrect modes\n" +" complement -pointer_mode by detecting (and improving)\n" +" certain periods of \"rapid screen change\".\n" "\n" " n=0: does the same as -nodragging. (all screen polling\n" " is suspended if a mouse button is pressed.)\n" @@ -30851,22 +30919,23 @@ static void print_help(int mode) { "\n" "-speeds rd,bw,lat x11vnc tries to estimate some speed parameters that\n" " are used to optimize scheduling (e.g. -pointer_mode\n" -" 4) and other things. Use the -speeds option to set\n" -" these manually. The triple \"rd,bw,lat\" corresponds\n" -" to video h/w read rate in MB/sec, network bandwidth to\n" -" clients in KB/sec, and network latency to clients in\n" -" milliseconds, respectively. If a value is left blank,\n" -" e.g. \"-speeds ,100,15\", then the internal scheme is\n" -" used to estimate the empty value(s).\n" +" 4, -wireframe, -scrollcopyrect) and other things.\n" +" Use the -speeds option to set these manually.\n" +" The triple \"rd,bw,lat\" corresponds to video h/w\n" +" read rate in MB/sec, network bandwidth to clients in\n" +" KB/sec, and network latency to clients in milliseconds,\n" +" respectively. If a value is left blank, e.g. \"-speeds\n" +" ,100,15\", then the internal scheme is used to estimate\n" +" the empty value(s).\n" "\n" " Typical PC video cards have read rates of 5-10 MB/sec.\n" " If the framebuffer is in main memory instead of video\n" -" h/w (e.g. SunRay, shadowfb, Xvfb), the read rate may\n" -" be much faster. \"x11perf -getimage500\" can be used\n" -" to get a lower bound (remember to factor in the bytes\n" -" per pixel). It is up to you to estimate the network\n" -" bandwith and latency to clients. For the latency the\n" -" ping(1) command can be used.\n" +" h/w (e.g. SunRay, shadowfb, dummy driver, Xvfb), the\n" +" read rate may be much faster. \"x11perf -getimage500\"\n" +" can be used to get a lower bound (remember to factor\n" +" in the bytes per pixel). It is up to you to estimate\n" +" the network bandwith and latency to clients. For the\n" +" latency the ping(1) command can be used.\n" "\n" " For convenience there are some aliases provided,\n" " e.g. \"-speeds modem\". The aliases are: \"modem\" for\n" @@ -30901,7 +30970,7 @@ static void print_help(int mode) { " text output. By default x11vnc will try to detect this\n" " (3 screen polls in a row each longer than 0.25 sec with\n" " no user input), and sleep up to 1.5 secs to let things\n" -" \"catch up\". Use this option to disable the detection.\n" +" \"catch up\". Use this option to disable that detection.\n" "-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On\n" " slow links that take a long time to paint the first\n" " screen libvncserver may hit the timeout and drop the\n" @@ -30948,7 +31017,8 @@ static void print_help(int mode) { " \"ignore\" or \"exit\". For \"ignore\" libvncserver\n" " will handle the abrupt loss of a client and continue,\n" " for \"exit\" x11vnc will cleanup and exit at the 1st\n" -" broken connection. Default: \"ignore\".\n" +" broken connection. Default: \"ignore\". This option\n" +" is obsolete.\n" "-threads Whether or not to use the threaded libvncserver\n" "-nothreads algorithm [rfbRunEventLoop] if libpthread is available\n" " Default: %s\n" @@ -30968,7 +31038,7 @@ static void print_help(int mode) { " memory and examine that copy for changes. Under some\n" " circumstances this will improve interactive response,\n" " or at least make things look smoother, but in others\n" -" (many) it will make the response worse. If the video\n" +" (most!) it will make the response worse. If the video\n" " h/w fb is such that reading small tiles is very slow\n" " this mode could help. To keep the \"framerate\" up\n" " the screen size x bpp cannot be too large. Note that\n" @@ -31006,17 +31076,18 @@ static void print_help(int mode) { "\n" " (see ipcs(1) and fbset(1) for the first two examples)\n" "\n" -" All user input is discarded. Most of the X11 (screen,\n" -" keyboard, mouse) options do not make sense and many\n" -" will cause this mode to crash, so please think twice\n" -" before setting/changing them.\n" +" All user input is discarded by default (but see the\n" +" -pipeinput option). Most of the X11 (screen, keyboard,\n" +" mouse) options do not make sense and many will cause\n" +" this mode to crash, so please think twice before\n" +" setting/changing them.\n" "\n" " If you don't want x11vnc to close the X DISPLAY in\n" " rawfb mode, then capitalize the prefix, SHM:, MAP:,\n" " FILE: Keeping the display open enables the default\n" " remote-control channel, which could be useful. Also,\n" " if you also specify -noviewonly, then the mouse and\n" -" keyboard input are still sent to the X display, this\n" +" keyboard input are STILL sent to the X display, this\n" " usage should be very rare, i.e. doing something strange\n" " with /dev/fb0.\n" "\n" @@ -31040,9 +31111,10 @@ static void print_help(int mode) { "-gui [gui-opts] Start up a simple tcl/tk gui based on the the remote\n" " control options -remote/-query described below.\n" " Requires the \"wish\" program to be installed on the\n" -" machine. \"gui-opts\" is not required: the default is\n" -" to start up both the gui and x11vnc with the gui showing\n" -" up on the X display in the environment variable DISPLAY.\n" +" machine. \"gui-opts\" is not required: the default\n" +" is to start up both the full gui and x11vnc with the\n" +" gui showing up on the X display in the environment\n" +" variable DISPLAY.\n" "\n" " \"gui-opts\" can be a comma separated list of items.\n" " Currently there are these types of items: 1) a gui\n" @@ -31075,15 +31147,16 @@ static void print_help(int mode) { " If you do not specify a gui X display in \"gui-opts\"\n" " then the DISPLAY environment variable and -display\n" " option are tried (in that order). Regarding the x11vnc\n" -" X display the gui will try to connect to, it first\n" -" tries -display and then DISPLAY. For example, \"x11vnc\n" -" -display :0 -gui otherhost:0\", will remote control an\n" -" x11vnc polling :0 and display the gui on otherhost:0\n" -" The \"tray\" mode below reverses this preference.\n" +" X display the gui will try to communication with, it\n" +" first tries -display and then DISPLAY. For example,\n" +" \"x11vnc -display :0 -gui otherhost:0\", will remote\n" +" control an x11vnc polling :0 and display the gui on\n" +" otherhost:0 The \"tray/icon\" mode below reverses this\n" +" preference, preferring to display on the x11vnc display.\n" "\n" " 4) When \"tray\" or \"icon\" is specified, the gui\n" " presents itself as a small icon with behavior typical\n" -" of a \"system tray\" or \"dock\" applet. The color\n" +" of a \"system tray\" or \"dock applet\". The color\n" " of the icon indicates status (connected clients) and\n" " there is also a balloon status. Clicking on the icon\n" " gives a menu from which properties, etc, can be set and\n" @@ -31093,7 +31166,7 @@ static void print_help(int mode) { "\n" " For \"icon\" the gui just a small standalone window.\n" " For \"tray\" it will attempt to embed itself in the\n" -" \"system tray\". If \"=setpass\" is appended then\n" +" \"system tray\" if possible. If \"=setpass\" is appended then\n" " at startup the X11 user will be prompted to set the\n" " VNC session password. If =<hexnumber> is appended\n" " that icon will attempt to embed itself in the window\n" @@ -31119,6 +31192,7 @@ static void print_help(int mode) { " General examples of the -gui option: \"x11vnc -gui\",\n" " \"x11vnc -gui ez\" \"x11vnc -gui localhost:10\",\n" " \"x11vnc -gui conn,host:0\", \"x11vnc -gui tray,ez\"\n" +" \"x11vnc -gui tray=setpass\"\n" "\n" " If you do not intend to start x11vnc from the gui\n" " (i.e. just remote control an existing one), then the\n" @@ -31149,10 +31223,6 @@ static void print_help(int mode) { " 'x11vnc -R shared' will enable shared connections, and\n" " 'x11vnc -R scale:3/4' will rescale the desktop.\n" "\n" -" Note: the more drastic the change induced by the -remote\n" -" command, the bigger the chance for bugs or crashes.\n" -" Please report reproducible bugs.\n" -"\n" " The following -remote/-R commands are supported:\n" "\n" " stop terminate the server, same as \"quit\"\n" @@ -31251,7 +31321,7 @@ static void print_help(int mode) { " rectangle use \"-WxH+X+Y\" to delete one\n" " xinerama enable -xinerama mode. (if applicable)\n" " noxinerama disable -xinerama mode.\n" -" xtrap enable -xtrap input mode.\n" +" xtrap enable -xtrap input mode(if applicable)\n" " noxtrap disable -xtrap input mode.\n" " xrandr enable -xrandr mode. (if applicable)\n" " noxrandr disable -xrandr mode.\n" @@ -31333,7 +31403,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" +" 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" @@ -31426,16 +31496,24 @@ 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" " truecolor notruecolor overlay nooverlay overlay_cursor\n" " overlay_yescursor nooverlay_nocursor nooverlay_cursor\n" " nooverlay_yescursor overlay_nocursor visual scale\n" -" scale_cursor viewonly noviewonly shared noshared forever\n" -" noforever once timeout deny lock nodeny unlock connect\n" -" allowonce allow localhost nolocalhost listen lookup\n" -" nolookup accept popup gone shm noshm flipbyteorder\n" +" scale_cursor viewonly noviewonly shared noshared\n" +" forever noforever once timeout deny lock nodeny unlock\n" +" connect allowonce allow localhost nolocalhost listen\n" +" lookup nolookup accept gone shm noshm flipbyteorder\n" " noflipbyteorder onetile noonetile solid_color solid\n" " nosolid blackout xinerama noxinerama xtrap noxtrap\n" " xrandr noxrandr xrandr_mode padgeom quiet q noquiet\n" @@ -31469,9 +31547,9 @@ static void print_help(int mode) { " debug_tiles dbt nodebug_tiles nodbt debug_tiles\n" " debug_grabs nodebug_grabs dbg nodbg noremote\n" "\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" +" aro= noop display vncdisplay desktopname guess_desktop\n" +" http_url auth xauth users rootshift clipshift\n" +" scale_str 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" @@ -31481,7 +31559,11 @@ static void print_help(int mode) { " 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" +" cdpy_x cdpy_y coff_x coff_y rfbauth passwd viewpasswd\n" +"\n" +"-QD variable Just like -query variable, but returns the default\n" +" value for that parameter (no running x11vnc server\n" +" is consulted)\n" "\n" "-sync By default -remote commands are run asynchronously, that\n" " is, the request is posted and the program immediately\n" @@ -31489,7 +31571,7 @@ static void print_help(int mode) { " acknowledgement from the x11vnc server that command was\n" " processed (somehow). On the other hand -query requests\n" " are always processed synchronously because they have\n" -" to wait for the result.\n" +" to wait for the answer.\n" "\n" " Also note that if both -remote and -query requests are\n" " supplied on the command line, the -remote is processed\n" @@ -31530,7 +31612,7 @@ static void print_help(int mode) { " running external programs. If you specify -unsafe, then\n" " these remote-control commands are allowed. Note that\n" " you can still specify these parameters on the command\n" -" line, they just cannot be changed via remote-control.\n" +" line, they just cannot be invoked via remote-control.\n" "-safer Equivalent to: -novncconnect -noremote and prohibiting\n" " -gui and the -connect file. Shuts off communcation\n" " channels.\n" @@ -31773,7 +31855,7 @@ static int argc2 = 0; static char **argv2; static void check_rcfile(int argc, char **argv) { - int i, pwlast, norc = 0, argmax = 1024; + int i, j, pwlast, norc = 0, argmax = 1024; char *infile = NULL; char rcfile[1024]; FILE *rc; @@ -31787,6 +31869,9 @@ static void check_rcfile(int argc, char **argv) { if (!strcmp(argv[i], "-norc")) { norc = 1; } + if (!strcmp(argv[i], "-QD")) { + norc = 1; + } if (!strcmp(argv[i], "-rc")) { if (i+1 >= argc) { fprintf(stderr, "-rc option requires a " @@ -31833,7 +31918,7 @@ static void check_rcfile(int argc, char **argv) { if (! norc) { char line[4096], parm[100], tmp[101]; - char *buf; + char *buf, *tbuf; struct stat sbuf; int sz; @@ -31848,13 +31933,28 @@ static void check_rcfile(int argc, char **argv) { } buf = (char *) malloc(sz); + buf[0] = '\0'; while (fgets(line, 4096, rc) != NULL) { char *q, *p = line; - char c = '\0'; + char c; int cont = 0; q = p; + c = '\0'; + while (*q) { + if (*q == '#') { + if (c != '\\') { + *q = '\0'; + break; + } + } + c = *q; + q++; + } + + q = p; + c = '\0'; while (*q) { if (*q == '\n') { if (c == '\\') { @@ -31875,9 +31975,19 @@ static void check_rcfile(int argc, char **argv) { c = *q; q++; } - if ( (q = strchr(p, '#')) != NULL) { - *q = '\0'; + if (q != p) { + if (*q == '\0') { + q--; + } + while (isspace(*q)) { + *q = '\0'; + if (q == p) { + break; + } + q--; + } } + p = lblanks(p); strncat(buf, p, sz - strlen(buf) - 1); @@ -31888,6 +31998,22 @@ static void check_rcfile(int argc, char **argv) { continue; } + i = 0; + q = buf; + while (*q) { + i++; + if (*q == '\n' || isspace(*q)) { + break; + } + q++; + } + + if (i >= 100) { + fprintf(stderr, "invalid rcfile line: %s/%s\n", + p, buf); + exit(1); + } + if (sscanf(buf, "%s", parm) != 1) { fprintf(stderr, "invalid rcfile line: %s\n", p); exit(1); @@ -31908,12 +32034,26 @@ static void check_rcfile(int argc, char **argv) { p = buf; p += strlen(parm); p = lblanks(p); + if (*p == '\0') { buf[0] = '\0'; continue; } - argv2[argc2++] = strdup(p); + tbuf = (char *) calloc(strlen(p) + 1, 1); + + j = 0; + while (*p) { + if (*p == '\\' && *(p+1) == '#') { + ; + } else { + tbuf[j++] = *p; + } + p++; + } + + argv2[argc2++] = strdup(tbuf); + free(tbuf); if (argc2 >= argmax) { fprintf(stderr, "too many rcfile options\n"); exit(1); @@ -32052,6 +32192,77 @@ void xopen_display_fail_message(char *disp) { fprintf(stderr, "See also: http://www.karlrunge.com/x11vnc/#faq\n"); } +void nopassword_warning_msg(int gotloc) { + + char str1[] = +"###############################################################\n" +"#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#\n" +"#@ @#\n" +"#@ ** WARNING ** WARNING ** WARNING ** WARNING ** @#\n" +"#@ @#\n" +"#@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @#\n" +"#@ @#\n" +"#@ This means anyone with network access to this computer @#\n" +"#@ will be able to easily view and control your desktop. @#\n" +"#@ @#\n" +"#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#\n" +"#@ @#\n" +"#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#\n" +; + char str2[] = +"#@ @#\n" +"#@ You can create an x11vnc password file by running: @#\n" +"#@ @#\n" +"#@ x11vnc -storepasswd password /path/to/passfile @#\n" +"#@ @#\n" +"#@ and then starting x11vnc via: @#\n" +"#@ @#\n" +"#@ x11vnc -rfbauth /path/to/passfile @#\n" +"#@ @#\n" +"#@ an existing ~/.vnc/passwd file will work too. @#\n" +"#@ @#\n" +"#@ You can also use the -passwdfile or -passwd options. @#\n" +"#@ (note -passwd is unsafe if local users are not trusted) @#\n" +"#@ @#\n" +"#@ Make sure any -rfbauth and -passwdfile password files @#\n" +"#@ cannot be read by untrusted users. @#\n" +"#@ @#\n" +"#@ Please Read the documention for more info about @#\n" +"#@ passwords, security, and encryption. @#\n" +; + char str3[] = +"#@ @#\n" +"#@ You are using the -localhost option and that is a good @#\n" +"#@ thing!! Especially if you ssh(1) into this machine and @#\n" +"#@ use port redirection. Nevertheless, without a password @#\n" +"#@ other users could possibly do redirection as well to @#\n" +"#@ gain access to your desktop. @#\n" +; + char str4[] = +"#@ @#\n" +"#@ To disable this warning use the -nopw option, or put @#\n" +"#@ the setting in your ~/.x11vncrc file. @#\n" +"#@ @#\n" +"#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#\n" +"###############################################################\n" +; + if (quiet) { + return; + } + + fprintf(stderr, "%s", str1); + fflush(stderr); + usleep(2500 * 1000); + fprintf(stderr, "%s", str2); + if (gotloc) { + fprintf(stderr, "%s", str3); + } + fprintf(stderr, "%s", str4); + fflush(stderr); + usleep(500 * 1000); + +} + int main(int argc, char* argv[]) { int i, len, tmpi; @@ -32061,7 +32272,9 @@ int main(int argc, char* argv[]) { char *remote_cmd = NULL; char *query_cmd = NULL; char *gui_str = NULL; - int pw_loc = -1, got_passwd = 0, got_rfbauth = 0; + int pw_loc = -1, got_passwd = 0, got_rfbauth = 0, nopw = NOPW; + int got_viewpasswd = 0, got_localhost = 0, got_passwdfile = 0; + int running_without_passwd = 0; int vpw_loc = -1; int dt = 0, bg = 0; int got_rfbwait = 0; @@ -32222,6 +32435,7 @@ int main(int argc, char* argv[]) { allow_list = strdup(argv[++i]); } else if (!strcmp(arg, "-localhost")) { allow_list = strdup("127.0.0.1"); + got_localhost = 1; } else if (!strcmp(arg, "-nolookup")) { host_lookup = 0; } else if (!strcmp(arg, "-input")) { @@ -32231,9 +32445,13 @@ int main(int argc, char* argv[]) { vpw_loc = i; CHECK_ARGC viewonly_passwd = strdup(argv[++i]); + got_viewpasswd = 1; } else if (!strcmp(arg, "-passwdfile")) { CHECK_ARGC passwdfile = strdup(argv[++i]); + got_passwdfile = 1; + } else if (!strcmp(arg, "-nopw")) { + nopw = 1; } else if (!strcmp(arg, "-storepasswd")) { if (i+2 >= argc || rfbEncryptAndStorePasswd(argv[i+1], argv[i+2]) != 0) { @@ -32657,6 +32875,10 @@ int main(int argc, char* argv[]) { query_cmd = strdup(argv[++i]); quiet = 1; xkbcompat = 0; + } else if (!strcmp(arg, "-QD")) { + CHECK_ARGC + query_cmd = strdup(argv[++i]); + query_default = 1; } else if (!strcmp(arg, "-sync")) { remote_sync = 1; } else if (!strcmp(arg, "-nosync")) { @@ -32715,9 +32937,15 @@ int main(int argc, char* argv[]) { } } } - + if (!got_passwd && !got_rfbauth && !got_passwdfile && !nopw) { + running_without_passwd = 1; + } if (launch_gui) { - do_gui(gui_str); + int sleep = 0; + if (running_without_passwd && !quiet) { + sleep = 3; + } + do_gui(gui_str, sleep); } if (logfile) { int n; @@ -32768,12 +32996,18 @@ int main(int argc, char* argv[]) { } } - if (client_connect_file && (remote_cmd || query_cmd)) { - /* no need to open DISPLAY, just write it to the file now */ - int rc = do_remote_query(remote_cmd, query_cmd, remote_sync); - fflush(stderr); - fflush(stdout); - exit(rc); + if (remote_cmd || query_cmd) { + /* + * no need to open DISPLAY, just write it to the file now + * similar for query_default. + */ + if (client_connect_file || query_default) { + int rc = do_remote_query(remote_cmd, query_cmd, + remote_sync, query_default); + fflush(stderr); + fflush(stdout); + exit(rc); + } } @@ -32888,6 +33122,10 @@ int main(int argc, char* argv[]) { exit(1); } + if (!got_passwd && !got_rfbauth && !got_passwdfile && !nopw) { + nopassword_warning_msg(got_localhost); + } + if (more_safe) { if (! quiet) { rfbLog("-safer mode:\n"); @@ -33283,7 +33521,8 @@ int main(int argc, char* argv[]) { } if (remote_cmd || query_cmd) { - int rc = do_remote_query(remote_cmd, query_cmd, remote_sync); + int rc = do_remote_query(remote_cmd, query_cmd, remote_sync, + query_default); XFlush(dpy); fflush(stderr); fflush(stdout); @@ -33667,6 +33906,13 @@ int main(int argc, char* argv[]) { } if (! quiet) { rfbLog("screen setup finished.\n"); + if (!got_passwd && !got_rfbauth && !got_passwdfile && !nopw) { + rfbLog("\n"); + rfbLog("WARNING: You are running x11vnc WITHOUT" + " a password. See\n"); + rfbLog("WARNING: the warning message printed above" + " for more info.\n"); + } } set_vnc_desktop_name(); |