summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--x11vnc/ChangeLog11
-rw-r--r--x11vnc/README1170
-rwxr-xr-xx11vnc/tkx11vnc41
-rw-r--r--x11vnc/tkx11vnc.h41
-rw-r--r--x11vnc/x11vnc.186
-rw-r--r--x11vnc/x11vnc.c1066
7 files changed, 1700 insertions, 718 deletions
diff --git a/ChangeLog b/ChangeLog
index 543839f..6880d13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2005-03-12 Karl Runge <runge@karlrunge.com>
+ * x11vnc: X DAMAGE support, -clip WxH+X+Y, identd.
+
2005-03-05 Karl Runge <runge@karlrunge.com>
* autoconf: rpm -> rpmbuild and echo -n -> printf
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog
index 751c5ff..b3c7b3a 100644
--- a/x11vnc/ChangeLog
+++ b/x11vnc/ChangeLog
@@ -1,3 +1,14 @@
+2005-03-12 Karl Runge <runge@karlrunge.com>
+ * support for the X DAMAGE extension to receive damage
+ rectangle reports from the X server. On by default, disable
+ with -noxdamage. Currently only trusts small rects
+ (but see -xd_area n) and uses the rest as "hints" for the
+ scanline polling.
+ * -clip WxH+X+Y to show a clipped sub-region of the screen.
+ * use RFC 1413 (identd) to attach a name to a client in
+ friendly environments.
+ * fix XAUTHORITY wrt '-auth ... -gui other:0'.
+
2005-03-04 Karl Runge <runge@karlrunge.com>
* add changes to couple with -listen option, in particular
the behavior of -localhost and remote control cmds.
diff --git a/x11vnc/README b/x11vnc/README
index 86fdc67..0c79bb3 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Fri Mar 4 20:24:54 EST 2005
+x11vnc README file Date: Sat Mar 12 18:06:15 EST 2005
The following information is taken from these URLs:
@@ -13,8 +13,8 @@ http://www.karlrunge.com/x11vnc/index.html:
_________________________________________________________________
-x11vnc: a VNC server for real X displays (to [1]FAQ) (to [2]downloads)
-(to [3]building)
+x11vnc: a VNC server for real X displays (to [1]FAQ) (to [2]Downloads)
+(to [3]Building)
x11vnc allows one to remotely view and interact with real X displays
(i.e. a display corresponding to a physical monitor, keyboard, and
@@ -356,7 +356,8 @@ vncviewer -via $host localhost:0 # must be TightVNC vncviewer.
Note: Currently gcc is required to build libvncserver. In some cases
it will build with non-gcc compilers, but the resulting binary often
fails to run properly. For Solaris pre-built gcc binaries are at
- [43]http://www.sunfreeware.com/
+ [43]http://www.sunfreeware.com/ However, one user reports it does
+ work fine when built with Sun Studio 10, so YMMV.
_________________________________________________________________
@@ -370,11 +371,14 @@ vncviewer -via $host localhost:0 # must be TightVNC vncviewer.
makes a noticeable difference over a fast LAN.
- Shortcuts: On Solaris 10 you can pick up everything just by insuring
- that your PATH has /usr/sfw/bin (for gcc) and /usr/ccs/bin (for other
- build tools), e.g.:
+ Shortcuts: On Solaris 10 you can pick up almost everything just by
+ insuring that your PATH has /usr/sfw/bin (for gcc) and /usr/ccs/bin
+ (for other build tools), e.g.:
env PATH=/usr/sfw/bin:/usr/ccs/bin:$PATH sh -c './configure; make'
+ (The only this misses is /usr/X11/lib/libXrandr.so.2, which is for the
+ little used -xrandr option, see the script below to add it).
+
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
@@ -426,6 +430,10 @@ LDFLAGS="-L $JPEG/lib -R $JPEG/lib -L $ZLIB/lib -R $ZLIB/lib"
CPPFLAGS="$CPPFLAGS -I /usr/openwin/include"
LDFLAGS="$LDFLAGS -L /usr/openwin/lib -R /usr/openwin/lib"
+# These are for libXrandr.so on Solaris 10:
+CPPFLAGS="$CPPFLAGS -I /usr/X11/include"
+LDFLAGS="$LDFLAGS -L /usr/X11/lib -R /usr/X11/lib"
+
# Everything needs to built with _REENTRANT for thread safe errno:
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
@@ -679,8 +687,8 @@ make
[64]Q-2: I can't get x11vnc and/or libvncserver to compile.
- [65]Q-3: Help, I need to run x11vnc on Solaris 2.5.1 and it doesn't
- compile!
+ [65]Q-3: Help, I need to run x11vnc on Solaris 2.5.1 (or other old
+ Unix/Linux) and it doesn't compile!
[66]Q-4: Where can I get a precompiled x11vnc binary for my Operating
System?
@@ -843,89 +851,95 @@ make
down things really bog down (unless I do the drag in a single, quick
motion). Is there anything to do to improve things?
+ [108]Q-46: Does x11vnc support the X DAMAGE Xserver extension to find
+ modified regions of the screen quickly and efficiently?
+
[Mouse Cursor Shapes]
- [108]Q-46: Why isn't the mouse cursor shape (the little icon shape
+ [109]Q-47: Why isn't the mouse cursor shape (the little icon shape
where the mouse pointer is) correct as I move from window to window?
- [109]Q-47: When using XFIXES cursorshape mode, some of the cursors
+ [110]Q-48: 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?
- [110]Q-48: In XFIXES mode, are there any hacks to handle cursor
+ [111]Q-49: In XFIXES mode, are there any hacks to handle cursor
transparency ("alpha channel") exactly?
[Mouse Pointer]
- [111]Q-49: Why does the mouse arrow just stay in one corner in my
+ [112]Q-50: Why does the mouse arrow just stay in one corner in my
vncviewer, whereas my cursor (that does move) is just a dot?
- [112]Q-50: Can I take advantage of the TightVNC extension to the VNC
+ [113]Q-51: 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)?
- [113]Q-51: Is it possible to swap the mouse buttons (e.g. left-handed
+ [114]Q-52: 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]
- [114]Q-52: How can I get my AltGr and Shift modifiers to work between
+ [115]Q-53: How can I get my AltGr and Shift modifiers to work between
keyboards for different languages?
- [115]Q-53: When I try to type a "<" (i.e. less than) instead I get ">"
+ [116]Q-54: When I try to type a "<" (i.e. less than) instead I get ">"
(i.e. greater than)! Strangely, typing ">" works OK!!
- [116]Q-54: I'm using an "international" keyboard (e.g. German "de", or
+ [117]Q-55: 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?
- [117]Q-55: When typing I sometimes get double, triple, or more of my
+ [118]Q-56: 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?
- [118]Q-56: The x11vnc -norepeat mode is in effect, but I still get
+ [119]Q-57: The x11vnc -norepeat mode is in effect, but I still get
repeated keystrokes!!
- [119]Q-57: The machine where I run x11vnc has an AltGr key, but the
+ [120]Q-58: 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?
- [120]Q-58: I have a Sun machine I run x11vnc on. Its Sun keyboard has
+ [121]Q-59: 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)
- [121]Q-59: Can I map a keystroke to a mouse button click on the remote
+ [122]Q-60: Can I map a keystroke to a mouse button click on the remote
machine?
[Screen Related Issues and Features]
- [122]Q-60: The remote display is larger (in number of pixels) than the
+ [123]Q-61: 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?
- [123]Q-61: Does x11vnc support server-side framebuffer scaling? (E.g.
+ [124]Q-62: Does x11vnc support server-side framebuffer scaling? (E.g.
to make the desktop smaller).
- [124]Q-62: Does x11vnc work with Xinerama? (i.e. multiple monitors
+ [125]Q-63: Does x11vnc work with Xinerama? (i.e. multiple monitors
joined together to form one big, single screen).
- [125]Q-63: Can I use x11vnc on a multi-headed display that is not
+ [126]Q-64: Can I use x11vnc on a multi-headed display that is not
Xinerama (i.e. separate screens :0.0, :0.1, ... for each monitor)?
- [126]Q-64: Does x11vnc support the XRANDR (X Resize, Rotate and
+ [127]Q-65: Can x11vnc show only a portion of the display? (E.g. for a
+ special purpose rfb application).
+
+ [128]Q-66: Does x11vnc support the XRANDR (X Resize, Rotate and
Reflection) extension? Whenever I rotate or resize the screen x11vnc
just seems to crash.
- [127]Q-65: Why is the view in my VNC viewer completely black? Or why
+ [129]Q-67: Why is the view in my VNC viewer completely black? Or why
is everything flashing around randomly?
- [128]Q-66: I use Linux Virtual Consoles (VC's) to implement 'Fast User
+ [130]Q-68: 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
@@ -933,7 +947,7 @@ make
otherwise all messed up unless the X session x11vnc is attached to is
in the active VC?
- [129]Q-67: I am using x11vnc where my local machine has "popup/hidden
+ [131]Q-69: 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
@@ -941,13 +955,13 @@ make
[Misc: Clipboard, Beeps, Thanks, etc.]
- [130]Q-68: Does the Clipboard/Selection get transferred between the
+ [132]Q-70: Does the Clipboard/Selection get transferred between the
vncviewer and the X display?
- [131]Q-69: Why don't I hear the "Beeps" in my X session (e.g. when
+ [133]Q-71: Why don't I hear the "Beeps" in my X session (e.g. when
typing tput bel in an xterm)?
- [132]Q-70: Thanks for your program and for your help! Can I make a
+ [134]Q-72: Thanks for your program and for your help! Can I make a
donation?
_________________________________________________________________
@@ -960,13 +974,13 @@ 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 [133]-display option to
+ your DISPLAY environment variable or use the [135]-display option to
specify it. Nearly always the correct value will be ":0"
For the latter error, you need to set up the X11 permissions
correctly. See the xauth(1), Xsecurity(7), and xhost(1) man pages for
much info. For example, you may need to set your XAUTHORITY
- environment variable or use the [134]-auth option to point to the
+ environment variable or use the [136]-auth option to point to the
correct cookie file (e.g. /home/joe/.Xauthority or /var/gdm/:0.Xauth),
or simply be sure you run x11vnc as the correct user (i.e. the user
who owns the X session you wish to view). Running x11vnc as root is
@@ -980,11 +994,11 @@ 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 [135]-users option).
+ documentation on the [137]-users option).
Some Linux distributions or display managers may set XAUTHORITY to a
random local filename. You need to dig out where they have hidden the
- MIT-MAGIC-COOKIE file (and set XAUTHORITY to it or use the [136]-auth
+ MIT-MAGIC-COOKIE file (and set XAUTHORITY to it or use the [138]-auth
option). This command is often useful to find non-standard settings
for XAUTHORITY:
ps wwwweaux | tr ' ' '\n' | grep XAUTHORITY | sort -u
@@ -1040,8 +1054,8 @@ make
XFree86-devel
zlib-devel
- Q-3: Help, I need to run x11vnc on Solaris 2.5.1 and it doesn't
- compile!
+ Q-3: Help, I need to run x11vnc on Solaris 2.5.1 (or other old
+ Unix/Linux) and it doesn't compile!
We apologize that x11vnc does not build cleanly on older versions of
Solaris, Linux, etc.: very few users are on these old releases.
@@ -1054,7 +1068,7 @@ make
earlier and perhaps non-Solaris):
First use the environment settings (CPPFLAGS, LDFLAGS, etc.) in the
- above [137]Solaris build script to run the configure command. That
+ above [139]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
@@ -1084,7 +1098,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
- [138]SunOS 4.x
+ [140]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
@@ -1093,19 +1107,19 @@ typedef unsigned int in_addr_t;
Q-4: Where can I get a precompiled x11vnc binary for my Operating
System?
- Hopefully the [139]build steps above and [140]FAQ provide enough info
+ Hopefully the [141]build steps above and [142]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) [141]http://packages.debian.org/x11vnc
+ Debian: (.deb) [143]http://packages.debian.org/x11vnc
- Slackware: (.tgz) [142]http://www.linuxpackages.net/ Redhat/Fedora:
- (.rpm) [143]http://dag.wieers.com/packages/x11vnc/ Solaris: (pkg)
- [144]http://www.sunfreeware.com/ wwexptools: (.tgz)
- [145]http://www.bell-labs.com/project/wwexptools/packages.html The
+ Slackware: (.tgz) [144]http://www.linuxpackages.net/ Redhat/Fedora:
+ (.rpm) [145]http://dag.wieers.com/packages/x11vnc/ Solaris: (pkg)
+ [146]http://www.sunfreeware.com/ wwexptools: (.tgz)
+ [147]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
@@ -1117,13 +1131,13 @@ typedef unsigned int in_addr_t;
this by looking at the x11vnc output and if it says the encoding for a
client is "hextile" then likely the fast compression encodings are
missing. If you want optimal performance on your OS, you should see
- the [146]build notes above for where to download libz and libjpeg, and
+ the [148]build notes above for where to download libz and libjpeg, and
then build everything with gcc. For Solaris, the
http://www.sunfreeware.com/ packages are built with libz and libjpeg.
If the above binaries don't work and building x11vnc on your OS fails
(and all else fails!) you can try one of my motley collection of
- [147]test binaries. Some may be old, some may have extra debugging
+ [149]test binaries. Some may be old, some may have extra debugging
output, etc. One of them may work on your OS...
As a general note, the x11vnc program is simple enough you don't
@@ -1143,16 +1157,16 @@ typedef unsigned int in_addr_t;
To obtain VNC viewers for the viewing side (Windows, Mac OS, or Unix)
try here:
- * [148]http://www.tightvnc.com/download.html
- * [149]http://www.realvnc.com/download-free.html
- * [150]http://sourceforge.net/projects/cotvnc/
+ * [150]http://www.tightvnc.com/download.html
+ * [151]http://www.realvnc.com/download-free.html
+ * [152]http://sourceforge.net/projects/cotvnc/
Q-6: How can I see all of x11vnc's command line options and
documentation on how to use them?
Run: x11vnc -opts to list just the option names or run: x11vnc
-help for long descriptions about each option. The output is listed
- [151]here as well.
+ [153]here as well.
Q-7: 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?
@@ -1184,18 +1198,18 @@ 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
- [152]-gui option for more info. Examples: "x11vnc ... -gui" and
+ [154]-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.
Q-8: Can I make x11vnc more quiet and also go into the background
after starting up?
- Use the [153]-q and [154]-bg options, respectively. (also: -quiet is
+ Use the [155]-q and [156]-bg options, respectively. (also: -quiet is
an alias for -q)
Note that under -bg the stderr messages will be lost unless you use
- the "[155]-o logfile" option.
+ the "[157]-o logfile" option.
Q-9: Sometimes when a VNC viewer dies abruptly, x11vnc also dies with
the error message like: "Broken pipe". I'm using the -forever mode and
@@ -1207,7 +1221,7 @@ display :0
Up until of Apr/2004 the above fix only works for BSD signal systems
(Linux, FreeBSD, ...) For SYSV systems there is a workaround in my
- [156]x11vnc.c file. It also has an [157]option -sigpipe exit to have
+ [158]x11vnc.c file. It also has an [159]option -sigpipe exit to have
x11vnc clean up and exit upon receiving SIGPIPE.
[Win2VNC Related]
@@ -1217,21 +1231,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 "[158]-nofb" option
+ Yes, for best response start up x11vnc with the "[160]-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 [159]x2vnc, however you would
+ This will also work X11 to X11 using [161]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:
- * [160]Original Win2VNC
- * [161]Enhanced Win2VNC and [162]sourceforge link
- * [163]x2vnc
- * [164]x2x also [165]here
- * [166]zvnc (MorphOS)
+ * [162]Original Win2VNC
+ * [163]Enhanced Win2VNC and [164]sourceforge link
+ * [165]x2vnc
+ * [166]x2x also [167]here
+ * [168]zvnc (MorphOS)
All of them will work with x11vnc (except x2x where it is not needed).
@@ -1251,7 +1265,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 [167]-visual option to allow you to
+ libvncserver CVS, x11vnc has the [169]-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:
@@ -1267,7 +1281,7 @@ display :0
start out OK, but after a while the colors are incorrect in certain
windows.
- Use the [168]-flashcmap option to have x11vnc watch for changes in the
+ Use the [170]-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
@@ -1276,7 +1290,7 @@ display :0
example of this. Consider reconfiguring the system to 16 bpp or depth
24 TrueColor if at all possible.
- Also note that in some rare cases the [169]-notruecolor option has
+ Also note that in some rare cases the [171]-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.
@@ -1286,10 +1300,10 @@ display :0
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 [170]previous question regarding 8 bpp
+ You may want to review the [172]previous question regarding 8 bpp
PseudoColor.
- On some hardware (Sun/SPARC, Sgi), the [171]-overlay option discussed
+ On some hardware (Sun/SPARC, Sgi), the [173]-overlay option discussed
a couple paragraphs down may solve this for you (you may want to skip
to it directly).
@@ -1327,7 +1341,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 [172]-overlay x11vnc option (Aug/2004) to have x11vnc use the
+ use the [174]-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
@@ -1349,7 +1363,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 [173]-id option to
+ possible workaround in this case is to use the [175]-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).
@@ -1357,7 +1371,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
- [174]-overlay option works for Solaris machines with overlay visuals
+ [176]-overlay option works for Solaris machines with overlay visuals
where most of this problem occurs.
Q-14: How do I figure out the window id to supply to the -id windowid
@@ -1367,13 +1381,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 [175]problems.
+ debugging x11vnc [177]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 "[176]-id pick" to
+ Also, as of Dec/2004 libvncserver CVS you can use "[178]-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.
@@ -1390,7 +1404,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 [177]-sid windowid option ("shifted" windowid).
+ polling, try the [179]-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.
@@ -1442,15 +1456,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 [178]-display option to point the display to that of
+ machine. Use the [180]-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 [179]-noshm option (this enables the polling over
+ and also supply the [181]-noshm option (this enables the polling over
the network).
The response will likely be sluggish. 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
- [180]-flipbyteorder if the colors get messed up due to endian byte
+ [182]-flipbyteorder if the colors get messed up due to endian byte
order differences.
Q-18: How do I get my X permissions (MIT-MAGIC-COOKIE) correct for a
@@ -1464,7 +1478,7 @@ TrueColor defdepth 24
the MIT-MAGIC-COOKIE auth file data must be copied to the Xterminal.
If $HOME/.Xauthority is exported via NFS (this is insecure of course),
then x11vnc can simply pick it up via NFS (you may need to use the
- [181]-auth option to point to the correct file). Other options include
+ [183]-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 -
@@ -1474,7 +1488,7 @@ TrueColor defdepth 24
xauth(1) manpage for more details.
If the display name needs to be changed between the two hosts, see
- [182]this note on the "xauth add ..." command.
+ [184]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 to allow cookie-free local access for x11vnc.
@@ -1484,7 +1498,7 @@ TrueColor defdepth 24
accounts, NFS, etc. you'll need to contact your system administrator
to set something up. It can be done!
- Not recommended, but as a last resort, you could have x11vnc [183]poll
+ Not recommended, but as a last resort, you could have x11vnc [185]poll
the Xterminal over the network.
Note: use of Display Manager (gdm, kdm, ...) auth cookie files (i.e.
@@ -1501,17 +1515,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
- [184]-remote and [185]-query options. To shut down the running x11vnc
+ [186]-remote and [187]-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 [186]-forever option has not been supplied,
+ For older versions: If the [188]-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 [187]-bg option
+ If you have not put x11vnc in the background via the [189]-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
@@ -1520,13 +1534,13 @@ 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 [188]-clear_mods option and [189]-clear_keys
+ Alt. Alternatively, the [190]-clear_mods option and [191]-clear_keys
option can be used to release pressed keys at startup and exit.
Q-20: Can I change settings in x11vnc without having to restart it?
I.e., is there a way to remote control it?
- Look at the [190]-remote (same as -R) and [191]-query (same as -Q)
+ Look at the [192]-remote (same as -R) and [193]-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
@@ -1538,7 +1552,7 @@ TrueColor defdepth 24
be possible.
There is also a simple tcl/tk gui based on this remote control
- mechanism. See the [192]-gui option for more info.
+ mechanism. See the [194]-gui option for more info.
[Security and Permissions]
@@ -1550,12 +1564,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" [193]option, which is the the same
+ the -storepasswd "pass" "file" [195]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: [194]-rfbauth
+ You then use the password via the x11vnc option: [196]-rfbauth
$HOME/myvncpasswd
Compared to vncpasswd(1) the latter two methods are a somewhat unsafe
@@ -1564,7 +1578,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 [195]-passwdfile and -passwd/-viewpasswd plain
+ x11vnc also has the [197]-passwdfile and -passwd/-viewpasswd plain
text (i.e. not obscured like the -rfbauth VNC passwords) password
options.
@@ -1572,13 +1586,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
- [196]-viewpasswd option to supply the view-only password. Note the
- full-access password option [197]-passwd must be supplied at the same
+ [198]-viewpasswd option to supply the view-only password. Note the
+ full-access password option [199]-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
- [198]-passwdfile option to specify a file containing plain text
+ [200]-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
@@ -1586,7 +1600,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 [199]-rfbauth
+ View-only passwords currently do not work for the [201]-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
@@ -1599,7 +1613,7 @@ TrueColor defdepth 24
some users just be able to move the mouse, but not click or type
anything?
- As of Feb/2005, the [200]-input option allows you to do this. "K",
+ As of Feb/2005, the [202]-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
@@ -1614,22 +1628,22 @@ 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 [201]-forever option (aka -many) to have
+ periods of time. Use the [203]-forever option (aka -many) to have
x11vnc wait for more connections after the first client disconnects.
- Use the [202]-shared option to have x11vnc allow multiple clients to
+ Use the [204]-shared option to have x11vnc allow multiple clients to
connect simultaneously.
- Recommended additional safety measures include using ssh ([203]see
+ Recommended additional safety measures include using ssh ([205]see
above), stunnel, or a VPN to authenticate and encrypt the viewer
- connections or to at least use the -rfbauth passwd-file [204]option to
- use VNC password protection (or [205]-passwdfile) It is up to you to
+ connections or to at least use the -rfbauth passwd-file [206]option to
+ use VNC password protection (or [207]-passwdfile) It is up to you to
apply these security measures, they will not be done for you
automatically.
Q-25: Can I limit which machines incoming VNC clients can connect
from?
- Yes, look at the [206]-allow and [207]-localhost options to limit
+ Yes, look at the [208]-allow and [209]-localhost options to limit
connections by hostname or IP address. E.g.
x11vnc -allow 192.168.0.1,192.168.0.2
@@ -1641,7 +1655,7 @@ TrueColor defdepth 24
Note that -localhost is the same as "-allow 127.0.0.1"
For more control, build libvncserver with libwrap support
- [208](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5)
+ [210](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5)
for complete details.
Q-26: How do I build x11vnc/libvncserver with libwrap (tcp_wrappers)
@@ -1660,7 +1674,7 @@ TrueColor defdepth 24
is "vnc", e.g.:
vnc: 192.168.100.3 .example.com
- Note that if you run x11vnc out of [209]inetd you do not need to build
+ Note that if you run x11vnc out of [211]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.
@@ -1668,39 +1682,39 @@ 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 "[210]-listen
+ As of Mar/2005 in the libvncserver CVS, there is the "[212]-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 "[211]-allow host1,..." option to allow only specific hosts
+ use the "[213]-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 [212]-localhost now implies "-listen localhost" since that is
+ option [214]-localhost now implies "-listen localhost" since that is
what most people expect it to do.
Q-28: Now that -localhost implies listening only on the loopback
interface, how I can occasionally allow in a non-local host via the
allowonce remote control command?
- To do this specify "[213]-allow localhost". Unlike [214]-localhost
+ To do this specify "[215]-allow localhost". Unlike [216]-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
- ([215]-listen option) via remote control or gui, you may need to also
- manually adjust the [216]-allow list if you unexpectedly get into a
+ ([217]-listen option) via remote control or gui, you may need to also
+ manually adjust the [218]-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 [217]-localhost on
+ in on the listening interface. If you just toggle [219]-localhost on
and off x11vnc should see to it that you never get into such a state.
Q-29: 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 [218]how to tunnel VNC via
+ See the description earlier on this page on [220]how to tunnel VNC via
SSH from Unix to Unix. A number of ways are described along with some
issues you may encounter.
@@ -1710,7 +1724,7 @@ TrueColor defdepth 24
Q-30: How can I tunnel my connection to x11vnc via an encrypted SSH
channel from Windows using an SSH client like Putty?
- [219]Above we described how to tunnel VNC via SSH from Unix to Unix,
+ [221]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
@@ -1733,8 +1747,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 [220]-localhost
- and [221]-rfbauth/[222]-passwdfile options.
+ For extra protection feel free to run x11vnc with the [222]-localhost
+ and [223]-rfbauth/[224]-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
@@ -1743,9 +1757,9 @@ TrueColor defdepth 24
you'll need to do a second login (ssh or rsh) to the workstation
machine 'otherhost' and then start up x11vnc on it.
- As discussed [223]above another option is to first start the VNC
+ As discussed [225]above another option is to first start the VNC
viewer in "listen" mode, and then launch x11vnc with the
- "[224]-connect localhost" option to establish the reverse connection.
+ "[226]-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).
@@ -1755,7 +1769,7 @@ TrueColor defdepth 24
some clients view-only? How about running an arbitrary program to make
the decisions?
- Yes, look at the "[225]-accept command" option, it allows you to
+ Yes, look at the "[227]-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
@@ -1774,7 +1788,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 [226]-viewonly option has been
+ mouse on the "View" button. If the [228]-viewonly option has been
supplied, the "View" action will not be present: the whole display is
view only in that case.
@@ -1790,7 +1804,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 [227]ftp://ftp.x.org/
+ is available at [229]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
@@ -1829,7 +1843,7 @@ elif [ $rc = 4 ]; then
fi
exit 1
- Stefan Radman has written a nice dtksh script [228]dtVncPopup for use
+ Stefan Radman has written a nice dtksh script [230]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.
@@ -1838,7 +1852,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 "[229]-gone
+ To run a command when a client disconnects, use the "[231]-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
@@ -1852,13 +1866,13 @@ exit 1
such support.
One approximate method involves starting x11vnc with the
- [230]-localhost option. This basically requires the viewer user to log
+ [232]-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 [231]elsewhere on this page. Of course a malicious user
+ mentioned [233]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
@@ -1867,7 +1881,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 [232]-accept option that runs a program to examine
+ involves using the [234]-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
@@ -1899,7 +1913,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 [233]-users option that allows things
+ As of Feb/2005 x11vnc has the [235]-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
@@ -1919,7 +1933,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 [234]blockdpy.c The idea behind it is simple (but
+ source for it is [236]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
@@ -1935,15 +1949,15 @@ 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 [235]-accept option and told
- to exit via the [236]-gone option (the vnc client user should
+ The blockdpy utility is launched by the [237]-accept option and told
+ to exit via the [238]-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.
Q-35: Can I have x11vnc automatically lock the screen when I
disconnect the VNC viewer?
- Yes, a user mentions he uses the [237]-gone option under CDE to run a
+ Yes, a user mentions he uses the [239]-gone option under CDE to run a
screen lock program:
x11vnc -display :0 -forever -gone 'dtaction LockDisplay'
@@ -1966,11 +1980,11 @@ exit 1 # reject it
permissions to connect to the X display.
Here are some ideas:
- * Use the description under "Continuously" in the [238]FAQ on x11vnc
+ * Use the description under "Continuously" in the [240]FAQ on x11vnc
and Display Managers
- * Use the description in the [239]FAQ on x11vnc and inetd(1)
+ * Use the description in the [241]FAQ on x11vnc and inetd(1)
* Start x11vnc from your $HOME/.xsession (or $HOME/.xinitrc)
- * Although less reliable, see the [240]x11vnc_loop rc.local hack
+ * Although less reliable, see the [242]x11vnc_loop rc.local hack
below.
The display manager scheme will not be specific to which user has the
@@ -2000,7 +2014,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 [241]-auth option sets XAUTHORITY). There will be a similar thing
+ (the [243]-auth option sets XAUTHORITY). There will be a similar thing
for xdm using however a different auth directory path (perhaps
something like /var/lib/xdm/authdir/authfiles/A:0-XQvaJk for xdm or
/var/lib/kdm/A:0-crWk72 for kdm, where the random characters in
@@ -2020,7 +2034,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
For dtlogin in addition to the above sort of trick (BTW, the 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 [242]the example at the end
+ or /usr/dt/config/Xconfig on Solaris, see [244]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.
@@ -2059,7 +2073,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
debugging. In that case replace the -bg above with something like:
1>> /var/tmp/x11vnc.log 2>&1 &
- (or use the "[243]-o logfile" option).
+ (or use the "[245]-o logfile" option).
_________________________________________________________________
Fedora/gdm: Here is an example of what we did on a vanilla install of
@@ -2074,7 +2088,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -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 [244]full details
+ killed immediately after the user logs in. Here are [246]full details
on how to configure gdm
_________________________________________________________________
@@ -2108,13 +2122,13 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -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: [245]x11vnc_loop It will need some local
+ file like rc.local: [247]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 above is
preferred.
If the machine is a traditional Xterminal you may want to read
- [246]this FAQ.
+ [248]this FAQ.
Q-38: Can I run x11vnc out of inetd(1)? How about xinetd(1)?
@@ -2123,7 +2137,7 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -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 [247]-inetd
+ where the shell script /usr/local/bin/x11vnc_sh uses the [249]-inetd
option and looks something like (you'll need to customize to your
settings).
#!/bin/sh
@@ -2135,13 +2149,13 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
also goes to the VNC vncviewer, and that confuses it greatly). If you
do not use a wrapper script as above but rather call x11vnc directly
in /etc/inetd.conf and do not redirect stderr, then you must specify
- the -q (aka [248]-quiet) option: /usr/local/bin/x11vnc -q -inetd ...
+ the -q (aka [250]-quiet) option: /usr/local/bin/x11vnc -q -inetd ...
or use -o logfile to collect the output in a file. The wrapper script
with stderr redirection to a log file is the recommended method
because the errors and warnings printed out are very useful in
troubleshooting problems.
- Note also the need to set XAUTHORITY via [249]-auth to point to the
+ Note also the need to set XAUTHORITY via [251]-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
@@ -2188,7 +2202,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 [250]option:
+ that connect to it, run x11vnc with this [252]option:
-httpdir /path/to/the/java/classes/dir
(this directory will contain the files index.vnc and, for example,
@@ -2217,7 +2231,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 [251]-connect option. To connect immediately
+ starts up x11vnc with the [253]-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
@@ -2225,7 +2239,7 @@ service x11vncservice
hosts to connect to.
To use the vncconnect(1) program (from the core VNC package at
- www.realvnc.com) specify the [252]-vncconnect option to x11vnc (Note:
+ www.realvnc.com) specify the [254]-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
@@ -2259,7 +2273,7 @@ xprop -root -f VNC_CONNECT 8s -set VNC_CONNECT "$1"
19/03/2004 10:10:58 error creating tile-row shm for len=4
19/03/2004 10:10:58 reverting to single_copytile mode
- Here is a shell script [253]shm_clear to list and prompt for removal
+ Here is a shell script [255]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,
@@ -2293,33 +2307,33 @@ ied)
in /etc/system. See the next paragraph for more workarounds.
To minimize the number of shm segments used by x11vnc try using the
- [254]-onetile option (corresponds to only 3 shm segments used, and
+ [256]-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
- [255]-noshm option. Performance will be somewhat degraded but when
+ [257]-noshm option. Performance will be somewhat degraded but when
done over local machine sockets it should be acceptable (see an
- [256]earlier question discussing -noshm).
+ [258]earlier question discussing -noshm).
Q-42: How can I make x11vnc use less system resources?
- The [257]-nap and "[258]-wait n" (where n is the sleep between polls
+ The [259]-nap and "[260]-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
- [259]-onetile option will use less memory and use fewer shared memory
- slots (add [260]-fs 1.0 for one less slot).
+ [261]-onetile option will use less memory and use fewer shared memory
+ slots (add [262]-fs 1.0 for one less slot).
Q-43: How can I make x11vnc use MORE system resources?
- You can try [261]-threads and dial down the wait time (e.g. -wait 1)
- and possibly dial down [262]-defer as well. Note that if you try to
+ You can try [263]-threads and dial down the wait time (e.g. -wait 1)
+ and possibly dial down [264]-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 [263]-id option) can be streamed over a LAN or wireless at
+ the x11vnc [265]-id option) can be streamed over a LAN or wireless at
a reasonable frame rate.
Q-44: I use x11vnc over a slow link with high latency (e.g. dialup
@@ -2334,7 +2348,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
- [264]-solid [color] option.
+ [266]-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.
@@ -2347,7 +2361,7 @@ ied)
worth it, but could be of use in some situations.
VNC viewer parameters:
- * Use a [265]TightVNC enabled viewer!
+ * Use a [267]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
@@ -2365,19 +2379,19 @@ ied)
vncviewer to be very slow)
x11vnc parameters:
- * Try using [266]-nodragging (no screen updates when dragging mouse,
+ * Try using [268]-nodragging (no screen updates when dragging mouse,
but sometimes you miss visual feedback)
- * Try the [267]-progressive pixelheight mode with the block
+ * Try the [269]-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 [268]-fs 1.0 (disables fullscreen updates)
- * Try increasing [269]-wait or [270]-defer (reduces the maximum
+ * Set [270]-fs 1.0 (disables fullscreen updates)
+ * Try increasing [271]-wait or [272]-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 [271]-id (cuts
+ * If you just want to watch one (simple) window use [273]-id (cuts
down extraneous polling and updates, but can be buggy or
insufficient)
- * Set [272]-nosel (disables all clipboard selection exchange)
- * Use [273]-nocursor and [274]-nocursorpos (repainting the remote
+ * Set [274]-nosel (disables all clipboard selection exchange)
+ * Use [275]-nocursor and [276]-nocursorpos (repainting the remote
cursor position and shape takes resources and round trips)
Q-45: When I drag windows around with the mouse or scroll up and down
@@ -2388,21 +2402,69 @@ 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 "[275]-pointer_mode 1" option.
+ way via the "[277]-pointer_mode 1" option.
- Also added was the [276]-nodragging option that disables all screen
+ Also added was the [278]-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 [277]-pointer_mode n option
+ As of Dec/2004 in the libvncserver CVS the [279]-pointer_mode n option
was introduced. n=1 is the original mose, n=2 and improvement, etc..
See the -pointer_mode n help for more info.
+ Also, in some circumstances the [280]-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).
+
+ Q-46: Does x11vnc support the X DAMAGE Xserver extension to find
+ modified regions of the screen quickly and efficiently?
+
+ Yes, as of Mar/2005 in the libvncserver CVS x11vnc will use the X
+ DAMAGE extension by default if it is available on the display. This
+ requires libXdamage to be available in the build environment as well
+ (recent Linux distros and Solaris 10 have it).
+
+ The DAMAGE extension enables the X server to report changed regions of
+ the screen back to x11vnc. So x11vnc doesn't have to guess where the
+ changes are (by polling the entire screen every 1 or 2 seconds). The
+ use of X DAMAGE dramatically reduces the load when the screen is not
+ changing very much (i.e. most of the time). It also noticeably
+ improves updates, especially for very small changed areas (e.g. clock
+ ticking, cursor flashing, typing, etc).
+
+ Note that the DAMAGE extension does not speed up the actual reading of
+ pixels from the video card framebuffer memory, by, say, mirroring them
+ in main memory. So reading the fb is still painfully slow (e.g.
+ 5MB/sec), and so even using X DAMAGE when large changes occur on the
+ screen the bulk of the time is still spent retrieving them.
+
+ Unfortunately the current Xorg DAMAGE extension implementation can at
+ times be overly cautious and report very large rectangles as "damaged"
+ even though only a small portion of the pixels have actually been
+ modified. This behavior is often the fault of the window manager (e.g.
+ it redraws the entire, unseen, frame window underneath the application
+ window when it gains focus), or the application itself (e.g. does
+ large, unnecessary repaints).
+
+ To work around this deficiency, x11vnc currently only trusts small
+ DAMAGE rectangles to contain real damage. The larger rectangles are
+ only used as hints to direct the traditional scanline polling (i.e. if
+ a scanline doesn't intersect a recent DAMAGE rectangle, the scan is
+ skipped). You can use the "[281]-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 "[282]-xd_mem f" may also be of use in tuning the
+ algorithm. To disable using DAMAGE entirely use "[283]-noxdamage".
+
[Mouse Cursor Shapes]
- Q-46: Why isn't the mouse cursor shape (the little icon shape where
+ Q-47: Why isn't the mouse cursor shape (the little icon shape where
the mouse pointer is) correct as I move from window to window?
On X servers supporting XFIXES or Solaris/IRIX Overlay extensions it
@@ -2416,16 +2478,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 "[278]-cursor X" option that
+ A simple kludge is provided by the "[284]-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 "[279]-cursor some" option for
+ work for those cases. Also see the "[285]-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 [280]-overlay option is supplied. See [281]this FAQ
+ cursor when the [286]-overlay option is supplied. See [287]this FAQ
for more info.
Also as of Dec/2004 in the libvncserver CVS XFIXES X extension support
@@ -2433,7 +2495,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 [282]Solaris 10.
+ distros and [288]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
@@ -2441,9 +2503,9 @@ 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. [283]Details can be found here.
+ under 32bpp. [289]Details can be found here.
- Q-47: When using XFIXES cursorshape mode, some of the cursors look
+ Q-48: 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?
@@ -2473,24 +2535,24 @@ 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 "[284]-alphacut n" option lets
+ course!) some tunable parameters. The "[290]-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 "[285]-alphafrac f" option tries to correct individual
+ 240. The "[291]-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 [286]-alpharemove that is useful for
+ Finally, there is an option [292]-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
-alpharemove to brighten them by having x11vnc divide out the alpha
value.
- Q-48: In XFIXES mode, are there any hacks to handle cursor
+ Q-49: In XFIXES mode, are there any hacks to handle cursor
transparency ("alpha channel") exactly?
As of Jan/2005 in the CVS, libvncserver has been modified to allow an
@@ -2498,11 +2560,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 [287]-nocursorshape x11vnc option.
+ disabled for all clients with the [293]-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
- [288]-noalphablend option to disable this behavior (always approximate
+ [294]-noalphablend option to disable this behavior (always approximate
transparent cursors with opaque RGB values).
The CursorShapeUpdates VNC extension complicates matters because the
@@ -2527,12 +2589,12 @@ ied)
[Mouse Pointer]
- Q-49: Why does the mouse arrow just stay in one corner in my
+ Q-50: 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 [289]tightvnc extension
+ This default takes advantage of a [295]tightvnc extension
(CursorShapeUpdates) that allows specifying a cursor image shape for
- the local VNC viewer. You may disable it with the [290]-nocursor
+ the local VNC viewer. You may disable it with the [296]-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
@@ -2540,22 +2602,22 @@ ied)
CursorShapeUpdates) will be to draw the moving cursor into the x11vnc
framebuffer. This can also be disabled via -nocursor.
- Q-50: Can I take advantage of the TightVNC extension to the VNC
+ Q-51: Can I take advantage of the TightVNC extension to the VNC
protocol where Cursor Positions Updates are sent back to all connected
clients (i.e. passive viewers can see the mouse cursor being moved
around by another viewer)?
- Use the [291]-cursorpos option when starting x11vnc. A VNC viewer must
+ Use the [297]-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 [292]-nocursorpos
- and [293]-nocursorshape.
+ libvncserver CVS -cursorpos is the default. See also [298]-nocursorpos
+ and [299]-nocursorshape.
- Q-51: Is it possible to swap the mouse buttons (e.g. left-handed
+ Q-52: 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: [294]-buttonmap
+ You can remap the mouse buttons via something like: [300]-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.
@@ -2563,7 +2625,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 [295]-debug_pointer option prints out much info for
+ Note that the [301]-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
@@ -2585,7 +2647,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 [296]-buttonmap but rather configuring the X server
+ consider not using [302]-buttonmap but rather configuring the X server
to think it has a mouse with 5 buttons even though the physical mouse
does not.
@@ -2603,10 +2665,10 @@ ied)
(yes, this is getting a little silly).
[Keyboard Issues]
- Q-52: How can I get my AltGr and Shift modifiers to work between
+ Q-53: How can I get my AltGr and Shift modifiers to work between
keyboards for different languages?
- The option [297]-modtweak should be of some use for this. It is a mode
+ The option [303]-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.
@@ -2615,20 +2677,20 @@ 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 [298]this FAQ
+ and ">" it. This key does not exist on the keyboard (see [304]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 [299]FAQ about the -xkb option for a more powerful method
+ Also see the [305]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
- [300]-debug_keyboard option prints out much info for every keystroke
+ [306]-debug_keyboard option prints out much info for every keystroke
and so can be useful debugging things.
- Q-53: When I try to type a "<" (i.e. less than) instead I get ">"
+ Q-54: When I try to type a "<" (i.e. less than) instead I get ">"
(i.e. greater than)! Strangely, typing ">" works OK!!
Does your keyboard have a single key with both "<" and ">" on it? Even
@@ -2675,20 +2737,20 @@ ied)
-remap less-comma
These are convenient in that they do not modify the actual X server
- settings. The former ([301]-modtweak) is a mode that monitors the
+ settings. The former ([307]-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 ([302]-remap less-comma) is an immediate remapping of the
+ The latter ([308]-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 [303]FAQ about the -xkb option as a possible workaround
+ See also the [309]FAQ about the -xkb option as a possible workaround
using the XKEYBOARD extension.
- Note that the [304]-debug_keyboard option prints out much info for
+ Note that the [310]-debug_keyboard option prints out much info for
every keystroke to aid debugging keyboard problems.
- Q-54: I'm using an "international" keyboard (e.g. German "de", or
+ Q-55: 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
@@ -2709,7 +2771,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 [305]-modtweak
+ This all worked fine with x11vnc running with the [311]-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
@@ -2727,7 +2789,7 @@ ied)
* there is a new option -xkb to use the XKEYBOARD extension API to
do the Modifier key tweaking.
- The [306]-xkb option seems to fix all of the missing keys: "@", "<",
+ The [312]-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
@@ -2745,7 +2807,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:
- [307]-skip_keycodes 93
+ [313]-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
@@ -2762,14 +2824,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 [308]-remap x11vnc option:
+ created using the [314]-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
- [309]-add_keysyms option in the next paragraph.
- * To complement the above workaround using the [310]-remap, an
- option [311]-add_keysyms was added. This option instructs x11vnc
+ [315]-add_keysyms option in the next paragraph.
+ * To complement the above workaround using the [316]-remap, an
+ option [317]-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
@@ -2777,7 +2839,7 @@ ied)
when the Keysym is received from a VNC viewer, and only after that
would -add_keysyms, or anything else, come into play.
- Q-55: When typing I sometimes get double, triple, or more of my
+ Q-56: When typing I sometimes get double, triple, or more of my
keystrokes repeated. I'm sure I only typed them once, what can I do?
This may be due to an interplay between your X server's key autorepeat
@@ -2785,7 +2847,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) [312]-norepeat x11vnc option. You will still
+ use the new (Jul/2004) [318]-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.
@@ -2807,17 +2869,17 @@ 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 [313]-norepeat (which has since Dec/2004 been
+ needed, or to use the [319]-norepeat (which has since Dec/2004 been
made the default). Note that with X server autorepeat turned off the
VNC viewer side of the connection will (nearly always) do its own
autorepeating so there is no big loss here, unless someone is also
working at the physical display and misses his autorepeating.
- Q-56: The x11vnc -norepeat mode is in effect, but I still get repeated
+ Q-57: The x11vnc -norepeat mode is in effect, but I still get repeated
keystrokes!!
Are you using x11vnc to log in to an X session? (as described in
- [314]this FAQ) If so, x11vnc is starting before your session and it
+ [320]this FAQ) If so, x11vnc is starting before your session and it
disables autorepeat when you connect, and then your session startup
could be resetting the autorepeat to be on. Or it could be something
inside your desktop that decides to turn it back on. x11vnc in
@@ -2830,11 +2892,11 @@ ied)
utility. If something in your desktop is automatically turning it back
on you will have to disable that somehow.
- Q-57: The machine where I run x11vnc has an AltGr key, but the local
+ Q-58: The machine where I run x11vnc has an AltGr key, but the local
machine where I run the VNC viewer does not. Is there a way I can map
a local unused key to send an AltGr? How about a Compose key as well?
- Something like "[315]-remap Super_R-Mode_switch" x11vnc option may
+ Something like "[321]-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)).
@@ -2844,7 +2906,7 @@ ied)
Super_R-Mode_switch,Menu-Multi_key" or use "-remap filename" to
specify remappings from a file.
- Q-58: I have a Sun machine I run x11vnc on. Its Sun keyboard has just
+ Q-59: 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)
@@ -2856,17 +2918,17 @@ 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 [316]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones
+ the [322]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones
needs, and does not modify the X server environment. Note that you
cannot send Alt_L in this case, maybe -remap Super_L-Meta_L would be a
better choice if the Super_L key is typically unused.
- Q-59: Can I map a keystroke to a mouse button click on the remote
+ Q-60: Can I map a keystroke to a mouse button click on the remote
machine?
This can be done directly in some X servers using AccessX and
Pointer_EnableKeys, but is a bit awkward. It may be more convenient to
- have x11vnc do the remapping. This can be done via the [317]-remap
+ have x11vnc do the remapping. This can be done via the [323]-remap
option using the fake "keysyms" Button1, Button2, etc. as the "to"
keys (i.e. the ones after the "-")
@@ -2874,7 +2936,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:
- [318]-remap Super_R-Button2
+ [324]-remap Super_R-Button2
maps the Super_R "flag" key press to the Button2 click, thereby making
X pasting a bit easier.
@@ -2885,7 +2947,7 @@ ied)
[Screen Related Issues and Features]
- Q-60: The remote display is larger (in number of pixels) than the
+ Q-61: 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?
@@ -2903,15 +2965,15 @@ 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 [319]this
+ local display. Especially for hand-held devices. See also [325]this
FAQ on x11vnc scaling.
- Q-61: Does x11vnc support server-side framebuffer scaling? (E.g. to
+ Q-62: Does x11vnc support server-side framebuffer scaling? (E.g. to
make the desktop smaller).
As of Jun/2004 in the libvncserver CVS x11vnc provides basic
server-side scaling. It is a global scaling of the desktop, not a
- per-client setting. To enable it use the "[320]-scale fraction"
+ per-client setting. To enable it use the "[326]-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 expanded (not
@@ -2953,10 +3015,10 @@ 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 ([321]-rfbport option,
+ different scalings listening on separate ports ([327]-rfbport option,
etc.).
- Q-62: Does x11vnc work with Xinerama? (i.e. multiple monitors joined
+ Q-63: Does x11vnc work with Xinerama? (i.e. multiple monitors joined
together to form one big, single screen).
Yes, it should generally work because it simply polls the big
@@ -2968,22 +3030,22 @@ 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 [322]-blackout x11vnc option allows you
+ distracting to the viewer. The [328]-blackout x11vnc option allows you
to blacken-out rectangles by specifying their WxH+X+Y geometries. If
- your system has the libXinerama library, the [323]-xinerama x11vnc
+ your system has the libXinerama library, the [329]-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 [324]-xwarppointer
+ of the large display. If this happens try using the [330]-xwarppointer
option. This instructs x11vnc to fake mouse pointer motions using the
XWarpPointer function instead of the XTestFakeMotionEvent XTEST
function. (This may be due to a bug in the X server for XTEST when
Xinerama is enabled).
- Q-63: Can I use x11vnc on a multi-headed display that is not Xinerama
+ Q-64: Can I use x11vnc on a multi-headed display that is not Xinerama
(i.e. separate screens :0.0, :0.1, ... for each monitor)?
You can, but it is a little bit awkward: you must start separate
@@ -3001,17 +3063,29 @@ 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 [325]FAQ to increase the limit. It
- is probably also a good idea to run with the [326]-onetile option in
+ /etc/system as mentioned in another [331]FAQ to increase the limit. It
+ is probably also a good idea to run with the [332]-onetile option in
this case (to limit each x11vnc to 3 shm segments), or even
- [327]-noshm to use no shm segments.
+ [333]-noshm to use no shm segments.
- Q-64: Does x11vnc support the XRANDR (X Resize, Rotate and Reflection)
+ Q-65: 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 "[334]-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 [335]-id or [336]-sid options are used. The offset is measured
+ from the upper left corner of the selected window.
+
+ Q-66: Does x11vnc support the XRANDR (X Resize, Rotate and Reflection)
extension? Whenever I rotate or resize the screen x11vnc just seems to
crash.
As of Dec/2004 in the libvncserver CVS x11vnc supports XRANDR. You
- enable it with the [328]-xrandr option to make x11vnc monitor XRANDR
+ enable it with the [337]-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
@@ -3020,7 +3094,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
- [329]-padgeom option to make the region big enough to hold all resizes
+ [338]-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
@@ -3028,12 +3102,12 @@ ied)
specify "-xrandr exit" then all will be disconnected and x11vnc will
terminate.
- Q-65: Why is the view in my VNC viewer completely black? Or why is
+ Q-67: Why is the view in my VNC viewer completely black? Or why is
everything flashing around randomly?
See the next FAQ for a possible explanation.
- Q-66: I use Linux Virtual Consoles (VC's) to implement 'Fast User
+ Q-68: 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
@@ -3060,7 +3134,7 @@ ied)
x11vnc can poll it correctly), one can use the switchto(1) command,
e.g. "switchto 7" for VC #7.
- Q-67: I am using x11vnc where my local machine has "popup/hidden
+ Q-69: 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
@@ -3074,21 +3148,21 @@ ied)
[Misc: Clipboard, Beeps, Thanks, etc.]
- Q-68: Does the Clipboard/Selection get transferred between the
+ Q-70: Does the Clipboard/Selection get transferred between the
vncviewer and the X display?
As of Jan/2004 in the libvncserver CVS x11vnc supports the "CutText"
part of the rfb protocol. Furthermore, x11vnc is able to hold the
PRIMARY selection (Xvnc does not seem to do this). If you don't want
- the Clipboard/Selection exchanged use the [330]-nosel option. If you
+ the Clipboard/Selection exchanged use the [339]-nosel option. If you
don't want the PRIMARY selection to be polled for changes use the
- [331]-noprimary option.
+ [340]-noprimary option.
You may need to watch out for desktop utilities such as KDE's
"Klipper" that do odd things with the selection, clipboard, and
cutbuffers.
- Q-69: Why don't I hear the "Beeps" in my X session (e.g. when typing
+ Q-71: Why don't I hear the "Beeps" in my X session (e.g. when typing
tput bel in an xterm)?
As of Dec/2003 in the libvncserver CVS "Beep" XBell events are tracked
@@ -3096,18 +3170,18 @@ 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 [332]-nobell option. If
+ If you don't want to hear the beeps use the [341]-nobell option. If
you want to hear the audio from the remote applications, consider
trying a redirector such as esd.
- Q-70: Thanks for your program and for your help! Can I make a
+ Q-72: Thanks for your program and for your help! Can I make a
donation?
Please do (any amount is appreciated) and thank you for your support!
Click on the PayPal button below for more info.
Also, in general I always enjoy hearing from x11vnc users, how they
use it, what new features they would like, etc. Please send me an
- [333]email!
+ [342]email!
[PayPal]
@@ -3220,232 +3294,241 @@ References
105. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource
106. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link
107. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode
- 108. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape
- 109. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha
- 110. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
- 111. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow
- 112. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions
- 113. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt
- 114. http://www.karlrunge.com/x11vnc/index.html#faq-altgr
- 115. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
- 116. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
- 117. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys
- 118. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still
- 119. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt
- 120. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta
- 121. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click
- 122. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars
- 123. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
- 124. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama
- 125. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen
- 126. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr
- 127. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen
- 128. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
- 129. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars
- 130. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard
- 131. http://www.karlrunge.com/x11vnc/index.html#faq-beeps
- 132. http://www.karlrunge.com/x11vnc/index.html#faq-thanks
- 133. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
- 134. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 135. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 108. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage
+ 109. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape
+ 110. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha
+ 111. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
+ 112. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow
+ 113. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions
+ 114. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt
+ 115. http://www.karlrunge.com/x11vnc/index.html#faq-altgr
+ 116. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
+ 117. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 118. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys
+ 119. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still
+ 120. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt
+ 121. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta
+ 122. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click
+ 123. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars
+ 124. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
+ 125. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama
+ 126. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen
+ 127. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen
+ 128. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr
+ 129. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen
+ 130. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 131. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars
+ 132. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard
+ 133. http://www.karlrunge.com/x11vnc/index.html#faq-beeps
+ 134. http://www.karlrunge.com/x11vnc/index.html#faq-thanks
+ 135. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
136. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 137. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
- 138. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html
- 139. http://www.karlrunge.com/x11vnc/index.html#building
- 140. http://www.karlrunge.com/x11vnc/index.html#faq-build
- 141. http://packages.debian.org/x11vnc
- 142. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc
- 143. http://dag.wieers.com/packages/x11vnc/
- 144. http://www.sunfreeware.com/
- 145. http://www.bell-labs.com/project/wwexptools/packages.html
- 146. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
- 147. http://www.karlrunge.com/x11vnc/bins
- 148. http://www.tightvnc.com/download.html
- 149. http://www.realvnc.com/download-free.html
- 150. http://sourceforge.net/projects/cotvnc/
- 151. http://www.karlrunge.com/x11vnc/x11vnc_opts.html
- 152. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
- 153. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
- 154. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
- 155. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
- 156. http://www.karlrunge.com/x11vnc/x11vnc.c
- 157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sigpipe
- 158. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb
- 159. http://fredrik.hubbe.net/x2vnc.html
- 160. http://www.hubbe.net/~hubbe/win2vnc.html
- 161. http://www.deboer.gmxhome.de/
- 162. http://sourceforge.net/projects/win2vnc/
- 163. http://fredrik.hubbe.net/x2vnc.html
- 164. http://freshmeat.net/projects/x2x/
- 165. http://ftp.digital.com/pub/Digital/SRC/x2x/
- 166. http://zapek.com/software/zvnc/
- 167. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual
- 168. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap
- 169. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor
- 170. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp
- 171. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 172. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 173. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 137. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 138. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 139. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
+ 140. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html
+ 141. http://www.karlrunge.com/x11vnc/index.html#building
+ 142. http://www.karlrunge.com/x11vnc/index.html#faq-build
+ 143. http://packages.debian.org/x11vnc
+ 144. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc
+ 145. http://dag.wieers.com/packages/x11vnc/
+ 146. http://www.sunfreeware.com/
+ 147. http://www.bell-labs.com/project/wwexptools/packages.html
+ 148. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
+ 149. http://www.karlrunge.com/x11vnc/bins
+ 150. http://www.tightvnc.com/download.html
+ 151. http://www.realvnc.com/download-free.html
+ 152. http://sourceforge.net/projects/cotvnc/
+ 153. http://www.karlrunge.com/x11vnc/x11vnc_opts.html
+ 154. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 155. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
+ 156. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
+ 157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
+ 158. http://www.karlrunge.com/x11vnc/x11vnc.c
+ 159. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sigpipe
+ 160. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb
+ 161. http://fredrik.hubbe.net/x2vnc.html
+ 162. http://www.hubbe.net/~hubbe/win2vnc.html
+ 163. http://www.deboer.gmxhome.de/
+ 164. http://sourceforge.net/projects/win2vnc/
+ 165. http://fredrik.hubbe.net/x2vnc.html
+ 166. http://freshmeat.net/projects/x2x/
+ 167. http://ftp.digital.com/pub/Digital/SRC/x2x/
+ 168. http://zapek.com/software/zvnc/
+ 169. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual
+ 170. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap
+ 171. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor
+ 172. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp
+ 173. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
174. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 175. http://www.karlrunge.com/x11vnc/index.html#faq-overlays
- 176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid
- 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
- 179. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder
- 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 182. http://www.karlrunge.com/x11vnc/index.html#xauth_pain
- 183. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
- 184. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
- 185. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
- 186. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
- 187. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
- 188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods
- 189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys
- 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
- 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
- 192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
- 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
- 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 195. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
- 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd
- 197. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd
- 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
- 199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input
- 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
- 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared
- 203. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 204. http://www.karlrunge.com/x11vnc/index.html#faq-passwd
- 205. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
- 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 208. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers
- 209. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
- 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
- 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 175. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 177. http://www.karlrunge.com/x11vnc/index.html#faq-overlays
+ 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 179. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid
+ 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
+ 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder
+ 183. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 184. http://www.karlrunge.com/x11vnc/index.html#xauth_pain
+ 185. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 186. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 187. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
+ 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods
+ 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys
+ 192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
+ 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 197. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd
+ 199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd
+ 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input
+ 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared
+ 205. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 206. http://www.karlrunge.com/x11vnc/index.html#faq-passwd
+ 207. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 208. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 209. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 210. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers
+ 211. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
- 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
- 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 218. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 219. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
- 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
- 223. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
- 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly
- 227. ftp://ftp.x.org/
- 228. http://www.karlrunge.com/x11vnc/dtVncPopup
- 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
- 231. http://www.karlrunge.com/x11vnc/index.html#tunnelling
- 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
- 234. http://www.karlrunge.com/x11vnc/blockdpy.c
- 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
- 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
- 238. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
- 239. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
- 240. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop
- 241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 242. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris
- 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
- 244. http://www.jirka.org/gdm-documentation/x241.html
- 245. http://www.karlrunge.com/x11vnc/x11vnc_loop
- 246. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth
- 247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd
- 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
- 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
- 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir
- 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
- 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect
- 253. http://www.karlrunge.com/x11vnc/shm_clear
- 254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 256. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
- 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap
- 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
- 259. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
- 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
- 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
- 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
- 265. http://www.tightvnc.com/
- 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
- 267. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive
- 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
- 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
- 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
- 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
- 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
- 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
- 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
- 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
- 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 215. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 216. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
+ 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 220. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 221. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 225. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly
+ 229. ftp://ftp.x.org/
+ 230. http://www.karlrunge.com/x11vnc/dtVncPopup
+ 231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 233. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 236. http://www.karlrunge.com/x11vnc/blockdpy.c
+ 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 240. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
+ 241. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 242. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop
+ 243. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 244. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris
+ 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
+ 246. http://www.jirka.org/gdm-documentation/x241.html
+ 247. http://www.karlrunge.com/x11vnc/x11vnc_loop
+ 248. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth
+ 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd
+ 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
+ 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir
+ 253. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect
+ 255. http://www.karlrunge.com/x11vnc/shm_clear
+ 256. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 258. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 259. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap
+ 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
+ 267. http://www.tightvnc.com/
+ 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive
+ 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
- 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
- 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
- 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
- 281. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode
- 282. http://www.karlrunge.com/x11vnc/index.html#solaris10-build
- 283. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
- 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut
- 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac
- 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove
- 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
- 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend
- 289. http://www.tightvnc.com/
- 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
- 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos
- 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area
+ 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem
+ 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage
+ 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 287. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode
+ 288. http://www.karlrunge.com/x11vnc/index.html#solaris10-build
+ 289. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
+ 290. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut
+ 291. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac
+ 292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove
293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
- 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
- 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer
- 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
- 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 298. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
- 299. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
- 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
- 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 303. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
- 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
- 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
- 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
- 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes
+ 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend
+ 295. http://www.tightvnc.com/
+ 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos
+ 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
+ 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer
+ 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 304. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
+ 305. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 307. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
308. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
- 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
- 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
- 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
- 314. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
- 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 309. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 312. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes
+ 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
- 319. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
- 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
- 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
- 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout
- 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama
- 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
- 325. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
- 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
- 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
- 328. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr
- 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom
- 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
- 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary
- 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell
- 333. mailto:xvml@karlrunge.com
+ 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 320. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
+ 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 323. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 324. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 325. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
+ 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
+ 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
+ 328. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout
+ 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama
+ 330. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
+ 331. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
+ 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 334. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip
+ 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 336. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr
+ 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom
+ 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary
+ 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell
+ 342. mailto:xvml@karlrunge.com
=======================================================================
@@ -3458,51 +3541,53 @@ 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.2pre lastmod: 2005-03-0
-4
+x11vnc: allow VNC connections to real X11 displays. 0.7.2pre lastmod: 2005-03-1
+2
x11vnc options:
-display disp -auth file
-id windowid -sid windowid
- -flashcmap -notruecolor
- -visual n -overlay
- -overlay_nocursor -scale fraction
- -viewonly -shared
- -once -forever
- -timeout n -inetd
- -connect string -vncconnect
- -novncconnect -allow host1[,host2..]
- -localhost -input string
- -viewpasswd string -passwdfile filename
- -storepasswd pass file -accept string
- -gone string -users list
- -noshm -flipbyteorder
- -onetile -solid [color]
- -blackout string -xinerama
- -xrandr [mode] -padgeom WxH
- -o logfile -rc filename
- -norc -h, -help
- -?, -opts -V, -version
- -q -bg
- -modtweak -nomodtweak
- -xkb -skip_keycodes string
- -add_keysyms -clear_mods
- -clear_keys -remap string
- -norepeat -repeat
- -nofb -nobell
- -nosel -noprimary
- -cursor [mode] -nocursor
- -noxfixes -alphacut n
- -alphafrac fraction -alpharemove
- -noalphablend -nocursorshape
- -cursorpos -nocursorpos
- -xwarppointer -buttonmap string
- -nodragging -pointer_mode n
- -input_skip n -speeds rd,bw,lat
- -debug_pointer -debug_keyboard
- -defer time -wait time
- -nap -nonap
- -sb time -sigpipe string
+ -clip WxH+X+Y -flashcmap
+ -notruecolor -visual n
+ -overlay -overlay_nocursor
+ -scale fraction -viewonly
+ -shared -once
+ -forever -timeout n
+ -inetd -connect string
+ -vncconnect -novncconnect
+ -allow host1[,host2..] -localhost
+ -input string -viewpasswd string
+ -passwdfile filename -storepasswd pass file
+ -accept string -gone string
+ -users list -noshm
+ -flipbyteorder -onetile
+ -solid [color] -blackout string
+ -xinerama -xrandr [mode]
+ -padgeom WxH -o logfile
+ -rc filename -norc
+ -h, -help -?, -opts
+ -V, -version -q
+ -bg -modtweak
+ -nomodtweak -xkb
+ -skip_keycodes string -add_keysyms
+ -clear_mods -clear_keys
+ -remap string -norepeat
+ -repeat -nofb
+ -nobell -nosel
+ -noprimary -cursor [mode]
+ -nocursor -noxfixes
+ -alphacut n -alphafrac fraction
+ -alpharemove -noalphablend
+ -nocursorshape -cursorpos
+ -nocursorpos -xwarppointer
+ -buttonmap string -nodragging
+ -pointer_mode n -input_skip n
+ -speeds rd,bw,lat -debug_pointer
+ -debug_keyboard -defer time
+ -wait time -nap
+ -nonap -sb time
+ -noxdamage -xd_area A
+ -xd_mem f -sigpipe string
-threads -nothreads
-fs f -gaps n
-grow n -fuzz n
@@ -3536,8 +3621,8 @@ libvncserver options:
% x11vnc -help
-x11vnc: allow VNC connections to real X11 displays. 0.7.2pre lastmod: 2005-03-0
-4
+x11vnc: allow VNC connections to real X11 displays. 0.7.2pre lastmod: 2005-03-1
+2
Typical usage is:
@@ -3602,6 +3687,12 @@ Options:
shifts a root view to it: this shows SaveUnders menus,
etc, although they will be clipped if they extend beyond
the window.
+-clip WxH+X+Y Only show the sub-region of the full display that
+ corresponds to the rectangle with size WxH and offset
+ +X+Y. The VNC display has size WxH (i.e. smaller than
+ the full display). This also works for -id/-sid mode
+ where the offset is relative to the upper left corner
+ of the selected window.
-flashcmap In 8bpp indexed color, let the installed colormap flash
as the pointer moves from window to window (slow).
-notruecolor For 8bpp displays, force indexed color (i.e. a colormap)
@@ -4264,6 +4355,36 @@ Options:
to really throttle down the screen polls (i.e. sleep
for about 1.5 secs). Use 0 to disable. Default: 60
+-noxdamage Do not use the X DAMAGE extension to detect framebuffer
+ changes even if it is available.
+
+ x11vnc's use of the DAMAGE extension: 1) significantly
+ reduces the load when the screen is not changing much,
+ and 2) detects changed areas (small ones by default)
+ more quickly.
+
+ Currently the DAMAGE extension is overly conservative
+ and often reports large areas (e.g. a whole terminal
+ or browser window) as damaged even though the actual
+ changed region is much smaller (sometimes just a few
+ pixels). So heuristics were introduced to skip large
+ areas and use the damage rectangles only as "hints"
+ for the traditional scanline polling. The following
+ tuning parameters are introduced to adjust this
+ behavior:
+
+-xd_area A Set the largest DAMAGE rectangle area "A" (in
+ pixels: width * height) to trust as truly damaged:
+ the rectangle will be copied from the framebuffer
+ (slow) no matter what. Set to zero to trust *all*
+ rectangles. Default: 20000
+-xd_mem f Set how long DAMAGE rectangles should be "remembered",
+ "f" is a floating point number and is in units of the
+ scanline repeat cycle time (32 iterations). The default
+ (1.0) should give no painting problems. Increase it if
+ there are problems or decrease it to live on the edge
+ (perhaps useful on a slow machine).
+
-sigpipe string Broken pipe (SIGPIPE) handling. "string" can be
"ignore" or "exit". For "ignore" libvncserver
will handle the abrupt loss of a client and continue,
@@ -4388,6 +4509,7 @@ Options:
id:windowid set -id window to "windowid". empty
or "root" to go back to root window
sid:windowid set -sid window to "windowid"
+ clip:WxH+X+Y set -clip mode to "WxH+X+Y"
flashcmap enable -flashcmap mode.
noflashcmap disable -flashcmap mode.
notruecolor enable -notruecolor mode.
@@ -4523,6 +4645,10 @@ Options:
nap enable -nap mode.
nonap disable -nap mode.
sb:n set -sb to n s, same as screen_blank:n
+ xdamage enable xdamage polling hints.
+ noxdamage disable xdamage polling hints.
+ xd_area:A set -xd_area max pixel area to "A"
+ xd_mem:f set -xd_mem remembrance to "f"
fs:frac set -fs fraction to "frac", e.g. 0.5
gaps:n set -gaps to n.
grow:n set -grow to n.
@@ -4589,7 +4715,7 @@ Options:
variables correspond to the presence of X extensions):
ans= stop quit exit shutdown ping blacken zero
- refresh reset close disconnect id sid waitmapped
+ refresh reset close disconnect id sid clip waitmapped
nowaitmapped flashcmap noflashcmap truecolor notruecolor
overlay nooverlay overlay_cursor overlay_yescursor
nooverlay_nocursor nooverlay_cursor nooverlay_yescursor
@@ -4605,9 +4731,10 @@ Options:
remap repeat norepeat fb nofb bell nobell sel
nosel primary noprimary cursorshape nocursorshape
cursorpos nocursorpos cursor show_cursor noshow_cursor
- nocursor xfixes noxfixes alphacut alphafrac alpharemove
- noalpharemove alphablend noalphablend xwarp xwarppointer
- noxwarp noxwarppointer buttonmap dragging nodragging
+ nocursor xfixes noxfixes xdamage noxdamage xd_area
+ xd_mem alphacut alphafrac alpharemove noalpharemove
+ alphablend noalphablend xwarp xwarppointer noxwarp
+ noxwarppointer buttonmap dragging nodragging
pointer_mode pm input_skip input client_input speeds
debug_pointer dp nodebug_pointer nodp debug_keyboard dk
nodebug_keyboard nodk deferupdate defer wait rfbwait
@@ -4618,15 +4745,16 @@ Options:
nodontdisconnect desktop noremote
aro= display vncdisplay desktopname http_url auth
- users rootshift scale_str scaled_x scaled_y scale_numer
- scale_denom scale_fac scaling_noblend scaling_nomult4
- scaling_pad scaling_interpolate inetd safer unsafe
- passwdfile using_shm logfile o rc norc h help V version
- lastmod bg sigpipe threads clients client_count pid
- ext_xtest 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 rfbauth passwd
+ users rootshift clipshift scale_str scaled_x scaled_y
+ scale_numer scale_denom scale_fac scaling_noblend
+ scaling_nomult4 scaling_pad scaling_interpolate inetd
+ safer unsafe passwdfile using_shm logfile o rc norc
+ h help V version lastmod bg sigpipe threads clients
+ client_count pid ext_xtest ext_xkb ext_xshm ext_xinerama
+ ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin
+ num_buttons button_mask mouse_x mouse_y bpp depth
+ indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y
+ cdpy_x cdpy_y coff_x coff_y rfbauth passwd
-sync By default -remote commands are run asynchronously, that
is, the request is posted and the program immediately
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index e43b73c..963eecd 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -115,6 +115,7 @@ Screen
flashcmap
notruecolor
--
+ clip:
=P blackout:
xinerama
--
@@ -139,12 +140,16 @@ Keyboard
Pointer
=D-C:none,arrow,X,some,most cursor:
- noxfixes
- noalphablend
--
cursorpos
=D nocursorshape
--
+ noxfixes
+ noalphablend
+ alphacut:
+ alphafrac:
+ alpharemove
+ --
buttonmap:
--
xwarppointer
@@ -220,10 +225,6 @@ Tuning
noshm
flipbyteorder
onetile
- --
- alphacut:
- alphafrac:
- alpharemove
-- D
speeds:
=D wait:
@@ -237,6 +238,11 @@ Tuning
fuzz:
snapfb
--
+ xdamage
+ xd_mem:
+ xd_area:
+ xd_width:
+ --
threads
--
progressive:
@@ -2042,17 +2048,18 @@ proc client_dialog {client} {
global menu_var text_area cleanup_window item_bool
append_text "\nClient info string: $client\n\n"
- if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*)$} \
- $client m0 m1 m2 m3 m4 m5 m6]} {
- # id:ip:port:hostname:input:loginvo
+ if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \
+ $client m0 m1 m2 m3 m4 m5 m6 m7]} {
+ # id:ip:port:user:hostname:input:loginvo
set cid $m1
set ip $m2
set port $m3
- set host $m4
+ set user $m4
+ set host $m5
regsub {\..*$} $host "" host
- set input $m5
- set logvo $m6
- append_text "Host: $host, Port: $port, IP: $ip, Id: $cid\n"
+ set input $m6
+ set logvo $m7
+ append_text "Host: $host, Port: $port, User: $user, IP: $ip, Id: $cid\n"
append_text " - originally logged in as: "
if {$logvo == "1" } {
append_text "View-Only Client\n"
@@ -2184,10 +2191,10 @@ proc update_clients_menu {list} {
$subm add separator
set count 0
foreach client [split $list ","] {
- if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*)$} \
- $client m0 m1 m2 m3 m4 m5 m6]} {
- # id:ip:port:hostname:input:loginvo
- set host $m4
+ if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \
+ $client m0 m1 m2 m3 m4 m5 m6 m7]} {
+ # id:ip:port:user:hostname:input:loginvo
+ set host $m5
regsub {\..*$} $host "" host
set clabel "$host $m1"
} else {
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 2ecfdbe..1fcfbd0 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -121,6 +121,7 @@
" flashcmap\n"
" notruecolor\n"
" --\n"
+" clip:\n"
" =P blackout:\n"
" xinerama\n"
" --\n"
@@ -145,12 +146,16 @@
"\n"
"Pointer\n"
" =D-C:none,arrow,X,some,most cursor:\n"
-" noxfixes\n"
-" noalphablend\n"
" --\n"
" cursorpos\n"
" =D nocursorshape\n"
" --\n"
+" noxfixes\n"
+" noalphablend\n"
+" alphacut:\n"
+" alphafrac:\n"
+" alpharemove\n"
+" --\n"
" buttonmap:\n"
" --\n"
" xwarppointer\n"
@@ -226,10 +231,6 @@
" noshm\n"
" flipbyteorder\n"
" onetile\n"
-" --\n"
-" alphacut:\n"
-" alphafrac:\n"
-" alpharemove\n"
" -- D\n"
" speeds:\n"
" =D wait:\n"
@@ -243,6 +244,11 @@
" fuzz:\n"
" snapfb\n"
" --\n"
+" xdamage\n"
+" xd_mem:\n"
+" xd_area:\n"
+" xd_width:\n"
+" --\n"
" threads\n"
" --\n"
" progressive:\n"
@@ -2048,17 +2054,18 @@
" global menu_var text_area cleanup_window item_bool\n"
"\n"
" append_text \"\\nClient info string: $client\\n\\n\"\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
-" $client m0 m1 m2 m3 m4 m5 m6]} {\n"
-" # id:ip:port:hostname:input:loginvo\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7]} {\n"
+" # id:ip:port:user:hostname:input:loginvo\n"
" set cid $m1\n"
" set ip $m2\n"
" set port $m3\n"
-" set host $m4\n"
+" set user $m4\n"
+" set host $m5\n"
" regsub {\\..*$} $host \"\" host\n"
-" set input $m5\n"
-" set logvo $m6\n"
-" append_text \"Host: $host, Port: $port, IP: $ip, Id: $cid\\n\"\n"
+" set input $m6\n"
+" set logvo $m7\n"
+" append_text \"Host: $host, Port: $port, User: $user, IP: $ip, Id: $cid\\n\"\n"
" append_text \" - originally logged in as: \"\n"
" if {$logvo == \"1\" } {\n"
" append_text \"View-Only Client\\n\"\n"
@@ -2190,10 +2197,10 @@
" $subm add separator\n"
" set count 0\n"
" foreach client [split $list \",\"] {\n"
-" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
-" $client m0 m1 m2 m3 m4 m5 m6]} {\n"
-" # id:ip:port:hostname:input:loginvo\n"
-" set host $m4\n"
+" if {[regexp {^(.*):(.*):(.*):(.*):(.*):(.*):(.*)$} \\\n"
+" $client m0 m1 m2 m3 m4 m5 m6 m7]} {\n"
+" # id:ip:port:user:hostname:input:loginvo\n"
+" set host $m5\n"
" regsub {\\..*$} $host \"\" host\n"
" set clabel \"$host $m1\"\n"
" } else {\n"
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 3c29d76..7eeabe6 100644
--- a/x11vnc/x11vnc.1
+++ b/x11vnc/x11vnc.1
@@ -2,7 +2,7 @@
.TH X11VNC "1" "March 2005" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
- version: 0.7.2pre, lastmod: 2005-03-04
+ version: 0.7.2pre, lastmod: 2005-03-12
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@@ -89,6 +89,15 @@ shifts a root view to it: this shows SaveUnders menus,
etc, although they will be clipped if they extend beyond
the window.
.PP
+\fB-clip\fR \fIWxH+X+Y\fR
+.IP
+Only show the sub-region of the full display that
+corresponds to the rectangle with size WxH and offset
++X+Y. The VNC display has size WxH (i.e. smaller than
+the full display). This also works for \fB-id/-sid\fR mode
+where the offset is relative to the upper left corner
+of the selected window.
+.PP
\fB-flashcmap\fR
.IP
In 8bpp indexed color, let the installed colormap flash
@@ -994,6 +1003,43 @@ Time in seconds after NO activity (e.g. screen blank)
to really throttle down the screen polls (i.e. sleep
for about 1.5 secs). Use 0 to disable. Default: 60
.PP
+\fB-noxdamage\fR
+.IP
+Do not use the X DAMAGE extension to detect framebuffer
+changes even if it is available.
+.IP
+x11vnc's use of the DAMAGE extension: 1) significantly
+reduces the load when the screen is not changing much,
+and 2) detects changed areas (small ones by default)
+more quickly.
+.IP
+Currently the DAMAGE extension is overly conservative
+and often reports large areas (e.g. a whole terminal
+or browser window) as damaged even though the actual
+changed region is much smaller (sometimes just a few
+pixels). So heuristics were introduced to skip large
+areas and use the damage rectangles only as "hints"
+for the traditional scanline polling. The following
+tuning parameters are introduced to adjust this
+behavior:
+.PP
+\fB-xd_area\fR \fIA\fR
+.IP
+Set the largest DAMAGE rectangle area \fIA\fR (in
+pixels: width * height) to trust as truly damaged:
+the rectangle will be copied from the framebuffer
+(slow) no matter what. Set to zero to trust *all*
+rectangles. Default: 20000
+.PP
+\fB-xd_mem\fR \fIf\fR
+.IP
+Set how long DAMAGE rectangles should be "remembered",
+\fIf\fR is a floating point number and is in units of the
+scanline repeat cycle time (32 iterations). The default
+(1.0) should give no painting problems. Increase it if
+there are problems or decrease it to live on the edge
+(perhaps useful on a slow machine).
+.PP
\fB-sigpipe\fR \fIstring\fR
.IP
Broken pipe (SIGPIPE) handling. \fIstring\fR can be
@@ -1149,6 +1195,8 @@ id:windowid set \fB-id\fR window to "windowid". empty
.IP
sid:windowid set \fB-sid\fR window to "windowid"
.IP
+clip:WxH+X+Y set \fB-clip\fR mode to "WxH+X+Y"
+.IP
flashcmap enable \fB-flashcmap\fR mode.
.IP
noflashcmap disable \fB-flashcmap\fR mode.
@@ -1387,6 +1435,14 @@ nonap disable \fB-nap\fR mode.
.IP
sb:n set \fB-sb\fR to n s, same as screen_blank:n
.IP
+xdamage enable xdamage polling hints.
+.IP
+noxdamage disable xdamage polling hints.
+.IP
+xd_area:A set \fB-xd_area\fR max pixel area to "A"
+.IP
+xd_mem:f set \fB-xd_mem\fR remembrance to "f"
+.IP
fs:frac set \fB-fs\fR fraction to "frac", e.g. 0.5
.IP
gaps:n set \fB-gaps\fR to n.
@@ -1491,7 +1547,7 @@ 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
+refresh reset close disconnect id sid clip waitmapped
nowaitmapped flashcmap noflashcmap truecolor notruecolor
overlay nooverlay overlay_cursor overlay_yescursor
nooverlay_nocursor nooverlay_cursor nooverlay_yescursor
@@ -1507,9 +1563,10 @@ clear_mods noclear_mods clear_keys noclear_keys
remap repeat norepeat fb nofb bell nobell sel
nosel primary noprimary cursorshape nocursorshape
cursorpos nocursorpos cursor show_cursor noshow_cursor
-nocursor xfixes noxfixes alphacut alphafrac alpharemove
-noalpharemove alphablend noalphablend xwarp xwarppointer
-noxwarp noxwarppointer buttonmap dragging nodragging
+nocursor xfixes noxfixes xdamage noxdamage xd_area
+xd_mem alphacut alphafrac alpharemove noalpharemove
+alphablend noalphablend xwarp xwarppointer noxwarp
+noxwarppointer buttonmap dragging nodragging
pointer_mode pm input_skip input client_input speeds
debug_pointer dp nodebug_pointer nodp debug_keyboard dk
nodebug_keyboard nodk deferupdate defer wait rfbwait
@@ -1520,15 +1577,16 @@ noalwaysshared nevershared noalwaysshared dontdisconnect
nodontdisconnect desktop noremote
.IP
aro= display vncdisplay desktopname http_url auth
-users rootshift scale_str scaled_x scaled_y scale_numer
-scale_denom scale_fac scaling_noblend scaling_nomult4
-scaling_pad scaling_interpolate inetd safer unsafe
-passwdfile using_shm logfile o rc norc h help V version
-lastmod bg sigpipe threads clients client_count pid
-ext_xtest 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 rfbauth passwd
+users rootshift clipshift scale_str scaled_x scaled_y
+scale_numer scale_denom scale_fac scaling_noblend
+scaling_nomult4 scaling_pad scaling_interpolate inetd
+safer unsafe passwdfile using_shm logfile o rc norc
+h help V version lastmod bg sigpipe threads clients
+client_count pid ext_xtest ext_xkb ext_xshm ext_xinerama
+ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin
+num_buttons button_mask mouse_x mouse_y bpp depth
+indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y
+cdpy_x cdpy_y coff_x coff_y rfbauth passwd
.PP
\fB-sync\fR
.IP
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index f10b683..d64a318 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -169,7 +169,7 @@
/*
#define LIBVNCSERVER_HAVE_LIBXINERAMA 1
#define LIBVNCSERVER_HAVE_XFIXES 1
-#define LIBVNCSERVER_HAVE_XDAMAGE 1
+#define LIBVNCSERVER_HAVE_LIBXDAMAGE 1
*/
#endif /* OLD_TREE */
@@ -329,13 +329,21 @@ static int xfixes_base_event_type;
#endif
int xdamage_present = 0;
+int using_xdamage = 0;
+int use_xdamage_hints = 1; /* just use the xdamage rects. for scanline hints */
#if LIBVNCSERVER_HAVE_LIBXDAMAGE
#include <X11/extensions/Xdamage.h>
static int xdamage_base_event_type;
+Damage xdamage = 0;
#endif
+int xdamage_max_area = 20000; /* pixels */
+double xdamage_memory = 1.0; /* in units of NSCAN */
+int xdamage_tile_count;
+
+int hack_val = 0;
/* date +'lastmod: %Y-%m-%d' */
-char lastmod[] = "0.7.2pre lastmod: 2005-03-04";
+char lastmod[] = "0.7.2pre lastmod: 2005-03-12";
/* X display info */
@@ -347,6 +355,8 @@ int bpp, depth;
int indexed_color = 0;
int dpy_x, dpy_y; /* size of display */
int off_x, off_y; /* offsets for -sid */
+int wdpy_x, wdpy_y; /* for actual sizes in case of -clip */
+int cdpy_x, cdpy_y, coff_x, coff_y; /* the -clip params */
int button_mask = 0; /* button state and info */
int num_buttons = -1;
@@ -395,6 +405,7 @@ unsigned short main_red_shift, main_green_shift, main_blue_shift;
typedef struct _ClientData {
int uid;
char *hostname;
+ char *username;
int client_port;
int server_port;
char *server_ip;
@@ -432,6 +443,7 @@ int ntiles, ntiles_x, ntiles_y;
/* arrays that indicate changed or checked tiles. */
unsigned char *tile_has_diff, *tile_tried, *tile_copied;
+unsigned char *tile_has_xdamage_diff, *tile_row_has_xdamage_diff;
/* times of recent events */
time_t last_event, last_input, last_client = 0;
@@ -466,6 +478,15 @@ Atom vnc_connect_prop = None;
struct utsname UT;
+/* scan pattern jitter from x0rfbserver */
+#define NSCAN 32
+int scanlines[NSCAN] = {
+ 0, 16, 8, 24, 4, 20, 12, 28,
+ 10, 26, 18, 2, 22, 6, 30, 14,
+ 1, 17, 9, 25, 7, 23, 15, 31,
+ 19, 3, 27, 11, 29, 13, 5, 21
+};
+
/* function prototypes (see filename comment above) */
int all_clients_initialized(void);
@@ -511,6 +532,9 @@ void free_tiles(void);
void initialize_watch_bell(void);
void initialize_xinerama(void);
void initialize_xfixes(void);
+void initialize_xdamage(void);
+void create_xdamage(void);
+void destroy_xdamage(void);
void initialize_xrandr(void);
XImage *initialize_xdisplay_fb(void);
@@ -596,24 +620,25 @@ void refresh_screen(void);
/*
* variables for the command line options
*/
-char *use_dpy = NULL;
-char *auth_file = NULL;
-char *visual_str = NULL;
-char *logfile = NULL;
+char *use_dpy = NULL; /* -display */
+char *auth_file = NULL; /* -auth/-xauth */
+char *visual_str = NULL; /* -visual */
+char *logfile = NULL; /* -o, -logfile */
int logfile_append = 0;
-char *passwdfile = NULL;
-char *blackout_str = NULL;
-int use_solid_bg = 0;
+char *passwdfile = NULL; /* -passwdfile */
+char *blackout_str = NULL; /* -blackout */
+char *clip_str = NULL; /* -clip */
+int use_solid_bg = 0; /* -solid */
char *solid_str = NULL;
char *solid_default = "cyan4";
-char *speeds_str = NULL;
+char *speeds_str = NULL; /* -speeds TBD */
int measure_speeds = 1;
int speeds_net_rate = 0;
int speeds_net_latency = 0;
int speeds_read_rate = 0;
-char *rc_rcfile = NULL;
+char *rc_rcfile = NULL; /* -rc */
int rc_norc = 0;
int opts_bg = 0;
@@ -866,6 +891,32 @@ int scan_hexdec(char *str, unsigned long *num) {
return 1;
}
+int parse_geom(char *str, int *wp, int *hp, int *xp, int *yp, int W, int H) {
+ int w, h, x, y;
+ /* handle +/-x and +/-y */
+ if (sscanf(str, "%dx%d+%d+%d", &w, &h, &x, &y) == 4) {
+ ;
+ } else if (sscanf(str, "%dx%d-%d+%d", &w, &h, &x, &y) == 4) {
+ w = nabs(w);
+ x = W - x - w;
+ } else if (sscanf(str, "%dx%d+%d-%d", &w, &h, &x, &y) == 4) {
+ h = nabs(h);
+ y = H - y - h;
+ } else if (sscanf(str, "%dx%d-%d-%d", &w, &h, &x, &y) == 4) {
+ w = nabs(w);
+ h = nabs(h);
+ x = W - x - w;
+ y = H - y - h;
+ } else {
+ return 0;
+ }
+ *wp = w;
+ *hp = h;
+ *xp = x;
+ *yp = y;
+ return 1;
+}
+
void set_env(char *name, char *value) {
char *str;
str = (char *)malloc(strlen(name)+strlen(value)+2);
@@ -1704,6 +1755,7 @@ void try_to_switch_users(void) {
free(users);
}
+/* -- inet.c -- */
/*
* Simple utility to map host name to dotted IP address. Ignores aliases.
* Up to caller to free returned string.
@@ -1728,9 +1780,6 @@ char *ip2host(char *ip) {
char *str;
#if LIBVNCSERVER_HAVE_NETDB_H && LIBVNCSERVER_HAVE_NETINET_IN_H
struct hostent *hp;
-#ifndef in_addr_t
-typedef unsigned int in_addr_t;
-#endif
in_addr_t iaddr;
iaddr = inet_addr(ip);
@@ -1821,6 +1870,96 @@ char *get_local_host(int sock) {
return get_host(sock, 0);
}
+char *ident_username(rfbClientPtr client) {
+ ClientData *cd = (ClientData *) client->clientData;
+ char *str, *newhost, *user = NULL, *newuser = NULL;
+ int len;
+
+ if (cd) {
+ user = cd->username;
+ }
+ if (!user || *user == '\0') {
+ char msg[128];
+ int n, sock, ok = 0;
+
+ if ((sock = rfbConnectToTcpAddr(client->host, 113)) < 0) {
+ rfbLog("could not connect to ident: %s:%d\n",
+ client->host, 113);
+ } else {
+ int ret;
+ fd_set rfds;
+ struct timeval tv;
+ int rport = get_remote_port(client->sock);
+ int lport = get_local_port(client->sock);
+
+ sprintf(msg, "%d, %d\r\n", rport, lport);
+ n = write(sock, msg, strlen(msg));
+
+ FD_ZERO(&rfds);
+ FD_SET(sock, &rfds);
+ tv.tv_sec = 4;
+ tv.tv_usec = 0;
+ ret = select(sock+1, &rfds, NULL, NULL, &tv);
+
+ if (ret > 0) {
+ int i;
+ char *q, *p;
+ for (i=0; i<128; i++) {
+ msg[i] = '\0';
+ }
+ usleep(250*1000);
+ n = read(sock, msg, 127);
+ close(sock);
+ if (n <= 0) goto badreply;
+
+ /* 32782 , 6000 : USERID : UNIX :runge */
+ q = strstr(msg, "USERID");
+ if (!q) goto badreply;
+ q = strstr(q, ":");
+ if (!q) goto badreply;
+ q++;
+ q = strstr(q, ":");
+ if (!q) goto badreply;
+ q++;
+ q = lblanks(q);
+ p = q;
+ while (*p) {
+ if (*p == '\r' || *p == '\n') {
+ *p = '\0';
+ }
+ p++;
+ }
+ ok = 1;
+ if (strlen(q) > 24) {
+ *(q+24) = '\0';
+ }
+ newuser = strdup(q);
+
+ badreply:
+ n = 0; /* avoid syntax error */
+ } else {
+ close(sock);
+ }
+ }
+ if (! ok || !newuser) {
+ newuser = strdup("unknown-user");
+ }
+ if (cd) {
+ free(cd->username);
+ cd->username = newuser;
+ }
+ user = newuser;
+ }
+ newhost = ip2host(client->host);
+ len = strlen(user) + 1 + strlen(newhost) + 1;
+ str = (char *)malloc(len);
+ sprintf(str, "%s@%s", user, newhost);
+ free(newhost);
+ return str;
+}
+
+/* -- ximage.c -- */
+
/*
* used in rfbGetScreen and rfbNewFramebuffer: and estimate to the number
* of bits per color, of course for some visuals, e.g. 565, the number
@@ -1846,42 +1985,25 @@ int guess_bits_per_color(int bits_per_pixel) {
return bits_per_color;
}
-/* count number of clients supporting NewFBSize */
-int new_fb_size_clients(rfbScreenInfoPtr s) {
- rfbClientIteratorPtr iter;
- rfbClientPtr cl;
- int count = 0;
-
- if (! s) {
- return 0;
- }
-
- iter = rfbGetClientIterator(s);
- while( (cl = rfbClientIteratorNext(iter)) ) {
- if (cl->useNewFBSize) {
- count++;
- }
- }
- rfbReleaseClientIterator(iter);
- return count;
-}
-
/*
* Kludge to interpose image gets and limit to a subset rectangle of
* the rootwin. This is the -sid option trying to work around invisible
- * saveUnders menu, etc, windows.
+ * saveUnders menu, etc, windows. Also -clip option.
*/
int rootshift = 0;
+int clipshift = 0;
#define ADJUST_ROOTSHIFT \
if (rootshift && subwin) { \
d = rootwin; \
x += off_x; \
y += off_y; \
+ } \
+ if (clipshift) { \
+ x += coff_x; \
+ y += coff_y; \
}
-/* -- ximage.c -- */
-
/*
* Wrappers for Image related X calls
*/
@@ -2025,7 +2147,7 @@ XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth,
void copy_image(XImage *dest, int x, int y, unsigned int w, unsigned int h) {
- /* default (w=0,h=0) is the fill the entire XImage */
+ /* default (w=0, h=0) is the fill the entire XImage */
if (w < 1) {
w = dest->width;
}
@@ -2222,6 +2344,11 @@ void clean_up_exit (int ret) {
}
X_LOCK;
XTestDiscard_wr(dpy);
+#if LIBVNCSERVER_HAVE_LIBXDAMAGE
+ if (xdamage) {
+ XDamageDestroy(dpy, xdamage);
+ }
+#endif
XCloseDisplay(dpy);
X_UNLOCK;
@@ -2493,9 +2620,9 @@ char *list_clients(void) {
/*
* each client:
- * <id>:<ip>:<port>:<hostname>:<input>:<loginview>,
- * 8+1+16+1+5+1+256+1+5+1+1+1
- * 123.123.123.123:60000/0x11111111-rw, = 297 bytes
+ * <id>:<ip>:<port>:<user>:<hostname>:<input>:<loginview>,
+ * 8+1+16+1+5+1+24+1+256+1+5+1+1+1
+ * 123.123.123.123:60000/0x11111111-rw,
* so count+1 * 400 must cover it.
*/
list = (char *) malloc((count+1)*400);
@@ -2514,6 +2641,12 @@ char *list_clients(void) {
strcat(list, ":");
sprintf(tmp, "%d:", cd->client_port);
strcat(list, tmp);
+ if (*(cd->username) == '\0') {
+ char *s = ident_username(cl);
+ if (s) free(s);
+ }
+ strcat(list, cd->username);
+ strcat(list, ":");
strcat(list, cd->hostname);
strcat(list, ":");
strcat(list, cd->input);
@@ -2525,6 +2658,26 @@ char *list_clients(void) {
return list;
}
+/* count number of clients supporting NewFBSize */
+int new_fb_size_clients(rfbScreenInfoPtr s) {
+ rfbClientIteratorPtr iter;
+ rfbClientPtr cl;
+ int count = 0;
+
+ if (! s) {
+ return 0;
+ }
+
+ iter = rfbGetClientIterator(s);
+ while( (cl = rfbClientIteratorNext(iter)) ) {
+ if (cl->useNewFBSize) {
+ count++;
+ }
+ }
+ rfbReleaseClientIterator(iter);
+ return count;
+}
+
void close_all_clients(void) {
rfbClientIteratorPtr iter;
rfbClientPtr cl;
@@ -2779,6 +2932,9 @@ static void client_gone(rfbClientPtr client) {
if (cd->hostname) {
free(cd->hostname);
}
+ if (cd->username) {
+ free(cd->username);
+ }
}
free(client->clientData);
}
@@ -2958,8 +3114,8 @@ static int check_access(char *addr) {
* x11vnc's first (and only) visible widget: accept/reject dialog window.
* We go through this pain to avoid dependency on libXt...
*/
-static int ugly_accept_window(char *addr, int X, int Y, int timeout,
- char *mode) {
+static int ugly_accept_window(char *addr, char *userhost, int X, int Y,
+ int timeout, char *mode) {
#define t2x2_width 16
#define t2x2_height 16
@@ -2989,6 +3145,7 @@ static char t2x2_bits[] = {
/* strings and geometries y/n */
KeyCode key_y, key_n, key_v;
char strh[100];
+ char stri[100];
char str1_b[] = "To accept: press \"y\" or click the \"Yes\" button";
char str2_b[] = "To reject: press \"n\" or click the \"No\" button";
char str3_b[] = "View only: press \"v\" or click the \"View\" button";
@@ -3002,7 +3159,7 @@ static char t2x2_bits[] = {
char str_y[] = "Yes";
char str_n[] = "No";
char str_v[] = "View";
- int x, y, w = 345, h = 150, ret = 0;
+ int x, y, w = 345, h = 175, ret = 0;
int X_sh = 20, Y_sh = 30, dY = 20;
int Ye_x = 20, Ye_y = 0, Ye_w = 45, Ye_h = 20;
int No_x = 75, No_y = 0, No_w = 45, No_h = 20;
@@ -3026,6 +3183,7 @@ static char t2x2_bits[] = {
h -= dY;
}
+ /* XXX handle coff_x/coff_y? */
if (X < -dpy_x) {
x = (dpy_x - w)/2; /* large negative: center */
if (x < 0) x = 0;
@@ -3086,7 +3244,8 @@ static char t2x2_bits[] = {
XMapWindow(dpy, awin);
XFlush(dpy);
- sprintf(strh, "x11vnc: accept connection from %s?", addr);
+ snprintf(strh, 100, "x11vnc: accept connection from %s?", addr);
+ snprintf(stri, 100, " (%s)", userhost);
key_y = XKeysymToKeycode(dpy, XStringToKeysym("y"));
key_n = XKeysymToKeycode(dpy, XStringToKeysym("n"));
key_v = XKeysymToKeycode(dpy, XStringToKeysym("v"));
@@ -3123,6 +3282,8 @@ static char t2x2_bits[] = {
XDrawString(dpy, awin, gc, X_sh, Y_sh+(k++)*dY,
strh, strlen(strh));
XDrawString(dpy, awin, gc, X_sh, Y_sh+(k++)*dY,
+ stri, strlen(stri));
+ XDrawString(dpy, awin, gc, X_sh, Y_sh+(k++)*dY,
str1, strlen(str1));
XDrawString(dpy, awin, gc, X_sh, Y_sh+(k++)*dY,
str2, strlen(str2));
@@ -3336,6 +3497,7 @@ static int accept_client(rfbClientPtr client) {
addr = "unknown-host";
}
+
if (strstr(accept_cmd, "popup") == accept_cmd) {
/* use our builtin popup button */
@@ -3344,6 +3506,7 @@ static int accept_client(rfbClientPtr client) {
int ret, timeout = 120;
int x = -64000, y = -64000;
char *p, *mode;
+ char *userhost = ident_username(client);
/* extract timeout */
if ((p = strchr(accept_cmd, ':')) != NULL) {
@@ -3380,7 +3543,9 @@ static int accept_client(rfbClientPtr client) {
}
rfbLog("accept_client: using builtin popup for: %s\n", addr);
- if ((ret = ugly_accept_window(addr, x, y, timeout, mode))) {
+ if ((ret = ugly_accept_window(addr, userhost, x, y, timeout,
+ mode))) {
+ free(userhost);
if (ret == 2) {
rfbLog("accept_client: viewonly: %s\n", addr);
client->viewOnly = TRUE;
@@ -3388,6 +3553,7 @@ static int accept_client(rfbClientPtr client) {
rfbLog("accept_client: popup accepted: %s\n", addr);
return 1;
} else {
+ free(userhost);
rfbLog("accept_client: popup rejected: %s\n", addr);
return 0;
}
@@ -3787,6 +3953,7 @@ enum rfbNewClientAction new_client(rfbClientPtr client) {
cd->server_port = get_local_port(client->sock);
cd->server_ip = get_local_host(client->sock);
cd->hostname = ip2host(client->host);
+ cd->username = strdup("");
cd->input[0] = '-';
cd->login_viewonly = -1;
@@ -5755,11 +5922,15 @@ static void update_x11_pointer_position(int x, int y) {
X_LOCK;
if (use_xwarppointer) {
- /* off_x and off_y not needed with XWarpPointer */
- XWarpPointer(dpy, None, window, 0, 0, 0, 0, x, y);
+ /*
+ * off_x and off_y not needed with XWarpPointer since
+ * window is used:
+ */
+ XWarpPointer(dpy, None, window, 0, 0, 0, 0, x + coff_x,
+ y + coff_y);
} else {
- XTestFakeMotionEvent_wr(dpy, scr, x+off_x, y+off_y,
- CurrentTime);
+ XTestFakeMotionEvent_wr(dpy, scr, x + off_x + coff_x,
+ y + off_y + coff_y, CurrentTime);
}
X_UNLOCK;
@@ -5786,7 +5957,7 @@ static void update_x11_pointer_position(int x, int y) {
}
/*
- * Send a pointer position event to the X server.
+ * Send a pointer button event to the X server.
*/
static void update_x11_pointer_mask(int mask) {
int i, mb;
@@ -6164,8 +6335,8 @@ XErrorHandler old_getimage_handler;
/* -- xrandr.c -- */
void initialize_xrandr(void) {
-#if LIBVNCSERVER_HAVE_LIBXRANDR
if (xrandr_present) {
+#if LIBVNCSERVER_HAVE_LIBXRANDR
Rotation rot;
xrandr_width = XDisplayWidth(dpy, scr);
@@ -6177,15 +6348,20 @@ void initialize_xrandr(void) {
} else {
XRRSelectInput(dpy, rootwin, 0);
}
- }
#endif
+ } else if (xrandr) {
+ rfbLog("-xrandr mode specified, but no RANDR support on\n");
+ rfbLog(" display or in client library. Disabling -xrandr "
+ "mode.\n");
+ xrandr = 0;
+ }
}
void handle_xrandr_change(int, int);
int handle_subwin_resize(char *msg) {
int new_x, new_y;
- int i, check = 10, ms = 250; /* 2.5 secs... */
+ int i, check = 10, ms = 250; /* 2.5 secs total... */
if (! subwin) {
return 0; /* hmmm... */
@@ -6200,7 +6376,7 @@ int handle_subwin_resize(char *msg) {
X_UNLOCK;
clean_up_exit(1);
}
- if (dpy_x == new_x && dpy_y == new_y) {
+ if (wdpy_x == new_x && wdpy_y == new_y) {
/* no change */
return 0;
}
@@ -6225,7 +6401,7 @@ int handle_subwin_resize(char *msg) {
}
rfbLog("subwin 0x%lx new size: x: %d -> %d, y: %d -> %d\n",
- subwin, dpy_x, new_x, dpy_y, new_y);
+ subwin, wdpy_x, new_x, wdpy_y, new_y);
rfbLog("calling handle_xrandr_change() for resizing\n");
X_UNLOCK;
@@ -6268,11 +6444,11 @@ void handle_xrandr_change(int new_x, int new_y) {
/* default, resize, and newfbsize create a new fb: */
rfbLog("check_xrandr_event: trying to create new framebuffer...\n");
- if (new_x < dpy_x || new_y < dpy_y) {
+ if (new_x < wdpy_x || new_y < wdpy_y) {
check_black_fb();
}
do_new_fb(1);
- rfbLog("check_xrandr_event: fb WxH: %dx%d\n", dpy_x, dpy_y);
+ rfbLog("check_xrandr_event: fb WxH: %dx%d\n", wdpy_x, wdpy_y);
}
int check_xrandr_event(char *msg) {
@@ -6304,8 +6480,8 @@ int check_xrandr_event(char *msg) {
rfbLog(" mheight: %d mm\n", (int) rev->mheight);
rfbLog("\n");
rfbLog("check_xrandr_event: previous WxH: %dx%d\n",
- dpy_x, dpy_y);
- if (dpy_x == rev->width && dpy_y == rev->height &&
+ wdpy_x, wdpy_y);
+ if (wdpy_x == rev->width && wdpy_y == rev->height &&
xrandr_rotation == (int) rev->rotation) {
rfbLog("check_xrandr_event: no change detected.\n");
do_change = 0;
@@ -6624,6 +6800,7 @@ void initialize_xevents(void) {
static int did_xcreate_simple_window = 0;
static int did_vnc_connect_prop = 0;
static int did_xfixes = 0;
+ static int did_xdamage = 0;
static int did_xrandr = 0;
X_LOCK;
@@ -6656,6 +6833,10 @@ void initialize_xevents(void) {
initialize_xfixes();
did_xfixes = 1;
}
+ if (xdamage_present && !did_xdamage) {
+ initialize_xdamage();
+ did_xdamage = 1;
+ }
}
/*
@@ -7407,7 +7588,8 @@ char *process_remote_cmd(char *cmd, int stringonly) {
Window twin;
COLON_CHECK("id:")
if (query) {
- snprintf(buf, bufn, "ans=%s%s0x%lx", p, co, subwin);
+ snprintf(buf, bufn, "ans=%s%s0x%lx", p, co,
+ rootshift ? 0 : subwin);
goto qry;
}
p += strlen("id:");
@@ -7444,7 +7626,8 @@ char *process_remote_cmd(char *cmd, int stringonly) {
Window twin;
COLON_CHECK("sid:")
if (query) {
- snprintf(buf, bufn, "ans=%s%s0x%lx", p, co, subwin);
+ snprintf(buf, bufn, "ans=%s%s0x%lx", p, co,
+ !rootshift ? 0 : subwin);
goto qry;
}
p += strlen("sid:");
@@ -7475,6 +7658,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
do_new_fb(1);
}
}
+ } else if (strstr(p, "clip") == p) {
+ COLON_CHECK("clip:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%s", p, co,
+ NONUL(clip_str));
+ goto qry;
+ }
+ p += strlen("clip:");
+ if (clip_str) free(clip_str);
+ clip_str = strdup(p);
+
+ /* OK, this requires a new fb... */
+ do_new_fb(1);
+
} else if (strstr(p, "waitmapped") == p) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p,
@@ -8676,6 +8873,73 @@ char *process_remote_cmd(char *cmd, int stringonly) {
initialize_xfixes();
first_cursor();
+ } else if (!strcmp(p, "xdamage")) {
+ int orig = use_xdamage_hints;
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, use_xdamage_hints);
+ goto qry;
+ }
+ if (! xdamage_present) {
+ rfbLog("process_remote_cmd: cannot enable xdamage hints "
+ "(not supported on X display)\n");
+ goto done;
+ }
+ rfbLog("process_remote_cmd: enabling xdamage hints"
+ " (if supported).\n");
+ use_xdamage_hints = 1;
+ if (use_xdamage_hints != orig) {
+ initialize_xdamage();
+ create_xdamage();
+ }
+ } else if (!strcmp(p, "noxdamage")) {
+ int orig = use_xdamage_hints;
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, !use_xdamage_hints);
+ goto qry;
+ }
+ if (! xdamage_present) {
+ rfbLog("process_remote_cmd: disabling xdamage hints "
+ "(but not supported on X display)\n");
+ goto done;
+ }
+ rfbLog("process_remote_cmd: disabling xdamage hints.\n");
+ use_xdamage_hints = 0;
+ if (use_xdamage_hints != orig) {
+ initialize_xdamage();
+ destroy_xdamage();
+ }
+
+ } else if (strstr(p, "xd_area") == p) {
+ int a;
+ COLON_CHECK("xd_area:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%d", p, co,
+ xdamage_max_area);
+ goto qry;
+ }
+ p += strlen("xd_area:");
+ a = atoi(p);
+ if (a >= 0) {
+ rfbLog("process_remote_cmd: setting xdamage_max_area "
+ "%d -> %d.\n", xdamage_max_area, a);
+ xdamage_max_area = a;
+ }
+ } else if (strstr(p, "xd_mem") == p) {
+ double a;
+ COLON_CHECK("xd_mem:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%.3f", p, co,
+ xdamage_memory);
+ goto qry;
+ }
+ p += strlen("xd_mem:");
+ a = atof(p);
+ if (a >= 0.0) {
+ rfbLog("process_remote_cmd: setting xdamage_memory "
+ "%.3f -> %.3f.\n", xdamage_memory, a);
+ xdamage_memory = a;
+ }
+
} else if (strstr(p, "alphacut") == p) {
int a;
COLON_CHECK("alphacut:")
@@ -9282,6 +9546,12 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog("process_remote_cmd: disabling remote commands.\n");
accept_remote_cmds = 0; /* cannot be turned back on. */
+ } else if (strstr(p, "hack:") == p) { /* skip-cmd-list */
+ NOTAPP
+ p += strlen("hack:");
+ hack_val = atoi(p);
+ rfbLog("set hack_val to: %d\n", hack_val);
+
} else if (query) {
/* read-only variables that can only be queried: */
@@ -9314,6 +9584,8 @@ char *process_remote_cmd(char *cmd, int stringonly) {
snprintf(buf, bufn, "aro=%s:%s", p, NONUL(users_list));
} else if (!strcmp(p, "rootshift")) {
snprintf(buf, bufn, "aro=%s:%d", p, rootshift);
+ } else if (!strcmp(p, "clipshift")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, clipshift);
} else if (!strcmp(p, "scale_str")) {
snprintf(buf, bufn, "aro=%s:%s", p, NONUL(scale_str));
} else if (!strcmp(p, "scaled_x")) {
@@ -9406,6 +9678,22 @@ char *process_remote_cmd(char *cmd, int stringonly) {
snprintf(buf, bufn, "aro=%s:%d", p, dpy_x);
} else if (!strcmp(p, "dpy_y")) {
snprintf(buf, bufn, "aro=%s:%d", p, dpy_y);
+ } else if (!strcmp(p, "wdpy_x")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, wdpy_x);
+ } else if (!strcmp(p, "wdpy_y")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, wdpy_y);
+ } else if (!strcmp(p, "off_x")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, off_x);
+ } else if (!strcmp(p, "off_y")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, off_y);
+ } else if (!strcmp(p, "cdpy_x")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, cdpy_x);
+ } else if (!strcmp(p, "cdpy_y")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, cdpy_y);
+ } else if (!strcmp(p, "coff_x")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, coff_x);
+ } else if (!strcmp(p, "coff_y")) {
+ snprintf(buf, bufn, "aro=%s:%d", p, coff_y);
} else if (!strcmp(p, "rfbauth")) {
NOTAPPRO
} else if (!strcmp(p, "passwd")) {
@@ -9447,6 +9735,329 @@ char *process_remote_cmd(char *cmd, int stringonly) {
return NULL;
}
+/* -- xdamage.c -- */
+
+sraRegionPtr *xdamage_regions = NULL;
+int xdamage_ticker = 0;
+
+/* for stats */
+int XD_skip = 0, XD_tot = 0, XD_des = 0;
+
+void record_desired_xdamage_rect(int x, int y, int w, int h) {
+ /*
+ * Unfortunately we currently can't trust an xdamage event
+ * to correspond to real screen damage. E.g. focus-in for
+ * mozilla (depending on wm) will mark the whole toplevel
+ * area as damaged, when only the border has changed.
+ * Similar things for terminal windows.
+ *
+ * This routine uses some heuristics to detect small enough
+ * damage regions that we will not have a performance problem
+ * if we believe them even though they are wrong. We record
+ * the corresponding tiles the damage regions touch.
+ */
+ int dt_x, dt_y, nt_x1, nt_y1, nt_x2, nt_y2, nt;
+ int ix, iy, cnt = 0;
+ int area = w*h, always_accept = 0;
+
+ if (xdamage_max_area <= 0) {
+ always_accept = 1;
+ }
+
+ if (!always_accept && area > xdamage_max_area) {
+ return;
+ }
+
+ dt_x = w / tile_x;
+ dt_y = h / tile_y;
+
+ if (!always_accept && dt_y >= 2 && area > 1000) {
+ /*
+ * should be caught by a normal scanline poll, but we might
+ * as well keep if small.
+ */
+ return;
+ }
+
+ nt_x1 = nfix( (x)/tile_x, ntiles_x);
+ nt_x2 = nfix((x+w)/tile_x, ntiles_x);
+ nt_y1 = nfix( (y)/tile_y, ntiles_y);
+ nt_y2 = nfix((y+h)/tile_y, ntiles_y);
+
+
+ /* loop over the rectangle of tiles (1 tile for a small input rect */
+ for (ix = nt_x1; ix <= nt_x2; ix++) {
+ for (iy = nt_y1; iy <= nt_y2; iy++) {
+ nt = ix + iy * ntiles_x;
+ cnt++;
+ if (! tile_has_xdamage_diff[nt]) {
+ XD_des++;
+ }
+ tile_has_xdamage_diff[nt] = 1;
+ tile_row_has_xdamage_diff[iy] = 1;
+ xdamage_tile_count++;
+ }
+ }
+}
+
+void collect_xdamage(int scancnt) {
+#if LIBVNCSERVER_HAVE_LIBXDAMAGE
+ XDamageNotifyEvent *dev;
+#if 0
+ XserverRegion xregion;
+#endif
+ XEvent ev;
+ sraRegionPtr tmpregion;
+ sraRegionPtr reg;
+ static int rect_count = 0;
+ int nreg, ccount = 0, dcount = 0;
+ static time_t last_rpt = 0;
+ time_t now;
+ int x, y, w, h, x2, y2;
+ int i, dup, next, dup_max = 0;
+#define DUPSZ 16
+ int dup_x[DUPSZ], dup_y[DUPSZ], dup_w[DUPSZ], dup_h[DUPSZ];
+
+ if (! xdamage_present || ! using_xdamage) {
+ return;
+ }
+ if (! xdamage) {
+ return;
+ }
+
+ nreg = (xdamage_memory * NSCAN) + 1;
+ xdamage_ticker = (xdamage_ticker+1) % nreg;
+ reg = xdamage_regions[xdamage_ticker];
+ sraRgnMakeEmpty(reg);
+
+ X_LOCK;
+ while (XCheckTypedEvent(dpy, xdamage_base_event_type+XDamageNotify, &ev)) {
+ /* TODO max cut off time in this loop? */
+ if (ev.type != xdamage_base_event_type + XDamageNotify) {
+ break;
+ }
+ dev = (XDamageNotifyEvent *) &ev;
+ if (dev->damage != xdamage) {
+ continue; /* not ours! */
+ }
+
+ x = dev->area.x;
+ y = dev->area.y;
+ w = dev->area.width;
+ h = dev->area.height;
+
+ /*
+ * we try to manually remove some duplicates because
+ * certain activities can lead to many 10's of dups
+ * in a row. The region work can be costly and reg is
+ * later used in xdamage_hint_skip loops, so it is good
+ * to skip them if possible.
+ */
+ dup = 0;
+ for (i=0; i < dup_max; i++) {
+ if (dup_x[i] == x && dup_y[i] == y && dup_w[i] == w &&
+ dup_h[i] == h) {
+ dup = 1;
+ break;
+ }
+ }
+ if (dup) {
+ dcount++;
+ continue;
+ }
+ if (dup_max < DUPSZ) {
+ next = dup_max;
+ dup_max++;
+ } else {
+ next = (next+1) % DUPSZ;
+ }
+ dup_x[next] = x;
+ dup_y[next] = y;
+ dup_w[next] = w;
+ dup_h[next] = h;
+
+ /* translate if needed */
+ if (clipshift) {
+ /* set coords relative to fb origin */
+ if (0 && rootshift) {
+ /*
+ * not needed because damage is relative
+ * to subwin, not rootwin.
+ */
+ x = x - off_x;
+ y = y - off_y;
+ }
+ if (clipshift) {
+ x = x - coff_x;
+ y = y - coff_y;
+ }
+
+ x2 = x + w; /* upper point */
+ x = nfix(x, dpy_x); /* place both in fb area */
+ x2 = nfix(x2, dpy_x);
+ w = x2 - x; /* recompute w */
+
+ y2 = y + h;
+ y = nfix(y, dpy_y);
+ y2 = nfix(y2, dpy_y);
+ h = y2 - y;
+
+ if (w <= 0 || h <= 0) {
+ continue;
+ }
+ }
+
+
+ record_desired_xdamage_rect(x, y, w, h);
+
+ tmpregion = sraRgnCreateRect(x, y, x + w, y + h);
+ sraRgnOr(reg, tmpregion);
+ sraRgnDestroy(tmpregion);
+ rect_count++;
+ ccount++;
+ }
+ /* clear the whole damage region for next time. XXX check */
+ XDamageSubtract(dpy, xdamage, None, None);
+ X_UNLOCK;
+
+ now = time(0);
+if (! last_rpt) {
+ last_rpt = now;
+}
+if (now > last_rpt + 15) {
+ double rat = -1.0;
+
+ if (XD_tot) {
+ rat = ((double) XD_skip)/XD_tot;
+ }
+
+ if (0) fprintf(stderr, "skip/tot: %04d/%04d rat=%.3f rect_count: %d desired_rects: %d\n",
+ XD_skip, XD_tot, rat, rect_count, XD_des);
+ XD_skip = 0;
+ XD_tot = 0;
+ XD_des = 0;
+ rect_count = 0;
+ last_rpt = now;
+}
+#endif
+}
+
+int xdamage_hint_skip(int y) {
+ static sraRegionPtr scanline = NULL;
+ sraRegionPtr reg, tmpl;
+ int ret, i, n, nreg;
+
+ if (!xdamage_present || !using_xdamage || !use_xdamage_hints) {
+ return 0; /* cannot skip */
+ }
+ if (! xdamage_regions) {
+ return 0; /* cannot skip */
+ }
+
+ if (! scanline) {
+ scanline = sraRgnCreate();
+ }
+
+ tmpl = sraRgnCreateRect(0, y, dpy_x, y+1);
+
+ nreg = (xdamage_memory * NSCAN) + 1;
+ ret = 1;
+ for (i=0; i<nreg; i++) {
+ /* go back thru the history starting at most recent */
+ n = (xdamage_ticker + nreg - i) % nreg;
+ reg = xdamage_regions[n];
+ if (sraRgnEmpty(reg)) {
+ /* checking for emptiness is very fast */
+ continue;
+ }
+ sraRgnMakeEmpty(scanline);
+ sraRgnOr(scanline, tmpl);
+ if (sraRgnAnd(scanline, reg)) {
+ ret = 0;
+ break;
+ }
+ }
+ sraRgnDestroy(tmpl);
+
+ return ret;
+}
+
+void initialize_xdamage(void) {
+ sraRegionPtr *ptr;
+ int i, nreg;
+
+ using_xdamage = 0;
+ if (xdamage_present) {
+ if (use_xdamage_hints) {
+ using_xdamage = 1;
+ }
+ }
+ if (xdamage_regions) {
+ ptr = xdamage_regions;
+ while (*ptr != NULL) {
+ sraRgnDestroy(*ptr);
+ ptr++;
+ }
+ free(xdamage_regions);
+ xdamage_regions = NULL;
+ }
+ if (using_xdamage) {
+ nreg = (xdamage_memory * NSCAN) + 2;
+ xdamage_regions = (sraRegionPtr *)
+ malloc(nreg * sizeof(sraRegionPtr));
+ for (i = 0; i < nreg; i++) {
+ ptr = xdamage_regions+i;
+ if (i == nreg - 1) {
+ *ptr = NULL;
+ } else {
+ *ptr = sraRgnCreate();
+ sraRgnMakeEmpty(*ptr);
+ }
+ }
+ /* set so will be 0 in first collect_xdamage call */
+ xdamage_ticker = -1;
+ }
+}
+
+void create_xdamage(void) {
+#if LIBVNCSERVER_HAVE_LIBXDAMAGE
+ if (! xdamage) {
+ X_LOCK;
+ xdamage = XDamageCreate(dpy, window, XDamageReportRawRectangles);
+ XDamageSubtract(dpy, xdamage, None, None);
+ X_UNLOCK;
+ rfbLog("created xdamage object: 0x%lx\n", xdamage);
+ }
+#endif
+}
+
+void destroy_xdamage(void) {
+#if LIBVNCSERVER_HAVE_LIBXDAMAGE
+ if (xdamage) {
+ X_LOCK;
+ XDamageDestroy(dpy, xdamage);
+ X_UNLOCK;
+ rfbLog("destroyed xdamage object: 0x%lx\n", xdamage);
+ xdamage = 0;
+ }
+#endif
+}
+
+void check_xdamage_state(void) {
+ if (! using_xdamage || ! xdamage_present) {
+ return;
+ }
+ /*
+ * Create or destroy the Damage object as needed, we don't want
+ * one if no clients are connected.
+ */
+ if (client_count) {
+ create_xdamage();
+ } else {
+ destroy_xdamage();
+ }
+}
+
/* -- cursor.c -- */
/*
* Here begins a bit of a mess to experiment with multiple cursors
@@ -9525,7 +10136,7 @@ static cursor_info_t cur_arrow = {NULL, NULL, 18, 18, 0, 0, 0, NULL};
/*
* It turns out we can at least detect mouse is on the root window so
- * show it (under -cursorX or -X) with this familiar cursor...
+ * show it (under -cursor X) with this familiar cursor...
*/
static char* curs_root_data =
" "
@@ -10868,8 +11479,8 @@ void check_x11_pointer(void) {
}
/* offset subtracted since XQueryPointer relative to rootwin */
- x = root_x - off_x;
- y = root_y - off_y;
+ x = root_x - off_x - coff_x;
+ y = root_y - off_y - coff_y;
/* record the cursor position in the rfb screen */
cursor_position(x, y);
@@ -11286,8 +11897,8 @@ XImage *initialize_xdisplay_fb(void) {
if (! subwin) {
/* full screen */
window = rootwin;
- dpy_x = DisplayWidth(dpy, scr);
- dpy_y = DisplayHeight(dpy, scr);
+ dpy_x = wdpy_x = DisplayWidth(dpy, scr);
+ dpy_y = wdpy_y = DisplayHeight(dpy, scr);
off_x = 0;
off_y = 0;
/* this may be overridden via visual_id below */
@@ -11302,8 +11913,8 @@ XImage *initialize_xdisplay_fb(void) {
X_UNLOCK;
clean_up_exit(1);
}
- dpy_x = attr.width;
- dpy_y = attr.height;
+ dpy_x = wdpy_x = attr.width;
+ dpy_y = wdpy_y = attr.height;
subwin_bs = attr.backing_store;
@@ -11315,6 +11926,46 @@ XImage *initialize_xdisplay_fb(void) {
X_LOCK;
}
+ clipshift = 0;
+ cdpy_x = cdpy_y = coff_x = coff_y = 0;
+ if (clip_str) {
+ int w, h, x, y, bad = 0;
+ if (parse_geom(clip_str, &w, &h, &x, &y, wdpy_x, wdpy_y)) {
+ if (x < 0) {
+ x = 0;
+ }
+ if (y < 0) {
+ y = 0;
+ }
+ if (x + w > wdpy_x) {
+ w = wdpy_x - x;
+ }
+ if (y + h > wdpy_y) {
+ h = wdpy_y - y;
+ }
+ if (w <= 0 || h <= 0) {
+ bad = 1;
+ }
+ } else {
+ bad = 1;
+ }
+ if (bad) {
+ rfbLog("skipping invalid -clip WxH+X+Y: %s\n",
+ clip_str);
+ } else {
+ /* OK, change geom behind everyone's back... */
+ cdpy_x = w;
+ cdpy_y = h;
+ coff_x = x;
+ coff_y = y;
+
+ clipshift = 1;
+
+ dpy_x = cdpy_x;
+ dpy_y = cdpy_y;
+ }
+ }
+
/* initialize depth to reasonable value, visual_id may override */
depth = DefaultDepth(dpy, scr);
@@ -11379,13 +12030,13 @@ XImage *initialize_xdisplay_fb(void) {
/* subwins can be a dicey if they are changing size... */
XTranslateCoordinates(dpy, window, rootwin, 0, 0, &subwin_x,
&subwin_y, &twin);
- if (subwin_x + dpy_x > disp_x) {
+ if (subwin_x + wdpy_x > disp_x) {
shift = 1;
- subwin_x = disp_x - dpy_x - 3;
+ subwin_x = disp_x - wdpy_x - 3;
}
- if (subwin_y + dpy_y > disp_y) {
+ if (subwin_y + wdpy_y > disp_y) {
shift = 1;
- subwin_y = disp_y - dpy_y - 3;
+ subwin_y = disp_y - wdpy_y - 3;
}
if (subwin_x < 0) {
shift = 1;
@@ -11435,17 +12086,17 @@ XImage *initialize_xdisplay_fb(void) {
if (subwin) {
XSetErrorHandler(old_handler);
if (trapped_xerror) {
- rfbLog("trapped GetImage at SUBWIN creation.\n");
- if (try < subwin_tries) {
- usleep(250 * 1000);
- if (!get_window_size(window, &dpy_x, &dpy_y)) {
- rfbLog("could not get size of subwin "
- "0x%lx\n", subwin);
- X_UNLOCK;
- clean_up_exit(1);
- }
- goto again;
+ rfbLog("trapped GetImage at SUBWIN creation.\n");
+ if (try < subwin_tries) {
+ usleep(250 * 1000);
+ if (!get_window_size(window, &wdpy_x, &wdpy_y)) {
+ rfbLog("could not get size of subwin "
+ "0x%lx\n", subwin);
+ X_UNLOCK;
+ clean_up_exit(1);
}
+ goto again;
+ }
}
trapped_xerror = 0;
@@ -11727,7 +12378,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
screen->serverFormat.greenMax = 0;
screen->serverFormat.blueMax = 0;
- /* these main_* formats are use elsewhere by us. */
+ /* these main_* formats are used generally. */
main_red_shift = 0;
main_green_shift = 0;
main_blue_shift = 0;
@@ -12080,12 +12731,12 @@ void solid_root(char *color) {
swa.background_pixmap = None;
visual.visualid = CopyFromParent;
mask = (CWOverrideRedirect|CWBackingStore|CWSaveUnder|CWBackPixmap);
- expose = XCreateWindow(dpy, window, 0, 0, dpy_x, dpy_y, 0, depth,
+ expose = XCreateWindow(dpy, window, 0, 0, wdpy_x, wdpy_y, 0, depth,
InputOutput, &visual, mask, &swa);
if (! color) {
/* restore the root window from the XImage snapshot */
- pixmap = XCreatePixmap(dpy, window, dpy_x, dpy_y, depth);
+ pixmap = XCreatePixmap(dpy, window, wdpy_x, wdpy_y, depth);
if (! image) {
/* whoops */
@@ -12100,7 +12751,7 @@ void solid_root(char *color) {
gcv.plane_mask = AllPlanes;
gc = XCreateGC(dpy, window, GCFunction|GCPlaneMask, &gcv);
- XPutImage(dpy, pixmap, gc, image, 0, 0, 0, 0, dpy_x, dpy_y);
+ XPutImage(dpy, pixmap, gc, image, 0, 0, 0, 0, wdpy_x, wdpy_y);
gcv.foreground = gcv.background = BlackPixel(dpy, scr);
gc = XCreateGC(dpy, window, GCForeground|GCBackground, &gcv);
@@ -12130,14 +12781,14 @@ void solid_root(char *color) {
iswa.save_under = False;
iswa.background_pixmap = ParentRelative;
- iwin = XCreateWindow(dpy, window, 0, 0, dpy_x, dpy_y, 0, depth,
- InputOutput, &visual, mask, &iswa);
+ iwin = XCreateWindow(dpy, window, 0, 0, wdpy_x, wdpy_y, 0,
+ depth, InputOutput, &visual, mask, &iswa);
rfbLog("snapshotting background...\n");
XMapWindow(dpy, iwin);
XSync(dpy, False);
- image = XGetImage(dpy, iwin, 0, 0, dpy_x, dpy_y, AllPlanes,
+ image = XGetImage(dpy, iwin, 0, 0, wdpy_x, wdpy_y, AllPlanes,
ZPixmap);
XSync(dpy, False);
XDestroyWindow(dpy, iwin);
@@ -12191,7 +12842,7 @@ void solid_cde(char *color) {
swa.background_pixmap = None;
visual.visualid = CopyFromParent;
mask = (CWOverrideRedirect|CWBackingStore|CWSaveUnder|CWBackPixmap);
- expose = XCreateWindow(dpy, window, 0, 0, dpy_x, dpy_y, 0, depth,
+ expose = XCreateWindow(dpy, window, 0, 0, wdpy_x, wdpy_y, 0, depth,
InputOutput, &visual, mask, &swa);
if (! color) {
@@ -12212,7 +12863,8 @@ void solid_cde(char *color) {
continue;
}
- pixmap = XCreatePixmap(dpy, twin, dpy_x, dpy_y, depth);
+ pixmap = XCreatePixmap(dpy, twin, wdpy_x, wdpy_y,
+ depth);
/* draw the image to a pixmap: */
gcv.function = GXcopy;
@@ -12220,7 +12872,7 @@ void solid_cde(char *color) {
gc = XCreateGC(dpy, twin, GCFunction|GCPlaneMask, &gcv);
XPutImage(dpy, pixmap, gc, image[n], 0, 0, 0, 0,
- dpy_x, dpy_y);
+ wdpy_x, wdpy_y);
gcv.foreground = gcv.background = BlackPixel(dpy, scr);
gc = XCreateGC(dpy, twin, GCForeground|GCBackground,
@@ -12366,7 +13018,7 @@ void solid_cde(char *color) {
iswa.background_pixmap = ParentRelative;
visual.visualid = CopyFromParent;
- iwin = XCreateWindow(dpy, twin, 0, 0, dpy_x, dpy_y,
+ iwin = XCreateWindow(dpy, twin, 0, 0, wdpy_x, wdpy_y,
0, depth, InputOutput, &visual, mask, &iswa);
rfbLog("snapshotting CDE backdrop ws%d 0x%lx -> "
@@ -12374,7 +13026,7 @@ void solid_cde(char *color) {
XMapWindow(dpy, iwin);
XSync(dpy, False);
- image[n] = XGetImage(dpy, iwin, 0, 0, dpy_x, dpy_y,
+ image[n] = XGetImage(dpy, iwin, 0, 0, wdpy_x, wdpy_y,
AllPlanes, ZPixmap);
XSync(dpy, False);
XDestroyWindow(dpy, iwin);
@@ -12673,21 +13325,7 @@ void initialize_blackouts(char *list) {
p = strtok(blist, ", \t");
while (p) {
- /* handle +/-x and +/-y */
- if (sscanf(p, "%dx%d+%d+%d", &w, &h, &x, &y) == 4) {
- ;
- } else if (sscanf(p, "%dx%d-%d+%d", &w, &h, &x, &y) == 4) {
- w = nabs(w);
- x = dpy_x - x - w;
- } else if (sscanf(p, "%dx%d+%d-%d", &w, &h, &x, &y) == 4) {
- h = nabs(h);
- y = dpy_y - y - h;
- } else if (sscanf(p, "%dx%d-%d-%d", &w, &h, &x, &y) == 4) {
- w = nabs(w);
- h = nabs(h);
- x = dpy_x - x - w;
- y = dpy_y - y - h;
- } else {
+ if (! parse_geom(p, &w, &h, &x, &y, dpy_x, dpy_y)) {
if (*p != '\0') {
rfbLog("skipping invalid geometry: %s\n", p);
}
@@ -13055,15 +13693,6 @@ static int nap_ok = 0, nap_diff_count = 0;
static int scan_count = 0; /* indicates which scan pattern we are on */
static int scan_in_progress = 0;
-/* scan pattern jitter from x0rfbserver */
-#define NSCAN 32
-static int scanlines[NSCAN] = {
- 0, 16, 8, 24, 4, 20, 12, 28,
- 10, 26, 18, 2, 22, 6, 30, 14,
- 1, 17, 9, 25, 7, 23, 15, 31,
- 19, 3, 27, 11, 29, 13, 5, 21
-};
-
typedef struct tile_change_region {
/* start and end lines, along y, of the changed area inside a tile. */
unsigned short first_line, last_line;
@@ -13087,6 +13716,10 @@ void initialize_tiles(void) {
tile_has_diff = (unsigned char *)
malloc((size_t) (ntiles * sizeof(unsigned char)));
+ tile_has_xdamage_diff = (unsigned char *)
+ malloc((size_t) (ntiles * sizeof(unsigned char)));
+ tile_row_has_xdamage_diff = (unsigned char *)
+ malloc((size_t) (ntiles_y * sizeof(unsigned char)));
tile_tried = (unsigned char *)
malloc((size_t) (ntiles * sizeof(unsigned char)));
tile_copied = (unsigned char *)
@@ -13109,6 +13742,14 @@ void free_tiles(void) {
free(tile_has_diff);
tile_has_diff = NULL;
}
+ if (tile_has_xdamage_diff) {
+ free(tile_has_xdamage_diff);
+ tile_has_xdamage_diff = NULL;
+ }
+ if (tile_row_has_xdamage_diff) {
+ free(tile_row_has_xdamage_diff);
+ tile_row_has_xdamage_diff = NULL;
+ }
if (tile_tried) {
free(tile_tried);
tile_tried = NULL;
@@ -15032,7 +15673,7 @@ static int scan_display(int ystart, int rescan) {
int pixelsize = bpp/8;
int x, y, w, n;
int tile_count = 0;
- int whole_line = 1, nodiffs = 0;
+ int nodiffs = 0, diff_hint;
y = ystart;
@@ -15043,6 +15684,15 @@ static int scan_display(int ystart, int rescan) {
while (y < dpy_y) {
+ if (using_xdamage) {
+ XD_tot++;
+ if (xdamage_hint_skip(y)) {
+ XD_skip++;
+ y += NSCAN;
+ continue;
+ }
+ }
+
/* grab the horizontal scanline from the display: */
X_LOCK;
XRANDR_SET_TRAP_RET(-1, "scan_display-set");
@@ -15054,7 +15704,7 @@ static int scan_display(int ystart, int rescan) {
src = scanline->data;
dst = main_fb + y * main_bytes_per_line;
- if (whole_line && ! memcmp(dst, src, main_bytes_per_line)) {
+ if (! memcmp(dst, src, main_bytes_per_line)) {
/* no changes anywhere in scan line */
nodiffs = 1;
if (! rescan) {
@@ -15066,6 +15716,7 @@ static int scan_display(int ystart, int rescan) {
x = 0;
while (x < dpy_x) {
n = (x/tile_x) + (y/tile_y) * ntiles_x;
+ diff_hint = 0;
if (blackouts) {
if (blackout_line_skip(n, x, y, rescan,
@@ -15081,6 +15732,10 @@ static int scan_display(int ystart, int rescan) {
x += NSCAN;
continue;
}
+ } else if (xdamage_tile_count &&
+ tile_has_xdamage_diff[n]) {
+ tile_has_xdamage_diff[n] = 2;
+ diff_hint = 1;
}
/* set ptrs to correspond to the x offset: */
@@ -15094,7 +15749,7 @@ static int scan_display(int ystart, int rescan) {
w = NSCAN;
}
- if (memcmp(dst, src, w * pixelsize)) {
+ if (diff_hint || memcmp(dst, src, w * pixelsize)) {
/* found a difference, record it: */
if (! blackouts) {
tile_has_diff[n] = 1;
@@ -15129,9 +15784,15 @@ int scan_for_updates(int count_only) {
double frac3 = 0.02; /* do scan_display() again after copy_tiles() */
for (i=0; i < ntiles; i++) {
tile_has_diff[i] = 0;
+ tile_has_xdamage_diff[i] = 0;
tile_tried[i] = 0;
tile_copied[i] = 0;
}
+ for (i=0; i < ntiles_y; i++) {
+ /* could be useful, currently not used */
+ tile_row_has_xdamage_diff[i] = 0;
+ }
+ xdamage_tile_count = 0;
/*
* n.b. this program has only been tested so far with
@@ -15142,15 +15803,16 @@ int scan_for_updates(int count_only) {
scan_count++;
scan_count %= NSCAN;
- if (scan_count % (NSCAN/4) == 0) {
- /* some periodic maintenance */
-
- if (subwin) {
- set_offset(); /* follow the subwindow */
- }
- if (indexed_color) { /* check for changed colormap */
- set_colormap(0);
- }
+ /* some periodic maintenance */
+ if (subwin) {
+ set_offset(); /* follow the subwindow */
+ }
+ if (indexed_color && scan_count % 4 == 0) {
+ /* check for changed colormap */
+ set_colormap(0);
+ }
+ if (using_xdamage) {
+ collect_xdamage(scan_count);
}
}
@@ -15172,6 +15834,20 @@ int scan_for_updates(int count_only) {
return tile_count;
}
+ if (xdamage_tile_count) {
+ /* pick up "known" damaged tiles we missed in scan_display() */
+ for (i=0; i < ntiles; i++) {
+ if (tile_has_diff[i]) {
+ continue;
+ }
+ if (tile_has_xdamage_diff[i] == 1) {
+ tile_has_xdamage_diff[i] = 2;
+ tile_has_diff[i] = 1;
+ tile_count++;
+ }
+ }
+ }
+
nap_set(tile_count);
if (fs_factor && frac1 >= fs_frac) {
@@ -15349,9 +16025,11 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
exit(0);
}
if (getenv("DISPLAY") != NULL) {
+ /* worst case */
x11vnc_xdisplay = strdup(getenv("DISPLAY"));
}
if (use_dpy) {
+ /* better */
x11vnc_xdisplay = strdup(use_dpy);
}
if (connect_to_x11vnc) {
@@ -15360,6 +16038,8 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
if (! client_connect_file) {
if (getenv("XAUTHORITY") != NULL) {
old_xauth = strdup(getenv("XAUTHORITY"));
+ } else {
+ old_xauth = strdup("");
}
dpy = XOpenDisplay(x11vnc_xdisplay);
if (! dpy && auth_file) {
@@ -15367,11 +16047,12 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
dpy = XOpenDisplay(x11vnc_xdisplay);
}
if (! dpy && ! x11vnc_xdisplay) {
+ /* worstest case */
x11vnc_xdisplay = strdup(":0");
dpy = XOpenDisplay(x11vnc_xdisplay);
}
if (! dpy) {
- fprintf(stderr, "gui: could not open "
+ fprintf(stderr, "gui: could not open x11vnc "
"display: %s\n", NONUL(x11vnc_xdisplay));
exit(1);
}
@@ -15398,7 +16079,7 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
}
set_env("X11VNC_XDISPLAY", x11vnc_xdisplay);
if (getenv("XAUTHORITY") != NULL) {
- set_env("X11VNC_XAUTHORITY", getenv("XAUTHORITY"));
+ set_env("X11VNC_AUTH_FILE", getenv("XAUTHORITY"));
}
if (rc == 0) {
fprintf(stderr, "gui: ping succeeded.\n");
@@ -15411,7 +16092,15 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
XCloseDisplay(dpy);
}
if (old_xauth) {
- set_env("XAUTHORITY", old_xauth);
+ if (*old_xauth == '\0') {
+ /* wasn't set, hack it out if it is now */
+ char *xauth = getenv("XAUTHORITY");
+ if (xauth) {
+ *(xauth-2) = '_'; /* yow */
+ }
+ } else {
+ set_env("XAUTHORITY", old_xauth);
+ }
free(old_xauth);
}
}
@@ -15459,8 +16148,6 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int simple_gui,
if (simple_gui) {
set_env("X11VNC_SIMPLE_GUI", "1");
}
- if (auth_file) {
- }
sprintf(cmd, "%s -", wish);
tmpf = tmpfile();
@@ -16509,6 +17196,10 @@ static void watch_loop(void) {
continue;
}
+ if (using_xdamage) {
+ check_xdamage_state();
+ }
+
if (watch_bell) {
/* n.b. assumes -nofb folks do not want bell... */
check_bell_event();
@@ -16618,6 +17309,12 @@ static void print_help(int mode) {
" shifts a root view to it: this shows SaveUnders menus,\n"
" etc, although they will be clipped if they extend beyond\n"
" the window.\n"
+"-clip WxH+X+Y Only show the sub-region of the full display that\n"
+" corresponds to the rectangle with size WxH and offset\n"
+" +X+Y. The VNC display has size WxH (i.e. smaller than\n"
+" the full display). This also works for -id/-sid mode\n"
+" where the offset is relative to the upper left corner\n"
+" of the selected window.\n"
"-flashcmap In 8bpp indexed color, let the installed colormap flash\n"
" as the pointer moves from window to window (slow).\n"
"-notruecolor For 8bpp displays, force indexed color (i.e. a colormap)\n"
@@ -17292,6 +17989,36 @@ static void print_help(int mode) {
" to really throttle down the screen polls (i.e. sleep\n"
" for about 1.5 secs). Use 0 to disable. Default: %d\n"
"\n"
+"-noxdamage Do not use the X DAMAGE extension to detect framebuffer\n"
+" changes even if it is available.\n"
+"\n"
+" x11vnc's use of the DAMAGE extension: 1) significantly\n"
+" reduces the load when the screen is not changing much,\n"
+" and 2) detects changed areas (small ones by default)\n"
+" more quickly.\n"
+"\n"
+" Currently the DAMAGE extension is overly conservative\n"
+" and often reports large areas (e.g. a whole terminal\n"
+" or browser window) as damaged even though the actual\n"
+" changed region is much smaller (sometimes just a few\n"
+" pixels). So heuristics were introduced to skip large\n"
+" areas and use the damage rectangles only as \"hints\"\n"
+" for the traditional scanline polling. The following\n"
+" tuning parameters are introduced to adjust this\n"
+" behavior:\n"
+"\n"
+"-xd_area A Set the largest DAMAGE rectangle area \"A\" (in\n"
+" pixels: width * height) to trust as truly damaged:\n"
+" the rectangle will be copied from the framebuffer\n"
+" (slow) no matter what. Set to zero to trust *all*\n"
+" rectangles. Default: %d\n"
+"-xd_mem f Set how long DAMAGE rectangles should be \"remembered\",\n"
+" \"f\" is a floating point number and is in units of the\n"
+" scanline repeat cycle time (%d iterations). The default\n"
+" (%.1f) should give no painting problems. Increase it if\n"
+" there are problems or decrease it to live on the edge\n"
+" (perhaps useful on a slow machine).\n"
+"\n"
"-sigpipe string Broken pipe (SIGPIPE) handling. \"string\" can be\n"
" \"ignore\" or \"exit\". For \"ignore\" libvncserver\n"
" will handle the abrupt loss of a client and continue,\n"
@@ -17417,6 +18144,7 @@ static void print_help(int mode) {
" id:windowid set -id window to \"windowid\". empty\n"
" or \"root\" to go back to root window\n"
" sid:windowid set -sid window to \"windowid\"\n"
+" clip:WxH+X+Y set -clip mode to \"WxH+X+Y\"\n"
" flashcmap enable -flashcmap mode.\n"
" noflashcmap disable -flashcmap mode.\n"
" notruecolor enable -notruecolor mode.\n"
@@ -17559,6 +18287,10 @@ static void print_help(int mode) {
" nap enable -nap mode.\n"
" nonap disable -nap mode.\n"
" sb:n set -sb to n s, same as screen_blank:n\n"
+" xdamage enable xdamage polling hints.\n"
+" noxdamage disable xdamage polling hints.\n"
+" xd_area:A set -xd_area max pixel area to \"A\"\n"
+" xd_mem:f set -xd_mem remembrance to \"f\"\n"
" fs:frac set -fs fraction to \"frac\", e.g. 0.5\n"
" gaps:n set -gaps to n.\n"
" grow:n set -grow to n.\n"
@@ -17625,7 +18357,7 @@ static void print_help(int mode) {
" 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"
+" refresh reset close disconnect id sid clip waitmapped\n"
" nowaitmapped flashcmap noflashcmap truecolor notruecolor\n"
" overlay nooverlay overlay_cursor overlay_yescursor\n"
" nooverlay_nocursor nooverlay_cursor nooverlay_yescursor\n"
@@ -17641,9 +18373,10 @@ static void print_help(int mode) {
" remap repeat norepeat fb nofb bell nobell sel\n"
" nosel primary noprimary cursorshape nocursorshape\n"
" cursorpos nocursorpos cursor show_cursor noshow_cursor\n"
-" nocursor xfixes noxfixes alphacut alphafrac alpharemove\n"
-" noalpharemove alphablend noalphablend xwarp xwarppointer\n"
-" noxwarp noxwarppointer buttonmap dragging nodragging\n"
+" nocursor xfixes noxfixes xdamage noxdamage xd_area\n"
+" xd_mem alphacut alphafrac alpharemove noalpharemove\n"
+" alphablend noalphablend xwarp xwarppointer noxwarp\n"
+" noxwarppointer buttonmap dragging nodragging\n"
" pointer_mode pm input_skip input client_input speeds\n"
" debug_pointer dp nodebug_pointer nodp debug_keyboard dk\n"
" nodebug_keyboard nodk deferupdate defer wait rfbwait\n"
@@ -17654,15 +18387,16 @@ static void print_help(int mode) {
" nodontdisconnect desktop noremote\n"
"\n"
" aro= display vncdisplay desktopname http_url auth\n"
-" users rootshift scale_str scaled_x scaled_y scale_numer\n"
-" scale_denom scale_fac scaling_noblend scaling_nomult4\n"
-" scaling_pad scaling_interpolate inetd safer unsafe\n"
-" passwdfile using_shm logfile o rc norc h help V version\n"
-" lastmod bg sigpipe threads clients client_count pid\n"
-" ext_xtest ext_xkb ext_xshm ext_xinerama ext_overlay\n"
-" ext_xfixes ext_xdamage ext_xrandr rootwin num_buttons\n"
-" button_mask mouse_x mouse_y bpp depth indexed_color\n"
-" dpy_x dpy_y rfbauth passwd\n"
+" users rootshift clipshift scale_str scaled_x scaled_y\n"
+" scale_numer scale_denom scale_fac scaling_noblend\n"
+" scaling_nomult4 scaling_pad scaling_interpolate inetd\n"
+" safer unsafe passwdfile using_shm logfile o rc norc\n"
+" h help V version lastmod bg sigpipe threads clients\n"
+" client_count pid ext_xtest ext_xkb ext_xshm ext_xinerama\n"
+" ext_overlay ext_xfixes ext_xdamage ext_xrandr rootwin\n"
+" num_buttons button_mask mouse_x mouse_y bpp depth\n"
+" indexed_color dpy_x dpy_y wdpy_x wdpy_y off_x off_y\n"
+" cdpy_x cdpy_y coff_x coff_y rfbauth passwd\n"
"\n"
"-sync By default -remote commands are run asynchronously, that\n"
" is, the request is posted and the program immediately\n"
@@ -17761,6 +18495,7 @@ static void print_help(int mode) {
waitms,
take_naps ? "take naps":"no naps",
screen_blank,
+ xdamage_max_area, NSCAN, xdamage_memory,
use_threads ? "-threads":"-nothreads",
fs_frac,
gaps_fill,
@@ -18126,6 +18861,7 @@ int main(int argc, char* argv[]) {
int vpw_loc = -1;
int dt = 0, bg = 0;
int got_rfbwait = 0, got_deferupdate = 0, got_defer = 0;
+ int got_noxdamage = 0;
/* used to pass args we do not know about to rfbGetScreen(): */
int argc_vnc = 1; char *argv_vnc[128];
@@ -18211,6 +18947,9 @@ int main(int argc, char* argv[]) {
}
} else if (!strcmp(arg, "-waitmapped")) {
subwin_wait_mapped = 1;
+ } else if (!strcmp(arg, "-clip")) {
+ CHECK_ARGC
+ clip_str = strdup(argv[++i]);
} else if (!strcmp(arg, "-flashcmap")) {
flash_cmap = 1;
} else if (!strcmp(arg, "-notruecolor")) {
@@ -18468,6 +19207,24 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-sb")) {
CHECK_ARGC
screen_blank = atoi(argv[++i]);
+ } else if (!strcmp(arg, "-noxdamage")) {
+ using_xdamage = 0;
+ use_xdamage_hints = 0;
+ got_noxdamage = 1;
+ } else if (!strcmp(arg, "-xd_area")) {
+ int tn;
+ CHECK_ARGC
+ tn = atoi(argv[++i]);
+ if (tn >= 0) {
+ xdamage_max_area = tn;
+ }
+ } else if (!strcmp(arg, "-xd_mem")) {
+ double f;
+ CHECK_ARGC
+ f = atof(argv[++i]);
+ if (f >= 0.0) {
+ xdamage_memory = f;
+ }
} else if (!strcmp(arg, "-sigpipe")) {
CHECK_ARGC
if (known_sigpipe_mode(argv[++i])) {
@@ -18820,6 +19577,8 @@ int main(int argc, char* argv[]) {
: "null");
fprintf(stderr, " subwin: 0x%lx\n", subwin);
fprintf(stderr, " -sid mode: %d\n", rootshift);
+ fprintf(stderr, " clip: %s\n", clip_str ? clip_str
+ : "null");
fprintf(stderr, " flashcmap: %d\n", flash_cmap);
fprintf(stderr, " force_idx: %d\n", force_indexed_color);
fprintf(stderr, " visual: %s\n", visual_str ? visual_str
@@ -18909,6 +19668,9 @@ int main(int argc, char* argv[]) {
fprintf(stderr, " waitms: %d\n", waitms);
fprintf(stderr, " take_naps: %d\n", take_naps);
fprintf(stderr, " sb: %d\n", screen_blank);
+ fprintf(stderr, " xdamage: %d\n", !got_noxdamage);
+ fprintf(stderr, " xd_area: %d\n", xdamage_max_area);
+ fprintf(stderr, " xd_mem: %.3f\n", xdamage_memory);
fprintf(stderr, " sigpipe: %s\n", sigpipe
? sigpipe : "null");
fprintf(stderr, " threads: %d\n", use_threads);
@@ -19050,6 +19812,12 @@ int main(int argc, char* argv[]) {
xdamage_present = 1;
}
#endif
+ if (! quiet && xdamage_present && ! got_noxdamage) {
+ rfbLog("X DAMAGE available on display, using it for"
+ " polling hints\n");
+ rfbLog(" to disable this behavior use: "
+ "'-noxdamage'\n");
+ }
overlay_present = 0;
#ifdef SOLARIS_OVERLAY