summaryrefslogtreecommitdiffstats
path: root/x11vnc
diff options
context:
space:
mode:
authorrunge <runge>2005-03-20 04:33:39 +0000
committerrunge <runge>2005-03-20 04:33:39 +0000
commit1ce941862201ca320f46a3c23870555e41813f2f (patch)
treea31fc80abd12afb4ce91ba1b7a73354e7395c3c5 /x11vnc
parentfba6f58a1aaaa8162a9bf9905d9a0d59bd4ce2d9 (diff)
downloadlibtdevnc-1ce941862201ca320f46a3c23870555e41813f2f.tar.gz
libtdevnc-1ce941862201ca320f46a3c23870555e41813f2f.zip
x11vnc: scale cursors, speed up some scaling, alt arrows, -norepeat N
Diffstat (limited to 'x11vnc')
-rw-r--r--x11vnc/ChangeLog9
-rw-r--r--x11vnc/README1482
-rwxr-xr-xx11vnc/tkx11vnc5
-rw-r--r--x11vnc/tkx11vnc.h5
-rw-r--r--x11vnc/x11vnc.176
-rw-r--r--x11vnc/x11vnc.c1527
6 files changed, 1959 insertions, 1145 deletions
diff --git a/x11vnc/ChangeLog b/x11vnc/ChangeLog
index b3c7b3a..8307798 100644
--- a/x11vnc/ChangeLog
+++ b/x11vnc/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-19 Karl Runge <runge@karlrunge.com>
+ * scale cursors along with display. Use -scale_cursor to change
+ or disable cursor scaling.
+ * speed up scaling in some cases, :nb and integer magnification.
+ * provide alternative arrow cursors (1-6) via -arrow n.
+ * reset no autorepeat a couple times if something turns it off,
+ set with -norepeat N.
+ * do not take a nap if DAMAGE seems to be doing its job.
+
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
diff --git a/x11vnc/README b/x11vnc/README
index 0c79bb3..202904e 100644
--- a/x11vnc/README
+++ b/x11vnc/README
@@ -1,5 +1,5 @@
-x11vnc README file Date: Sat Mar 12 18:06:15 EST 2005
+x11vnc README file Date: Sun Mar 20 00:02:00 EST 2005
The following information is taken from these URLs:
@@ -376,8 +376,9 @@ vncviewer -via $host localhost:0 # must be TightVNC vncviewer.
(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).
+ (The only thing this misses is /usr/X11/lib/libXrandr.so.2, which is
+ for the little used -xrandr option, see the script below to pick it up
+ as well).
libjpeg is included in Solaris 9 and later (/usr/sfw/include and
/usr/sfw/lib), and zlib in Solaris 8 and later (/usr/include and
@@ -414,6 +415,7 @@ r/sfw; make'
# non-standard locations.
# set to get your gcc, etc:
+#
PATH=/path/to/gcc/bin:/usr/ccs/bin:/usr/sfw/bin:$PATH
JPEG=/path/to/jpeg # set to maybe "/usr/local", "/usr/sfw", or "/opt/sfw"
@@ -422,19 +424,22 @@ ZLIB=/path/to/zlib # set to maybe "/usr/local", "/usr/sfw", or "/opt/sfw"
# Below we assume headers in $JPEG/include and $ZLIB/include and the
# shared libraries are in $JPEG/lib and $ZLIB/lib. If your situation
# is different change the locations in the two lines below.
-
+#
CPPFLAGS="-I $JPEG/include -I $ZLIB/include"
LDFLAGS="-L $JPEG/lib -R $JPEG/lib -L $ZLIB/lib -R $ZLIB/lib"
# These two lines may not be needed on more recent Solaris releases:
+#
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"
export PATH CPPFLAGS LDFLAGS
@@ -556,6 +561,10 @@ make
extension is used to pass the input events to the X server. To detect
XBell "beeps" the XKEYBOARD extension is used. If available, the
XFIXES extension is used to retrieve the current mouse cursor shape.
+ Also, if available the X DAMAGE extension is used to receive hints
+ from the X server where modified regions on the screen are. This
+ greatly reduces the system load when not much is changing on the
+ screen and also improves how quickly the screen is updated.
Barbershop mirrors effect: What if x11vnc is started up, and
vncviewer is then started up on the same machine and displayed on the
@@ -629,8 +638,8 @@ make
be a factor of 10 to 1000, and so it usually takes about 0.5-1 sec
to read in the whole video hardware framebuffer (e.g. 5MB for
1280x1024 at depth 24). So whenever activity changes most of the
- screen (e.g. moving a large window) there is a delay of 0.5-1 sec
- while x11vnc reads the changed regions in.
+ screen (e.g. moving or iconifying a large window) there is a delay
+ of 0.5-1 sec while x11vnc reads the changed regions in.
To get a sense of the read and write speeds of your video card,
you can run the benchmarks like: x11perf -getimage500, x11perf
-putimage500, x11perf -shmput500 and for XFree86 displays with
@@ -649,6 +658,13 @@ make
acceptable (this seems to be true for most video cards these
days). Unfortunately it does not seem shadowfb can be turned on
and off dynamically...
+ Another amusing thing one can do is use Xvfb as the X server, e.g.
+ "xinit $HOME/.xinitrc -- /usr/X11R6/bin/Xvfb :1 -screen 0
+ 1024x768x16" x11vnc can poll Xvfb efficiently via main memory.
+ It's not exactly clear why one would want to do this (perhaps to
+ take advantage of an x11vnc feature, such as framebuffer scaling),
+ instead of using vncserver/Xvnc, but we mention it because it may
+ be of use for special purpose applications.
* Somewhat surprisingly, the X11 mouse (cursor) shape is write-only
and cannot be queried from the X server. So in x11vnc the cursor
shape stays fixed at an arrow. (see the "-cursor X" and "-cursor
@@ -716,23 +732,21 @@ make
dual-screen mode to pass the keystrokes and mouse motions to the X11
display?
- [73]Q-11: I am running Win2VNC on my Windows machine and I'm trying to
- create a dual-screen mode with my second display monitor by running
- "x11vnc -nofb". Whenever I initiate the connection Win2VNC quickly
- disconnects and x11vnc says something like:
+ [73]Q-11: I am running Win2VNC on my Windows machine and "x11vnc
+ -nofb" on Unix to pass keyboard and mouse to the Unix monitor.
+ Whenever I start Win2VNC it quickly disconnects and x11vnc says:
rfbProcessClientNormalMessage: read: Connection reset by peer
[Color Issues]
[74]Q-12: The X display I run x11vnc on is only 8 bits per pixel (bpp)
PseudoColor (i.e. only 256 distinct colors). The x11vnc colors may
- start out OK, but after a while the colors are incorrect in certain
- windows.
-
+ start out OK, but after a while they are incorrect in certain windows.
+
[75]Q-13: Color problems: Why are the colors for some windows messed
- up in x11vnc? BTW, I have an X display that has nice
- overlay/multi-depth visuals of different color depths: e.g. there are
- both depth 8 and 24 visuals available at the same time.
+ up in x11vnc? BTW, my X display has nice overlay/multi-depth visuals
+ of different color depths: e.g. there are both depth 8 and 24 visuals
+ available at the same time.
[76]Q-14: How do I figure out the window id to supply to the -id
windowid option?
@@ -758,7 +772,7 @@ make
[81]Q-19: How do I stop x11vnc once it is running in the background?
[82]Q-20: Can I change settings in x11vnc without having to restart
- it? I.e., is there a way to remote control it?
+ it? Can I remote control it?
[Security and Permissions]
@@ -786,7 +800,7 @@ make
and relying on -allow to filter unwanted connections out?
[90]Q-28: Now that -localhost implies listening only on the loopback
- interface, how I can occasionally allow in a non-local host via the
+ interface, how I can occasionally allow in a non-localhost via the
allowonce remote control command?
[91]Q-29: How can I tunnel my connection to x11vnc via an encrypted
@@ -834,120 +848,125 @@ make
[102]Q-40: Are reverse connections (i.e. the VNC server connecting to
the VNC viewer) using "vncviewer -listen" and vncconnect(1) supported?
+ [103]Q-41: Can I use x11vnc as a replacement for Xvnc? (i.e. not for a
+ real display, but for a virtual one I keep around).
+
[Resource Usage and Performance]
- [103]Q-41: I have lots of memory, but why does x11vnc fail with
+ [104]Q-42: I have lots of memory, but why does x11vnc fail with
shmget: No space left on device or Minor opcode of failed
request: 1 (X_ShmAttach)?
- [104]Q-42: How can I make x11vnc use less system resources?
+ [105]Q-43: How can I make x11vnc use less system resources?
- [105]Q-43: How can I make x11vnc use MORE system resources?
+ [106]Q-44: How can I make x11vnc use MORE system resources?
- [106]Q-44: I use x11vnc over a slow link with high latency (e.g.
+ [107]Q-45: I use x11vnc over a slow link with high latency (e.g.
dialup modem), is there anything I can do to speed things up?
- [107]Q-45: When I drag windows around with the mouse or scroll up and
+ [108]Q-46: When I drag windows around with the mouse or scroll up and
down things really bog down (unless I do the drag in a single, quick
motion). Is there anything to do to improve things?
- [108]Q-46: Does x11vnc support the X DAMAGE Xserver extension to find
+ [109]Q-47: Does x11vnc support the X DAMAGE Xserver extension to find
modified regions of the screen quickly and efficiently?
[Mouse Cursor Shapes]
- [109]Q-47: Why isn't the mouse cursor shape (the little icon shape
+ [110]Q-48: Why isn't the mouse cursor shape (the little icon shape
where the mouse pointer is) correct as I move from window to window?
- [110]Q-48: When using XFIXES cursorshape mode, some of the cursors
+ [111]Q-49: 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?
- [111]Q-49: In XFIXES mode, are there any hacks to handle cursor
+ [112]Q-50: In XFIXES mode, are there any hacks to handle cursor
transparency ("alpha channel") exactly?
[Mouse Pointer]
- [112]Q-50: Why does the mouse arrow just stay in one corner in my
+ [113]Q-51: Why does the mouse arrow just stay in one corner in my
vncviewer, whereas my cursor (that does move) is just a dot?
- [113]Q-51: Can I take advantage of the TightVNC extension to the VNC
+ [114]Q-52: 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)?
- [114]Q-52: Is it possible to swap the mouse buttons (e.g. left-handed
+ [115]Q-53: 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]
- [115]Q-53: How can I get my AltGr and Shift modifiers to work between
+ [116]Q-54: How can I get my AltGr and Shift modifiers to work between
keyboards for different languages?
- [116]Q-54: When I try to type a "<" (i.e. less than) instead I get ">"
+ [117]Q-55: When I try to type a "<" (i.e. less than) instead I get ">"
(i.e. greater than)! Strangely, typing ">" works OK!!
- [117]Q-55: I'm using an "international" keyboard (e.g. German "de", or
+ [118]Q-56: 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?
+ 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?
- [118]Q-56: When typing I sometimes get double, triple, or more of my
+ [119]Q-57: 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?
- [119]Q-57: The x11vnc -norepeat mode is in effect, but I still get
+ [120]Q-58: The x11vnc -norepeat mode is in effect, but I still get
repeated keystrokes!!
- [120]Q-58: The machine where I run x11vnc has an AltGr key, but the
+ [121]Q-59: 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?
- [121]Q-59: I have a Sun machine I run x11vnc on. Its Sun keyboard has
+ [122]Q-60: 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)
- [122]Q-60: Can I map a keystroke to a mouse button click on the remote
+ [123]Q-61: Can I map a keystroke to a mouse button click on the remote
machine?
[Screen Related Issues and Features]
- [123]Q-61: The remote display is larger (in number of pixels) than the
+ [124]Q-62: 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?
- [124]Q-62: Does x11vnc support server-side framebuffer scaling? (E.g.
+ [125]Q-63: Does x11vnc support server-side framebuffer scaling? (E.g.
to make the desktop smaller).
- [125]Q-63: Does x11vnc work with Xinerama? (i.e. multiple monitors
+ [126]Q-64: Does x11vnc work with Xinerama? (i.e. multiple monitors
joined together to form one big, single screen).
- [126]Q-64: Can I use x11vnc on a multi-headed display that is not
+ [127]Q-65: Can I use x11vnc on a multi-headed display that is not
Xinerama (i.e. separate screens :0.0, :0.1, ... for each monitor)?
- [127]Q-65: Can x11vnc show only a portion of the display? (E.g. for a
+ [128]Q-66: 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
+ [129]Q-67: Does x11vnc support the XRANDR (X Resize, Rotate and
Reflection) extension? Whenever I rotate or resize the screen x11vnc
just seems to crash.
- [129]Q-67: Why is the view in my VNC viewer completely black? Or why
+ [130]Q-68: Why is the view in my VNC viewer completely black? Or why
is everything flashing around randomly?
- [130]Q-68: I use Linux Virtual Consoles (VC's) to implement 'Fast User
+ [131]Q-69: 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
+ keystrokes to switch between their sessions). How come the view in a
VNC viewer connecting to x11vnc is either completely black or
otherwise all messed up unless the X session x11vnc is attached to is
in the active VC?
- [131]Q-69: I am using x11vnc where my local machine has "popup/hidden
+ [132]Q-70: Can I use x11vnc to view my VMWare session remotely?
+
+ [133]Q-71: 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
@@ -955,13 +974,13 @@ make
[Misc: Clipboard, Beeps, Thanks, etc.]
- [132]Q-70: Does the Clipboard/Selection get transferred between the
+ [134]Q-72: Does the Clipboard/Selection get transferred between the
vncviewer and the X display?
- [133]Q-71: Why don't I hear the "Beeps" in my X session (e.g. when
+ [135]Q-73: Why don't I hear the "Beeps" in my X session (e.g. when
typing tput bel in an xterm)?
- [134]Q-72: Thanks for your program and for your help! Can I make a
+ [136]Q-74: Thanks for your program and for your help! Can I make a
donation?
_________________________________________________________________
@@ -974,13 +993,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 [135]-display option to
+ your DISPLAY environment variable or use the [137]-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 [136]-auth option to point to the
+ environment variable or use the [138]-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
@@ -994,11 +1013,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 [137]-users option).
+ documentation on the [139]-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 [138]-auth
+ MIT-MAGIC-COOKIE file (and set XAUTHORITY to it or use the [140]-auth
option). This command is often useful to find non-standard settings
for XAUTHORITY:
ps wwwweaux | tr ' ' '\n' | grep XAUTHORITY | sort -u
@@ -1041,6 +1060,7 @@ make
libjpeg62-dev
libx11-dev
libxext-dev
+ libxrandr-dev
libxtst-dev
x-dev
xlibs-static-dev
@@ -1068,7 +1088,7 @@ make
earlier and perhaps non-Solaris):
First use the environment settings (CPPFLAGS, LDFLAGS, etc.) in the
- above [139]Solaris build script to run the configure command. That
+ above [141]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
@@ -1098,7 +1118,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
- [140]SunOS 4.x
+ [142]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
@@ -1107,19 +1127,19 @@ typedef unsigned int in_addr_t;
Q-4: Where can I get a precompiled x11vnc binary for my Operating
System?
- Hopefully the [141]build steps above and [142]FAQ provide enough info
+ Hopefully the [143]build steps above and [144]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) [143]http://packages.debian.org/x11vnc
+ Debian: (.deb) [145]http://packages.debian.org/x11vnc
- 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
+ Slackware: (.tgz) [146]http://www.linuxpackages.net/ Redhat/Fedora:
+ (.rpm) [147]http://dag.wieers.com/packages/x11vnc/ Solaris: (pkg)
+ [148]http://www.sunfreeware.com/ wwexptools: (.tgz)
+ [149]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
@@ -1131,13 +1151,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 [148]build notes above for where to download libz and libjpeg, and
+ the [150]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
- [149]test binaries. Some may be old, some may have extra debugging
+ [151]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
@@ -1157,16 +1177,16 @@ typedef unsigned int in_addr_t;
To obtain VNC viewers for the viewing side (Windows, Mac OS, or Unix)
try here:
- * [150]http://www.tightvnc.com/download.html
- * [151]http://www.realvnc.com/download-free.html
- * [152]http://sourceforge.net/projects/cotvnc/
+ * [152]http://www.tightvnc.com/download.html
+ * [153]http://www.realvnc.com/download-free.html
+ * [154]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
- [153]here as well.
+ [155]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?
@@ -1198,18 +1218,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
- [154]-gui option for more info. Examples: "x11vnc ... -gui" and
+ [156]-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 [155]-q and [156]-bg options, respectively. (also: -quiet is
+ Use the [157]-q and [158]-bg options, respectively. (also: -quiet is
an alias for -q)
Note that under -bg the stderr messages will be lost unless you use
- the "[157]-o logfile" option.
+ the "[159]-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
@@ -1221,7 +1241,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
- [158]x11vnc.c file. It also has an [159]option -sigpipe exit to have
+ [160]x11vnc.c file. It also has an [161]option -sigpipe exit to have
x11vnc clean up and exit upon receiving SIGPIPE.
[Win2VNC Related]
@@ -1231,28 +1251,27 @@ 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 "[160]-nofb" option
+ Yes, for best response start up x11vnc with the "[162]-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 [161]x2vnc, however you would
+ This will also work X11 to X11 using [163]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:
- * [162]Original Win2VNC
- * [163]Enhanced Win2VNC and [164]sourceforge link
- * [165]x2vnc
- * [166]x2x also [167]here
- * [168]zvnc (MorphOS)
+ * [164]Original Win2VNC
+ * [165]Enhanced Win2VNC and [166]sourceforge link
+ * [167]x2vnc
+ * [168]x2x also [169]here
+ * [170]zvnc (MorphOS)
All of them will work with x11vnc (except x2x where it is not needed).
- Q-11: I am running Win2VNC on my Windows machine and I'm trying to
- create a dual-screen mode with my second display monitor by running
- "x11vnc -nofb". Whenever I initiate the connection Win2VNC quickly
- disconnects and x11vnc says something like:
+ Q-11: I am running Win2VNC on my Windows machine and "x11vnc -nofb" on
+ Unix to pass keyboard and mouse to the Unix monitor. Whenever I start
+ Win2VNC it quickly disconnects and x11vnc says:
rfbProcessClientNormalMessage: read: Connection reset by peer
Is the default visual of the X display you run x11vnc on low color
@@ -1265,7 +1284,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 [169]-visual option to allow you to
+ libvncserver CVS, x11vnc has the [171]-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:
@@ -1278,10 +1297,9 @@ display :0
Q-12: The X display I run x11vnc on is only 8 bits per pixel (bpp)
PseudoColor (i.e. only 256 distinct colors). The x11vnc colors may
- start out OK, but after a while the colors are incorrect in certain
- windows.
+ start out OK, but after a while they are incorrect in certain windows.
- Use the [170]-flashcmap option to have x11vnc watch for changes in the
+ Use the [172]-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
@@ -1290,20 +1308,20 @@ 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 [171]-notruecolor option has
+ Also note that in some rare cases the [173]-notruecolor option has
corrected colors on 8bpp displays. The red, green, and blue masks were
non-zero in 8bpp PseudoColor on an obscure setup, and this option
corrected the problems.
Q-13: Color problems: Why are the colors for some windows messed up in
- x11vnc? BTW, I have an X display that has nice overlay/multi-depth
- visuals of different color depths: e.g. there are both depth 8 and 24
- visuals available at the same time.
+ x11vnc? BTW, my X display has nice overlay/multi-depth visuals of
+ different color depths: e.g. there are both depth 8 and 24 visuals
+ available at the same time.
- You may want to review the [172]previous question regarding 8 bpp
+ You may want to review the [174]previous question regarding 8 bpp
PseudoColor.
- On some hardware (Sun/SPARC, Sgi), the [173]-overlay option discussed
+ On some hardware (Sun/SPARC, Sgi), the [175]-overlay option discussed
a couple paragraphs down may solve this for you (you may want to skip
to it directly).
@@ -1341,7 +1359,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 [174]-overlay x11vnc option (Aug/2004) to have x11vnc use the
+ use the [176]-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
@@ -1363,7 +1381,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 [175]-id option to
+ possible workaround in this case is to use the [177]-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).
@@ -1371,7 +1389,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
- [176]-overlay option works for Solaris machines with overlay visuals
+ [178]-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
@@ -1381,13 +1399,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 [177]problems.
+ debugging x11vnc [179]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 "[178]-id pick" to
+ Also, as of Dec/2004 libvncserver CVS you can use "[180]-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.
@@ -1404,7 +1422,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 [179]-sid windowid option ("shifted" windowid).
+ polling, try the [181]-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.
@@ -1456,15 +1474,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 [180]-display option to point the display to that of
+ machine. Use the [182]-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 [181]-noshm option (this enables the polling over
+ and also supply the [183]-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
- [182]-flipbyteorder if the colors get messed up due to endian byte
+ [184]-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
@@ -1478,7 +1496,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
- [183]-auth option to point to the correct file). Other options include
+ [185]-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 -
@@ -1488,7 +1506,7 @@ TrueColor defdepth 24
xauth(1) manpage for more details.
If the display name needs to be changed between the two hosts, see
- [184]this note on the "xauth add ..." command.
+ [186]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.
@@ -1498,7 +1516,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 [185]poll
+ Not recommended, but as a last resort, you could have x11vnc [187]poll
the Xterminal over the network.
Note: use of Display Manager (gdm, kdm, ...) auth cookie files (i.e.
@@ -1515,17 +1533,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
- [186]-remote and [187]-query options. To shut down the running x11vnc
+ [188]-remote and [189]-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 [188]-forever option has not been supplied,
+ For older versions: If the [190]-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 [189]-bg option
+ If you have not put x11vnc in the background via the [191]-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
@@ -1534,13 +1552,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 [190]-clear_mods option and [191]-clear_keys
+ Alt. Alternatively, the [192]-clear_mods option and [193]-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?
+ Can I remote control it?
- Look at the [192]-remote (same as -R) and [193]-query (same as -Q)
+ Look at the [194]-remote (same as -R) and [195]-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
@@ -1552,7 +1570,7 @@ TrueColor defdepth 24
be possible.
There is also a simple tcl/tk gui based on this remote control
- mechanism. See the [194]-gui option for more info.
+ mechanism. See the [196]-gui option for more info.
[Security and Permissions]
@@ -1564,12 +1582,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" [195]option, which is the the same
+ the -storepasswd "pass" "file" [197]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: [196]-rfbauth
+ You then use the password via the x11vnc option: [198]-rfbauth
$HOME/myvncpasswd
Compared to vncpasswd(1) the latter two methods are a somewhat unsafe
@@ -1578,7 +1596,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 [197]-passwdfile and -passwd/-viewpasswd plain
+ x11vnc also has the [199]-passwdfile and -passwd/-viewpasswd plain
text (i.e. not obscured like the -rfbauth VNC passwords) password
options.
@@ -1586,13 +1604,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
- [198]-viewpasswd option to supply the view-only password. Note the
- full-access password option [199]-passwd must be supplied at the same
+ [200]-viewpasswd option to supply the view-only password. Note the
+ full-access password option [201]-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
- [200]-passwdfile option to specify a file containing plain text
+ [202]-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
@@ -1600,7 +1618,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 [201]-rfbauth
+ View-only passwords currently do not work for the [203]-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
@@ -1613,7 +1631,7 @@ TrueColor defdepth 24
some users just be able to move the mouse, but not click or type
anything?
- As of Feb/2005, the [202]-input option allows you to do this. "K",
+ As of Feb/2005, the [204]-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
@@ -1628,22 +1646,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 [203]-forever option (aka -many) to have
+ periods of time. Use the [205]-forever option (aka -many) to have
x11vnc wait for more connections after the first client disconnects.
- Use the [204]-shared option to have x11vnc allow multiple clients to
+ Use the [206]-shared option to have x11vnc allow multiple clients to
connect simultaneously.
- Recommended additional safety measures include using ssh ([205]see
+ Recommended additional safety measures include using ssh ([207]see
above), stunnel, or a VPN to authenticate and encrypt the viewer
- 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
+ connections or to at least use the -rfbauth passwd-file [208]option to
+ use VNC password protection (or [209]-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 [208]-allow and [209]-localhost options to limit
+ Yes, look at the [210]-allow and [211]-localhost options to limit
connections by hostname or IP address. E.g.
x11vnc -allow 192.168.0.1,192.168.0.2
@@ -1655,7 +1673,7 @@ TrueColor defdepth 24
Note that -localhost is the same as "-allow 127.0.0.1"
For more control, build libvncserver with libwrap support
- [210](tcp_wrappers) and then use /etc/hosts.allow See hosts_access(5)
+ [212](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)
@@ -1674,7 +1692,7 @@ TrueColor defdepth 24
is "vnc", e.g.:
vnc: 192.168.100.3 .example.com
- Note that if you run x11vnc out of [211]inetd you do not need to build
+ Note that if you run x11vnc out of [213]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.
@@ -1682,39 +1700,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 "[212]-listen
+ As of Mar/2005 in the libvncserver CVS, there is the "[214]-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 "[213]-allow host1,..." option to allow only specific hosts
+ use the "[215]-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 [214]-localhost now implies "-listen localhost" since that is
+ option [216]-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
+ interface, how I can occasionally allow in a non-localhost via the
allowonce remote control command?
- To do this specify "[215]-allow localhost". Unlike [216]-localhost
+ To do this specify "[217]-allow localhost". Unlike [218]-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
- ([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
+ ([219]-listen option) via remote control or gui, you may need to also
+ manually adjust the [220]-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 [219]-localhost on
+ in on the listening interface. If you just toggle [221]-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 [220]how to tunnel VNC via
+ See the description earlier on this page on [222]how to tunnel VNC via
SSH from Unix to Unix. A number of ways are described along with some
issues you may encounter.
@@ -1724,7 +1742,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?
- [221]Above we described how to tunnel VNC via SSH from Unix to Unix,
+ [223]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
@@ -1747,8 +1765,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 [222]-localhost
- and [223]-rfbauth/[224]-passwdfile options.
+ For extra protection feel free to run x11vnc with the [224]-localhost
+ and [225]-rfbauth/[226]-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
@@ -1757,9 +1775,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 [225]above another option is to first start the VNC
+ As discussed [227]above another option is to first start the VNC
viewer in "listen" mode, and then launch x11vnc with the
- "[226]-connect localhost" option to establish the reverse connection.
+ "[228]-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).
@@ -1769,7 +1787,7 @@ TrueColor defdepth 24
some clients view-only? How about running an arbitrary program to make
the decisions?
- Yes, look at the "[227]-accept command" option, it allows you to
+ Yes, look at the "[229]-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
@@ -1788,7 +1806,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 [228]-viewonly option has been
+ mouse on the "View" button. If the [230]-viewonly option has been
supplied, the "View" action will not be present: the whole display is
view only in that case.
@@ -1804,7 +1822,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 [229]ftp://ftp.x.org/
+ is available at [231]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
@@ -1843,7 +1861,7 @@ elif [ $rc = 4 ]; then
fi
exit 1
- Stefan Radman has written a nice dtksh script [230]dtVncPopup for use
+ Stefan Radman has written a nice dtksh script [232]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.
@@ -1852,7 +1870,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 "[231]-gone
+ To run a command when a client disconnects, use the "[233]-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
@@ -1866,13 +1884,13 @@ exit 1
such support.
One approximate method involves starting x11vnc with the
- [232]-localhost option. This basically requires the viewer user to log
+ [234]-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 [233]elsewhere on this page. Of course a malicious user
+ mentioned [235]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
@@ -1881,7 +1899,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 [234]-accept option that runs a program to examine
+ involves using the [236]-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
@@ -1913,7 +1931,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 [235]-users option that allows things
+ As of Feb/2005 x11vnc has the [237]-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
@@ -1933,7 +1951,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 [236]blockdpy.c The idea behind it is simple (but
+ source for it is [238]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
@@ -1949,15 +1967,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 [237]-accept option and told
- to exit via the [238]-gone option (the vnc client user should
+ The blockdpy utility is launched by the [239]-accept option and told
+ to exit via the [240]-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 [239]-gone option under CDE to run a
+ Yes, a user mentions he uses the [241]-gone option under CDE to run a
screen lock program:
x11vnc -display :0 -forever -gone 'dtaction LockDisplay'
@@ -1980,11 +1998,11 @@ exit 1 # reject it
permissions to connect to the X display.
Here are some ideas:
- * Use the description under "Continuously" in the [240]FAQ on x11vnc
+ * Use the description under "Continuously" in the [242]FAQ on x11vnc
and Display Managers
- * Use the description in the [241]FAQ on x11vnc and inetd(1)
+ * Use the description in the [243]FAQ on x11vnc and inetd(1)
* Start x11vnc from your $HOME/.xsession (or $HOME/.xinitrc)
- * Although less reliable, see the [242]x11vnc_loop rc.local hack
+ * Although less reliable, see the [244]x11vnc_loop rc.local hack
below.
The display manager scheme will not be specific to which user has the
@@ -2007,36 +2025,40 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
session yet).
One time only. If the X login screen is running and you just want to
- connect to it once:
+ connect to it once (i.e. a one-shot):
- On Linux it seems it is possible to do this by just adjusting the
- XAUTHORITY environment variable to point to the MIT-COOKIE auth file
+ It is usually possible to do this by just adjusting the XAUTHORITY
+ environment variable to point to the correct MIT-COOKIE auth file
while running x11vnc as root, e.g. for the gnome display manager, gdm:
x11vnc -auth /var/gdm/:0.Xauth -display :0
- (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
+ (the [245]-auth option sets the XAUTHORITY variable for you).
+
+ There will be a similar thing for xdm using however a different auth
+ directory path (perhaps something like
+ /var/lib/xdm/authdir/authfiles/A:0-XQvaJk for xdm or
/var/lib/kdm/A:0-crWk72 for kdm, where the random characters in
- basename will vary a bit).
+ basename will vary a bit). Read your system docs to find out where the
+ display manager cookie files are kept.
+
+ Trick: sometimes ps(1) can reveal the X server process -auth argument
+ (e.g. "ps wwwwaux | grep auth").
- Tricks: another place to look for the auth file is via ps(1) output
- for the X server process to find any -auth argument (e.g. ps wwwwaux |
- grep auth). Also, sometimes this command is useful: ps wwwweaux | tr '
- ' '\n' | grep XAUTHORITY | sort -u
+ You next connect to x11vnc with a VNC viewer, give your username and
+ password to the X login prompt to start your session.
- gdm seems to have an annoying setting that causes x11vnc (and any
- other X clients) to be killed after the user logs in. Setting
+ Note: gdm seems to have an annoying setting that causes x11vnc (and
+ any other X clients) to be killed after the user logs in. Setting
KillInitClients=false in the [daemon] section of /etc/X11/gdm/gdm.conf
avoids this. Otherwise, just restart x11vnc and then reconnect your
viewer.
- 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 [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.
+ Note: 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
+ [246]the example at the end of this FAQ). Then restart dtlogin, e.g.:
+ /etc/init.d/dtlogin stop; /etc/init.d/dtlogin start or reboot.
Continuously. Have x11vnc reattach each time the X server is
restarted (i.e. after each logout):
@@ -2052,35 +2074,36 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
although the exact location can depend on operating system and
distribution. See the documentation for your display manager: gdm(1),
- kdm(1), xdm(1), dtlogin(1) for additional details. The above
- Dtlogin*grabServer:False step will be needed for dtlogin here as well.
- There may also be display number specific scripts: e.g. Xsetup_0 vs.
- Xsetup, you need to watch out for.
+ kdm(1), xdm(1), dtlogin(1) for additional details. There may also be
+ display number specific scripts: e.g. Xsetup_0 vs. Xsetup, you need to
+ watch out for.
+
+ Note: The above gdm setting of KillInitClients=false in
+ /etc/X11/gdm/gdm.conf is needed here as well.
+
+ Note: The above Dtlogin*grabServer:False step will be needed for
+ dtlogin here as well.
In any event, the line you will add to the display manager script will
look something like:
- /usr/local/bin/x11vnc -rfbauth /path/to/the/vnc/passwd -forever -bg
+ /usr/local/bin/x11vnc -rfbauth /path/to/the/vnc/passwd -o /tmp/x11vnc.log -fo
+rever -bg
+
+ where you should customize the exact command to your needs.
- where you should customize the exact command to your needs. Note that
- we do not need to specify -display or -auth because happily they are
- already set for us in the DISPLAY and XAUTHORITY environment
- variables.
+ Happy, happy, joy, joy: Note that we do not need to specify -display
+ or -auth because happily they are already set for us in the DISPLAY
+ and XAUTHORITY environment variables for the Xsetup script!!!
You may also want to force the VNC port with something like "-rfbport
5900"
-
- You may want to redirect the x11vnc output to a separate log file for
- debugging. In that case replace the -bg above with something like:
- 1>> /var/tmp/x11vnc.log 2>&1 &
-
- (or use the "[245]-o logfile" option).
_________________________________________________________________
Fedora/gdm: Here is an example of what we did on a vanilla install of
Fedora-C3 (seems to use gdm by default). Add a line like this to
/etc/X11/gdm/Init/:0
- /usr/local/bin/x11vnc -rfbauth /etc/x11vnc.passwd -forever -bg -o /var/tmp/x1
-1vnc.log
+ /usr/local/bin/x11vnc -rfbauth /etc/x11vnc.passwd -forever -bg -o /tmp/x11vnc
+.log
And then add this line to /etc/X11/gdm/gdm.conf in the [daemon]
section:
@@ -2088,7 +2111,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 [246]full details
+ killed immediately after the user logs in. Here are [247]full details
on how to configure gdm
_________________________________________________________________
@@ -2119,16 +2142,24 @@ x11vnc -logfile $HOME/.x11vnc.log -rfbauth $HOME/.vnc/passwd -forever -bg
(or reboot or maybe just restart the X session).
_________________________________________________________________
+ KDM: One user running the kdm display manager reports putting this
+ line:
+ x11vnc -forever -rfbauth /home/xyz/.vnc/passwd -bg -o /tmp/x11vnc.log
+
+ in /etc/kde/kdm/Xsetup. After rebooting the system it all seemed to
+ work fine.
+ _________________________________________________________________
+
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: [247]x11vnc_loop It will need some local
+ file like rc.local: [248]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.
+ guessed by this script, use of the display manager script method
+ described above is greatly preferred.
If the machine is a traditional Xterminal you may want to read
- [248]this FAQ.
+ [249]this FAQ.
Q-38: Can I run x11vnc out of inetd(1)? How about xinetd(1)?
@@ -2137,33 +2168,33 @@ 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 [249]-inetd
+ where the shell script /usr/local/bin/x11vnc_sh uses the [250]-inetd
option and looks something like (you'll need to customize to your
settings).
#!/bin/sh
/usr/local/bin/x11vnc -inetd -display :0 -auth /home/fred/.Xauthority \
- -rfbauth /home/fred/.vnc/passwd 2>> /tmp/x11vnc_sh.log
-
- Note that you must redirect the standard error output to a log file or
- /dev/null for proper operation via inetd (otherwise the standard error
- also goes to the VNC vncviewer, and that confuses it greatly). If you
- do not use a wrapper script as above but rather call x11vnc directly
- in /etc/inetd.conf and do not redirect stderr, then you must specify
- 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 [251]-auth to point to the
+ -rfbauth /home/fred/.vnc/passwd -o /tmp/x11vnc_sh.log
+
+ Important: Note that you must redirect the standard error output to a
+ log file (e.g. -o file) or to /dev/null for proper operation via inetd
+ (otherwise the standard error also goes to the VNC vncviewer, and that
+ confuses it greatly). If you do not use a wrapper script as above but
+ rather call x11vnc directly in /etc/inetd.conf and do not redirect
+ stderr to a file, then you must specify the -q (aka [251]-quiet)
+ option: "/usr/local/bin/x11vnc -q -inetd ..." or use "-o logfile" to
+ collect the output in a file. The wrapper script with redirection to a
+ log file is the recommended method because the errors and warnings
+ printed out are very useful in troubleshooting problems.
+
+ Note also the need to set XAUTHORITY via [252]-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
ideas on what that auth file may be, etc.
- On Solaris you cannot have the bare number 5900 in /etc/inetd.conf,
- you'll need to replace it with a word like x11vnc an then put
- something like "x11vnc 5900/tcp" in /etc/services.
+ Note: On Solaris you cannot have the bare number 5900 in
+ /etc/inetd.conf, you'll need to replace it with a word like x11vnc an
+ then put something like "x11vnc 5900/tcp" in /etc/services.
Be sure to look at your /etc/hosts.allow and /etc/hosts.deny settings
to limit the machines that can connect to this service (your
@@ -2202,7 +2233,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 [252]option:
+ that connect to it, run x11vnc with this [253]option:
-httpdir /path/to/the/java/classes/dir
(this directory will contain the files index.vnc and, for example,
@@ -2231,7 +2262,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 [253]-connect option. To connect immediately
+ starts up x11vnc with the [254]-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
@@ -2239,7 +2270,7 @@ service x11vncservice
hosts to connect to.
To use the vncconnect(1) program (from the core VNC package at
- www.realvnc.com) specify the [254]-vncconnect option to x11vnc (Note:
+ www.realvnc.com) specify the [255]-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
@@ -2252,10 +2283,63 @@ service x11vncservice
#
xprop -root -f VNC_CONNECT 8s -set VNC_CONNECT "$1"
+ Q-41: Can I use x11vnc as a replacement for Xvnc? (i.e. not for a real
+ display, but for a virtual one I keep around).
+
+ You can, but you would not be doing this for performance reasons (for
+ virtual X sessions, Xvnc will give the fastest response). You may want
+ to do this because Xvnc does not support an X server extension you
+ desire, or you want to take advantage of one of x11vnc's unending
+ number of options and features.
+
+ One way to acheive this is to have a Xvfb(1) virtual framebuffer X
+ server running in the background and have x11vnc attached to it. One
+ could view this desktop both remotely and locally using vncviewer.
+ Make sure vncviewer's "-encodings raw" is in effect for local viewing
+ (compression seems to slow things down locally).
+
+ Here is one way to start up Xvfb:
+ xinit -- /usr/X11R6/bin/Xvfb :1 -screen 0 1024x768x16
+
+ This starts up a 16bpp virtual display. To export it via VNC use
+ "x11vnc -display :1 ...".
+
+ One good thing about Xvfb is that the virtual framebuffer exists in
+ main memory (rather than in the video hardware), and so x11vnc can
+ "screen scrape" it efficiently (more than, say, 100X faster than
+ normal video hardware).
+
+ There are some annoyances WRT Xvfb though. The default keyboard
+ mapping seems to be very poor. One should run x11vnc with
+ [256]-add_keysyms option to have keysyms added automatically. Also, to
+ add the Shift_R and Control_R modifiers something like this is needed:
+#!/bin/sh
+xmodmap -e "keycode any = Shift_R"
+xmodmap -e "add Shift = Shift_L Shift_R"
+xmodmap -e "keycode any = Control_R"
+xmodmap -e "add Control = Control_L Control_R"
+
+ Perhaps the Xvfb options -xkbdb or -xkbmap could be used to get a
+ better default keyboard mapping.
+
+ One can use this sort of scheme to export other virtual X sessions,
+ say Xnest or even Xvnc itself (useful for testing x11vnc).
+
+
+ Another application of x11vnc in this vein is to let it export
+ displays of "headless" machines. For example, you may have some server
+ machines with no keyboard, mouse, or monitor, but it still has a video
+ card. An X server can be started on the headless machine (sometimes
+ this requires configuring the X server to not fail if it cannot detect
+ a keyboard or mouse). Then you can export that X display via x11vnc
+ (e.g. see [257]this FAQ). This can be quite useful for a GUI (or
+ other) testing setups: the engineers do not need to walk to machines
+ running different hardware, OS's, etc. They just connect to the test
+ machines over the network via VNC.
[Resource Usage and Performance]
- Q-41: I have lots of memory, but why does x11vnc fail with shmget:
+ Q-42: I have lots of memory, but why does x11vnc fail with shmget:
No space left on device or Minor opcode of failed request: 1
(X_ShmAttach)?
@@ -2273,7 +2357,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 [255]shm_clear to list and prompt for removal
+ Here is a shell script [258]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,
@@ -2307,36 +2391,36 @@ ied)
in /etc/system. See the next paragraph for more workarounds.
To minimize the number of shm segments used by x11vnc try using the
- [256]-onetile option (corresponds to only 3 shm segments used, and
+ [259]-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
- [257]-noshm option. Performance will be somewhat degraded but when
+ [260]-noshm option. Performance will be somewhat degraded but when
done over local machine sockets it should be acceptable (see an
- [258]earlier question discussing -noshm).
+ [261]earlier question discussing -noshm).
- Q-42: How can I make x11vnc use less system resources?
+ Q-43: How can I make x11vnc use less system resources?
- The [259]-nap and "[260]-wait n" (where n is the sleep between polls
+ The [262]-nap and "[263]-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
- [261]-onetile option will use less memory and use fewer shared memory
- slots (add [262]-fs 1.0 for one less slot).
+ [264]-onetile option will use less memory and use fewer shared memory
+ slots (add [265]-fs 1.0 for one less slot).
- Q-43: How can I make x11vnc use MORE system resources?
+ Q-44: How can I make x11vnc use MORE system resources?
- 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
+ You can try [266]-threads and dial down the wait time (e.g. -wait 1)
+ and possibly dial down [267]-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 [265]-id option) can be streamed over a LAN or wireless at
+ the x11vnc [268]-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
+ Q-45: I use x11vnc over a slow link with high latency (e.g. dialup
modem), is there anything I can do to speed things up?
Some things you might want to experiment with (most of which will help
@@ -2348,12 +2432,15 @@ 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
- [266]-solid [color] option.
+ [269]-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.
* Avoid small scrolls of large windows using the Arrow keys or
scrollbar. Try to use PageUp/PageDown instead.
+ * Turn off Anti-aliased fonts on your system, web browser,
+ terminals, etc. AA fonts do not compress as well as traditional
+ fonts.
* On XFree86 turn on the Shadow Framebuffer to speed up reading.
(Option "ShadowFB" "true", and possibly Option "NoAccel" "true" as
well, in the Device section of /etc/X11/XF86Config) This disables
@@ -2361,7 +2448,7 @@ ied)
worth it, but could be of use in some situations.
VNC viewer parameters:
- * Use a [267]TightVNC enabled viewer!
+ * Use a [270]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
@@ -2379,22 +2466,22 @@ ied)
vncviewer to be very slow)
x11vnc parameters:
- * Try using [268]-nodragging (no screen updates when dragging mouse,
+ * Try using [271]-nodragging (no screen updates when dragging mouse,
but sometimes you miss visual feedback)
- * Try the [269]-progressive pixelheight mode with the block
+ * Try the [272]-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 [270]-fs 1.0 (disables fullscreen updates)
- * Try increasing [271]-wait or [272]-defer (reduces the maximum
+ * Set [273]-fs 1.0 (disables fullscreen updates)
+ * Try increasing [274]-wait or [275]-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 [273]-id (cuts
+ * If you just want to watch one (simple) window use [276]-id (cuts
down extraneous polling and updates, but can be buggy or
insufficient)
- * Set [274]-nosel (disables all clipboard selection exchange)
- * Use [275]-nocursor and [276]-nocursorpos (repainting the remote
+ * Set [277]-nosel (disables all clipboard selection exchange)
+ * Use [278]-nocursor and [279]-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
+ Q-46: When I drag windows around with the mouse or scroll up and down
things really bog down (unless I do the drag in a single, quick
motion). Is there anything to do to improve things?
@@ -2402,25 +2489,25 @@ ied)
tree. The default should now be much better than before and dragging
small windows around should no longer be a huge pain. If for some
reason these changes make matters worse, you can go back to the old
- way via the "[277]-pointer_mode 1" option.
+ way via the "[280]-pointer_mode 1" option.
- Also added was the [278]-nodragging option that disables all screen
+ Also added was the [281]-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 [279]-pointer_mode n option
+ As of Dec/2004 in the libvncserver CVS the [282]-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
+ Also, in some circumstances the [283]-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
+ Q-47: 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
@@ -2454,17 +2541,17 @@ ied)
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
+ skipped). You can use the "[284]-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".
+ The option "[285]-xd_mem f" may also be of use in tuning the
+ algorithm. To disable using DAMAGE entirely use "[286]-noxdamage".
[Mouse Cursor Shapes]
- Q-47: Why isn't the mouse cursor shape (the little icon shape where
+ Q-48: 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
@@ -2478,16 +2565,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 "[284]-cursor X" option that
+ A simple kludge is provided by the "[287]-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 "[285]-cursor some" option for
+ work for those cases. Also see the "[288]-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 [286]-overlay option is supplied. See [287]this FAQ
+ cursor when the [289]-overlay option is supplied. See [290]this FAQ
for more info.
Also as of Dec/2004 in the libvncserver CVS XFIXES X extension support
@@ -2495,7 +2582,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 [288]Solaris 10.
+ distros and [291]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
@@ -2503,9 +2590,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. [289]Details can be found here.
+ under 32bpp. [292]Details can be found here.
- Q-48: When using XFIXES cursorshape mode, some of the cursors look
+ Q-49: 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?
@@ -2535,24 +2622,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 "[290]-alphacut n" option lets
+ course!) some tunable parameters. The "[293]-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 "[291]-alphafrac f" option tries to correct individual
+ 240. The "[294]-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 [292]-alpharemove that is useful for
+ Finally, there is an option [295]-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-49: In XFIXES mode, are there any hacks to handle cursor
+ Q-50: 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
@@ -2560,11 +2647,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 [293]-nocursorshape x11vnc option.
+ disabled for all clients with the [296]-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
- [294]-noalphablend option to disable this behavior (always approximate
+ [297]-noalphablend option to disable this behavior (always approximate
transparent cursors with opaque RGB values).
The CursorShapeUpdates VNC extension complicates matters because the
@@ -2589,12 +2676,12 @@ ied)
[Mouse Pointer]
- Q-50: Why does the mouse arrow just stay in one corner in my
+ Q-51: 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 [295]tightvnc extension
+ This default takes advantage of a [298]tightvnc extension
(CursorShapeUpdates) that allows specifying a cursor image shape for
- the local VNC viewer. You may disable it with the [296]-nocursor
+ the local VNC viewer. You may disable it with the [299]-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
@@ -2602,22 +2689,22 @@ ied)
CursorShapeUpdates) will be to draw the moving cursor into the x11vnc
framebuffer. This can also be disabled via -nocursor.
- Q-51: Can I take advantage of the TightVNC extension to the VNC
+ Q-52: 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 [297]-cursorpos option when starting x11vnc. A VNC viewer must
+ Use the [300]-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 [298]-nocursorpos
- and [299]-nocursorshape.
+ libvncserver CVS -cursorpos is the default. See also [301]-nocursorpos
+ and [302]-nocursorshape.
- Q-52: Is it possible to swap the mouse buttons (e.g. left-handed
+ Q-53: 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: [300]-buttonmap
+ You can remap the mouse buttons via something like: [303]-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.
@@ -2625,7 +2712,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 [301]-debug_pointer option prints out much info for
+ Note that the [304]-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
@@ -2647,7 +2734,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 [302]-buttonmap but rather configuring the X server
+ consider not using [305]-buttonmap but rather configuring the X server
to think it has a mouse with 5 buttons even though the physical mouse
does not.
@@ -2665,10 +2752,10 @@ ied)
(yes, this is getting a little silly).
[Keyboard Issues]
- Q-53: How can I get my AltGr and Shift modifiers to work between
+ Q-54: How can I get my AltGr and Shift modifiers to work between
keyboards for different languages?
- The option [303]-modtweak should be of some use for this. It is a mode
+ The option [306]-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.
@@ -2677,20 +2764,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 [304]this FAQ
+ and ">" it. This key does not exist on the keyboard (see [307]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 [305]FAQ about the -xkb option for a more powerful method
+ Also see the [308]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
- [306]-debug_keyboard option prints out much info for every keystroke
+ [309]-debug_keyboard option prints out much info for every keystroke
and so can be useful debugging things.
- Q-54: When I try to type a "<" (i.e. less than) instead I get ">"
+ Q-55: 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
@@ -2737,25 +2824,25 @@ ied)
-remap less-comma
These are convenient in that they do not modify the actual X server
- settings. The former ([307]-modtweak) is a mode that monitors the
+ settings. The former ([310]-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 ([308]-remap less-comma) is an immediate remapping of the
+ The latter ([311]-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 [309]FAQ about the -xkb option as a possible workaround
+ See also the [312]FAQ about the -xkb option as a possible workaround
using the XKEYBOARD extension.
- Note that the [310]-debug_keyboard option prints out much info for
+ Note that the [313]-debug_keyboard option prints out much info for
every keystroke to aid debugging keyboard problems.
- Q-55: I'm using an "international" keyboard (e.g. German "de", or
+ Q-56: 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?
+ 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?
The problem with Windows is it does not seem to handle AltGr well. It
seems to fake it up by sending Control_L+Alt_R to applications. The
@@ -2771,7 +2858,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 [311]-modtweak
+ This all worked fine with x11vnc running with the [314]-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
@@ -2789,7 +2876,7 @@ ied)
* there is a new option -xkb to use the XKEYBOARD extension API to
do the Modifier key tweaking.
- The [312]-xkb option seems to fix all of the missing keys: "@", "<",
+ The [315]-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
@@ -2807,7 +2894,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:
- [313]-skip_keycodes 93
+ [316]-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
@@ -2824,14 +2911,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 [314]-remap x11vnc option:
+ created using the [317]-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
- [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
+ [318]-add_keysyms option in the next paragraph.
+ * To complement the above workaround using the [319]-remap, an
+ option [320]-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
@@ -2839,7 +2926,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-56: When typing I sometimes get double, triple, or more of my
+ Q-57: 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
@@ -2847,7 +2934,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) [318]-norepeat x11vnc option. You will still
+ use the new (Jul/2004) [321]-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.
@@ -2869,34 +2956,40 @@ 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 [319]-norepeat (which has since Dec/2004 been
+ needed, or to use the [322]-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-57: The x11vnc -norepeat mode is in effect, but I still get repeated
+ Q-58: 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
- [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
- -norepeat mode will not battle with things turning autorepeat back on.
- (It will, however, turn it off whenever it goes from a state of zero
- clients to one client).
-
- Under these circumstances you will have to manually turn autorepeating
- off by typing "xset r off" or "x11vnc -R norepeat" or a desktop
- utility. If something in your desktop is automatically turning it back
- on you will have to disable that somehow.
-
- Q-58: The machine where I run x11vnc has an AltGr key, but the local
+ [323]this FAQ) If so, x11vnc is starting before your session and it
+ disables autorepeat when you connect, but then after you log in your
+ session startup (GNOME, KDE, ...) could be resetting the autorepeat to
+ be on. Or it could be something inside your desktop trying to be
+ helpful that decides to turn it back on.
+
+ x11vnc in -norepeat mode will by default reset autorepeat to off 2
+ times (to help get thru the session startup problem), but it will not
+ continue to battle with things turning autorepeat back on. It will
+ also turn autorepeat off whenever it goes from a state of zero clients
+ to one client. You can adjust the number of resets via "-norepeat N",
+ or use "-norepeat -1" to have it keep resetting it whenever autorepeat
+ gets turned back on when clients are connected.
+
+ In general you can manually turn autorepeating off by typing "xset r
+ off", or a using desktop utility/menu, or "x11vnc -R norepeat". If
+ something in your desktop is automatically turning it back on you
+ should figure out how to disable that somehow.
+
+ Q-59: 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 "[321]-remap Super_R-Mode_switch" x11vnc option may
+ Something like "[324]-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)).
@@ -2906,7 +2999,7 @@ ied)
Super_R-Mode_switch,Menu-Multi_key" or use "-remap filename" to
specify remappings from a file.
- Q-59: I have a Sun machine I run x11vnc on. Its Sun keyboard has just
+ Q-60: 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)
@@ -2918,17 +3011,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 [322]-remap Alt_L-Meta_L to x11vnc may be sufficient for ones
+ the [325]-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-60: Can I map a keystroke to a mouse button click on the remote
+ Q-61: 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 [323]-remap
+ have x11vnc do the remapping. This can be done via the [326]-remap
option using the fake "keysyms" Button1, Button2, etc. as the "to"
keys (i.e. the ones after the "-")
@@ -2936,7 +3029,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:
- [324]-remap Super_R-Button2
+ [327]-remap Super_R-Button2
maps the Super_R "flag" key press to the Button2 click, thereby making
X pasting a bit easier.
@@ -2947,7 +3040,7 @@ ied)
[Screen Related Issues and Features]
- Q-61: The remote display is larger (in number of pixels) than the
+ Q-62: 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?
@@ -2965,26 +3058,24 @@ 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 [325]this
+ local display. Especially for hand-held devices. See also [328]this
FAQ on x11vnc scaling.
- Q-62: Does x11vnc support server-side framebuffer scaling? (E.g. to
+ Q-63: 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 "[326]-scale fraction"
+ per-client setting. To enable it use the "[329]-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
- clear how useful that is...)
+ that if fraction is greater than one the display is magnified.
- The current implementation is experimental in that it still needs to
- be optimized. Extra resources (CPU, memory I/O, and memory) are
- required to do the scaling. If the machine is slow where x11vnc is run
- with scaling enabled, the interactive response can be unacceptable.
- OTOH, if run with scaling on a fast machine the performance
- degradation is usually not a big issue or even noticeable.
+ Extra resources (CPU, memory I/O, and memory) are required to do the
+ scaling. If the machine is slow where x11vnc is run with scaling
+ enabled, the interactive response can be unacceptable. OTOH, if run
+ with scaling on a fast machine the performance degradation is usually
+ not a big issue or even noticeable.
Also, if you just want a quick, rough "thumbnail" of the display you
can append ":nb" to the fraction to turn on "no blending" mode. E.g.:
@@ -2993,6 +3084,12 @@ ied)
when scaling 8bpp PseudoColor displays (because blending an indexed
colormap is a bad idea and leads to random colors).
+ One can also use the ":nb" with an integer scale factor (say "-scale
+ 2:nb") to use x11vnc as a screen magnifier for vision impaired
+ [330]applications. Since with integer scale factors the framebuffers
+ become huge and scaling operations time consuming, be sure to use
+ ":nb" for the fastest response.
+
In general for a scaled display if you are using a TightVNC viewer you
may want to turn off jpeg encoding (e.g. vncviewer -nojpeg host:0).
There appears to be a noise enhancement effect, especially for regions
@@ -3015,10 +3112,16 @@ 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 ([327]-rfbport option,
+ different scalings listening on separate ports ([331]-rfbport option,
etc.).
- Q-63: Does x11vnc work with Xinerama? (i.e. multiple monitors joined
+ As of Mar/2005 in the libvncserver CVS x11vnc now scales the mouse
+ cursor with the same scale factor as the screen. If you don't want
+ that, use the [332]"-scale_cursor frac" option to set the cursor
+ scaling to a different factor (e.g. use "-scale_cursor 1" to keep the
+ cursor at its natural unscaled size).
+
+ Q-64: 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
@@ -3030,22 +3133,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 [328]-blackout x11vnc option allows you
+ distracting to the viewer. The [333]-blackout x11vnc option allows you
to blacken-out rectangles by specifying their WxH+X+Y geometries. If
- your system has the libXinerama library, the [329]-xinerama x11vnc
+ your system has the libXinerama library, the [334]-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 [330]-xwarppointer
+ of the large display. If this happens try using the [335]-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-64: Can I use x11vnc on a multi-headed display that is not Xinerama
+ Q-65: 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
@@ -3063,29 +3166,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 [331]FAQ to increase the limit. It
- is probably also a good idea to run with the [332]-onetile option in
+ /etc/system as mentioned in another [336]FAQ to increase the limit. It
+ is probably also a good idea to run with the [337]-onetile option in
this case (to limit each x11vnc to 3 shm segments), or even
- [333]-noshm to use no shm segments.
+ [338]-noshm to use no shm segments.
- Q-65: Can x11vnc show only a portion of the display? (E.g. for a
+ Q-66: 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
+ As of Mar/2005 in the libvncserver CVS x11vnc has the "[339]-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
+ the [340]-id or [341]-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)
+ Q-67: 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 [337]-xrandr option to make x11vnc monitor XRANDR
+ enable it with the [342]-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
@@ -3094,7 +3197,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
- [338]-padgeom option to make the region big enough to hold all resizes
+ [343]-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
@@ -3102,15 +3205,15 @@ ied)
specify "-xrandr exit" then all will be disconnected and x11vnc will
terminate.
- Q-67: Why is the view in my VNC viewer completely black? Or why is
+ Q-68: 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-68: I use Linux Virtual Consoles (VC's) to implement 'Fast User
+ Q-69: 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
+ keystrokes to switch between their sessions). How come the view in a
VNC viewer connecting to x11vnc is either completely black or
otherwise all messed up unless the X session x11vnc is attached to is
in the active VC?
@@ -3131,10 +3234,53 @@ ied)
If no one is sitting at the workstation and you just want to remotely
switch the VC over to the one associated with your X session (so
- x11vnc can poll it correctly), one can use the switchto(1) command,
- e.g. "switchto 7" for VC #7.
-
- Q-69: I am using x11vnc where my local machine has "popup/hidden
+ x11vnc can poll it correctly), one can use the chvt(1) command, e.g.
+ "chvt 7" for VC #7.
+
+ Q-70: Can I use x11vnc to view my VMWare session remotely?
+
+ Yes, since VMWare is an X application you can view it via x11vnc in
+ the normal way.
+
+ Note that VMWare has several viewing modes:
+ * Normal X application window (with window manager frame)
+ * Quick-Switch mode (with no window manager frame)
+ * Fullscreen mode
+
+ The way VMWare does Fullscreen mode on Linux is to display the Guest
+ desktop in a separate Virtual Console (e.g. VC 8) (see [344]this FAQ
+ on VC's for background). Unfortunately, this Fullscreen VC is not an X
+ server. So x11vnc cannot access it. x11vnc works fine with "Normal X
+ application window" and "Quick-Switch mode" because these use X.
+
+ One user reports he left his machine with VMWare in the Fullscreen
+ mode, and even though his X session wasn't in the active VC, he could
+ still connect x11vnc to the X session and pass the keystrokes Ctrl-Alt
+ (typing "blind") to the VMWare X app. This induced VMWare to switch
+ out of Fullscreen into Normal X mode and he could continue working in
+ the Guest desktop remotely.
+
+ Sometimes it is convenient (for performance, etc.) to start VMWare in
+ its own X session using startx(1). This can be used to have a minimal
+ window manger (e.g. twm or even no window manager), to improve
+ response. One can also cut the display depth (e.g. to 16bpp) in this
+ 2nd X session to improve video performance. This 2nd X session
+ emulates Fullscreen mode to some degree and can be viewed via x11vnc
+ as long as the VMWare X session [345]is in the active VC.
+
+ Also note that with a little bit of playing with "xwininfo -all
+ -children" output one can extract the (non-toplevel) windowid of the
+ of the Guest desktop only when VMWare is running as a normal X
+ application. Then one can export just the guest desktop (i.e. without
+ the VMWare menu buttons) by use of the [346]-id windowid option. The
+ caveats are the X session VMWare is in must be in the active VC and
+ the window must be fully visible, so this mode is not terribly
+ convenient, but could be useful in some circumstances (e.g. running
+ VMWare on a very powerful server machine in a server room that happens
+ to have a video card, (but need not have a monitor, Keyboard or
+ mouse)).
+
+ Q-71: 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
@@ -3148,21 +3294,21 @@ ied)
[Misc: Clipboard, Beeps, Thanks, etc.]
- Q-70: Does the Clipboard/Selection get transferred between the
+ Q-72: 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 [339]-nosel option. If you
+ the Clipboard/Selection exchanged use the [347]-nosel option. If you
don't want the PRIMARY selection to be polled for changes use the
- [340]-noprimary option.
+ [348]-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-71: Why don't I hear the "Beeps" in my X session (e.g. when typing
+ Q-73: 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
@@ -3170,18 +3316,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 [341]-nobell option. If
+ If you don't want to hear the beeps use the [349]-nobell option. If
you want to hear the audio from the remote applications, consider
trying a redirector such as esd.
- Q-72: Thanks for your program and for your help! Can I make a
+ Q-74: 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
- [342]email!
+ [350]email!
[PayPal]
@@ -3289,246 +3435,254 @@ References
100. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
101. http://www.karlrunge.com/x11vnc/index.html#faq-java-http
102. http://www.karlrunge.com/x11vnc/index.html#faq-reverse-connect
- 103. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
- 104. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource
- 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-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/x11vnc_opts.html#opt-users
+ 103. http://www.karlrunge.com/x11vnc/index.html#faq-xvfb
+ 104. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
+ 105. http://www.karlrunge.com/x11vnc/index.html#faq-less-resource
+ 106. http://www.karlrunge.com/x11vnc/index.html#faq-more-resource
+ 107. http://www.karlrunge.com/x11vnc/index.html#faq-slow-link
+ 108. http://www.karlrunge.com/x11vnc/index.html#faq-pointer-mode
+ 109. http://www.karlrunge.com/x11vnc/index.html#faq-xdamage
+ 110. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-shape
+ 111. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha
+ 112. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
+ 113. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-arrow
+ 114. http://www.karlrunge.com/x11vnc/index.html#faq-cursor-positions
+ 115. http://www.karlrunge.com/x11vnc/index.html#faq-buttonmap-opt
+ 116. http://www.karlrunge.com/x11vnc/index.html#faq-altgr
+ 117. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
+ 118. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 119. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys
+ 120. http://www.karlrunge.com/x11vnc/index.html#faq-repeated-keys-still
+ 121. http://www.karlrunge.com/x11vnc/index.html#faq-remap-opt
+ 122. http://www.karlrunge.com/x11vnc/index.html#faq-sun-alt-meta
+ 123. http://www.karlrunge.com/x11vnc/index.html#faq-remap-button-click
+ 124. http://www.karlrunge.com/x11vnc/index.html#faq-scrollbars
+ 125. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
+ 126. http://www.karlrunge.com/x11vnc/index.html#faq-xinerama
+ 127. http://www.karlrunge.com/x11vnc/index.html#faq-multi-screen
+ 128. http://www.karlrunge.com/x11vnc/index.html#faq-clip-screen
+ 129. http://www.karlrunge.com/x11vnc/index.html#faq-xrandr
+ 130. http://www.karlrunge.com/x11vnc/index.html#faq-black-screen
+ 131. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 132. http://www.karlrunge.com/x11vnc/index.html#faq-vmware
+ 133. http://www.karlrunge.com/x11vnc/index.html#faq-hidden-taskbars
+ 134. http://www.karlrunge.com/x11vnc/index.html#faq-clipboard
+ 135. http://www.karlrunge.com/x11vnc/index.html#faq-beeps
+ 136. http://www.karlrunge.com/x11vnc/index.html#faq-thanks
+ 137. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
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/x11vnc_opts.html#opt-id
+ 139. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 140. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 141. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
+ 142. http://www.karlrunge.com/x11vnc/x11vnc_sunos4.html
+ 143. http://www.karlrunge.com/x11vnc/index.html#building
+ 144. http://www.karlrunge.com/x11vnc/index.html#faq-build
+ 145. http://packages.debian.org/x11vnc
+ 146. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc
+ 147. http://dag.wieers.com/packages/x11vnc/
+ 148. http://www.sunfreeware.com/
+ 149. http://www.bell-labs.com/project/wwexptools/packages.html
+ 150. http://www.karlrunge.com/x11vnc/index.html#solarisbuilding
+ 151. http://www.karlrunge.com/x11vnc/bins
+ 152. http://www.tightvnc.com/download.html
+ 153. http://www.realvnc.com/download-free.html
+ 154. http://sourceforge.net/projects/cotvnc/
+ 155. http://www.karlrunge.com/x11vnc/x11vnc_opts.html
+ 156. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
+ 158. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
+ 159. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
+ 160. http://www.karlrunge.com/x11vnc/x11vnc.c
+ 161. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sigpipe
+ 162. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nofb
+ 163. http://fredrik.hubbe.net/x2vnc.html
+ 164. http://www.hubbe.net/~hubbe/win2vnc.html
+ 165. http://www.deboer.gmxhome.de/
+ 166. http://sourceforge.net/projects/win2vnc/
+ 167. http://fredrik.hubbe.net/x2vnc.html
+ 168. http://freshmeat.net/projects/x2x/
+ 169. http://ftp.digital.com/pub/Digital/SRC/x2x/
+ 170. http://zapek.com/software/zvnc/
+ 171. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-visual
+ 172. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flashcmap
+ 173. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-notruecolor
+ 174. http://www.karlrunge.com/x11vnc/index.html#faq-8bpp
+ 175. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
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
+ 177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 179. http://www.karlrunge.com/x11vnc/index.html#faq-overlays
+ 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sid
+ 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display
+ 183. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 184. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-flipbyteorder
+ 185. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 186. http://www.karlrunge.com/x11vnc/index.html#xauth_pain
+ 187. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 191. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-bg
+ 192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_mods
+ 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_keys
+ 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
+ 195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-query
+ 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
+ 197. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-storepasswd
+ 198. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 199. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewpasswd
+ 201. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwd
+ 202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-input
+ 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forever
+ 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-shared
+ 207. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 208. http://www.karlrunge.com/x11vnc/index.html#faq-passwd
+ 209. http://www.karlrunge.com/x11vnc/index.html#faq-passwdfile
+ 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 212. http://www.karlrunge.com/x11vnc/index.html#faq-tcp_wrappers
+ 213. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 214. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
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-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-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/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-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
+ 217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listen
+ 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allow
+ 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 222. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 223. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 224. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbauth
+ 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
+ 227. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-viewonly
+ 231. ftp://ftp.x.org/
+ 232. http://www.karlrunge.com/x11vnc/dtVncPopup
+ 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
+ 235. http://www.karlrunge.com/x11vnc/index.html#tunnelling
+ 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
+ 238. http://www.karlrunge.com/x11vnc/blockdpy.c
+ 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-accept
+ 240. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gone
+ 242. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
+ 243. http://www.karlrunge.com/x11vnc/index.html#faq-inetd
+ 244. http://www.karlrunge.com/x11vnc/index.html#x11vnc_loop
+ 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 246. http://www.karlrunge.com/x11vnc/index.html#dtlogin_solaris
+ 247. http://www.jirka.org/gdm-documentation/x241.html
+ 248. http://www.karlrunge.com/x11vnc/x11vnc_loop
+ 249. http://www.karlrunge.com/x11vnc/index.html#faq-xterminal-xauth
+ 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-inetd
+ 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-q
+ 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
+ 253. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpdir
+ 254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
+ 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vncconnect
+ 256. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 257. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
+ 258. http://www.karlrunge.com/x11vnc/shm_clear
+ 259. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 261. http://www.karlrunge.com/x11vnc/index.html#faq-noshm
+ 262. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nap
+ 263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 267. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
+ 270. http://www.tightvnc.com/
+ 271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-progressive
+ 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-fs
+ 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
+ 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
+ 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodragging
+ 282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-pointer_mode
+ 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
+ 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_area
+ 285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xd_mem
+ 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage
+ 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
+ 289. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
+ 290. http://www.karlrunge.com/x11vnc/index.html#the-overlay-mode
+ 291. http://www.karlrunge.com/x11vnc/index.html#solaris10-build
+ 292. http://www.karlrunge.com/x11vnc/index.html#faq-xfixes-alpha-hacks
+ 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphacut
+ 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alphafrac
+ 295. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-alpharemove
+ 296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
+ 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noalphablend
+ 298. http://www.tightvnc.com/
+ 299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursor
+ 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursorpos
+ 301. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorpos
+ 302. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nocursorshape
+ 303. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 304. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_pointer
+ 305. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-buttonmap
+ 306. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 307. http://www.karlrunge.com/x11vnc/index.html#faq-greaterless
+ 308. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 309. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 310. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 311. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 312. http://www.karlrunge.com/x11vnc/index.html#faq-xkbmodtweak
+ 313. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-debug_keyboard
+ 314. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-modtweak
+ 315. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
+ 316. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-skip_keycodes
+ 317. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 318. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 319. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 320. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-add_keysyms
+ 321. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 322. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-norepeat
+ 323. http://www.karlrunge.com/x11vnc/index.html#faq-display-manager
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
+ 325. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 326. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 327. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remap
+ 328. http://www.karlrunge.com/x11vnc/index.html#faq-scaling
+ 329. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
+ 330. http://www.cus.cam.ac.uk/~ssb22/source/vnc-magnification.html
+ 331. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
+ 332. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale_cursor
+ 333. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-blackout
+ 334. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xinerama
+ 335. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
+ 336. http://www.karlrunge.com/x11vnc/index.html#faq-solshm
+ 337. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-onetile
+ 338. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noshm
+ 339. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip
+ 340. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 341. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 342. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xrandr
+ 343. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-padgeom
+ 344. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 345. http://www.karlrunge.com/x11vnc/index.html#faq-linuxvc
+ 346. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
+ 347. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nosel
+ 348. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noprimary
+ 349. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nobell
+ 350. mailto:xvml@karlrunge.com
=======================================================================
@@ -3542,7 +3696,7 @@ x11vnc: a VNC server for real X displays
% x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.7.2pre lastmod: 2005-03-1
-2
+9
x11vnc options:
-display disp -auth file
@@ -3550,32 +3704,33 @@ x11vnc options:
-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
+ -scale fraction -scale_cursor frac
+ -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
+ -arrow n -noxfixes
-alphacut n -alphafrac fraction
-alpharemove -noalphablend
-nocursorshape -cursorpos
@@ -3622,7 +3777,7 @@ libvncserver options:
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.7.2pre lastmod: 2005-03-1
-2
+9
Typical usage is:
@@ -3693,6 +3848,7 @@ Options:
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)
@@ -3704,7 +3860,7 @@ Options:
and for some workarounds. n may be a decimal number,
or 0x hex. Run xdpyinfo(1) for the values. One may
also use "TrueColor", etc. see <X11/X.h> for a list.
- If the string ends in ":m" the for better or for
+ If the string ends in ":m" then for better or for
worse the visual depth is forced to be m.
-overlay Handle multiple depth visuals on one screen, e.g. 8+24
and 24+8 overlay visuals (the 32 bits per pixel are
@@ -3738,9 +3894,8 @@ Options:
cursor shape using the overlay mechanism.
-scale fraction Scale the framebuffer by factor "fraction". Values
- less than 1 shrink the fb, larger ones expand it.
- Note: image may not be sharp and response may be
- slower. Currently the cursor shape is not scaled.
+ less than 1 shrink the fb, larger ones expand it. Note:
+ image may not be sharp and response may be slower.
If "fraction" contains a decimal point "." it
is taken as a floating point number, alternatively
the notation "m/n" may be used to denote fractions
@@ -3757,6 +3912,14 @@ Options:
pad scaled width and height to be multiples of scaling
denominator (e.g. 3 for 2/3).
+-scale_cursor frac By default if -scale is supplied the cursor shape is
+ scaled by the same factor. Depending on your usage,
+ you may want to scale the cursor independently of the
+ screen or not at all. If you specify -scale_cursor
+ the cursor will be scaled by that factor. When using
+ -scale mode to keep the cursor at its "natural"
+ size use "-scale_cursor 1".
+
-viewonly All VNC clients can only watch (default off).
-shared VNC display is shared (default off).
-once Exit after the first successfully connected viewer
@@ -4112,6 +4275,11 @@ Options:
so this is no loss unless someone is simultaneously at
the real X display. Default: -norepeat
+ Use "-norepeat N" to set how many times norepeat will
+ be reset if something else (e.g. X session manager)
+ disables it. The default is 2. Use a negative value
+ for unlimited resets.
+
-nofb Ignore video framebuffer: only process keyboard and
pointer. Intended for use with Win2VNC and x2vnc
dual-monitor setups.
@@ -4192,6 +4360,9 @@ Options:
extensions available. On Solaris and IRIX if XFIXES
is not available, -overlay mode will be attempted.
+-arrow n Choose an alternate "arrow" cursor from a set of
+ some common ones. n can be 1 to 6. Default is: 1
+
-noxfixes Do not use the XFIXES extension to draw the exact cursor
shape even if it is available.
-alphacut n When using the XFIXES extension for the cursor shape,
@@ -4509,6 +4680,8 @@ Options:
id:windowid set -id window to "windowid". empty
or "root" to go back to root window
sid:windowid set -sid window to "windowid"
+ waitmapped wait until subwin is mapped.
+ nowaitmapped do not wait until subwin is mapped.
clip:WxH+X+Y set -clip mode to "WxH+X+Y"
flashcmap enable -flashcmap mode.
noflashcmap disable -flashcmap mode.
@@ -4521,6 +4694,7 @@ Options:
nooverlay_cursor.
visual:vis set -visual to "vis"
scale:frac set -scale to "frac"
+ scale_cursor:f set -scale_cursor to "f"
viewonly enable -viewonly mode.
noviewonly disable -viewonly mode.
shared enable -shared mode.
@@ -4714,27 +4888,27 @@ Options:
the returned value corresponds to (hint: the ext_*
variables correspond to the presence of X extensions):
- ans= stop quit exit shutdown ping blacken zero
- refresh reset close disconnect id sid clip waitmapped
- nowaitmapped flashcmap noflashcmap truecolor notruecolor
+ ans= stop quit exit shutdown ping blacken zero refresh
+ reset close disconnect id sid waitmapped nowaitmapped
+ clip flashcmap noflashcmap truecolor notruecolor
overlay nooverlay overlay_cursor overlay_yescursor
nooverlay_nocursor nooverlay_cursor nooverlay_yescursor
- overlay_nocursor visual scale viewonly noviewonly
- shared noshared forever noforever once timeout deny
- lock nodeny unlock connect allowonce allow localhost
- nolocalhost listen accept gone shm noshm flipbyteorder
- noflipbyteorder onetile noonetile solid_color solid
- nosolid blackout xinerama noxinerama xrandr noxrandr
- xrandr_mode padgeom quiet q noquiet modtweak nomodtweak
- xkb noxkb skip_keycodes add_keysyms noadd_keysyms
- clear_mods noclear_mods clear_keys noclear_keys
- remap repeat norepeat fb nofb bell nobell sel
- nosel primary noprimary cursorshape nocursorshape
- cursorpos nocursorpos cursor show_cursor noshow_cursor
- nocursor xfixes noxfixes xdamage noxdamage xd_area
- xd_mem alphacut alphafrac alpharemove noalpharemove
- alphablend noalphablend xwarp xwarppointer noxwarp
- noxwarppointer buttonmap dragging nodragging
+ overlay_nocursor visual scale scale_cursor viewonly
+ noviewonly shared noshared forever noforever once
+ timeout deny lock nodeny unlock connect allowonce
+ allow localhost nolocalhost listen accept gone
+ shm noshm flipbyteorder noflipbyteorder onetile
+ noonetile solid_color solid nosolid blackout xinerama
+ noxinerama xrandr noxrandr xrandr_mode padgeom quiet
+ q noquiet modtweak nomodtweak xkb noxkb skip_keycodes
+ add_keysyms noadd_keysyms clear_mods noclear_mods
+ clear_keys noclear_keys remap repeat norepeat fb nofb
+ bell nobell sel nosel primary noprimary cursorshape
+ nocursorshape cursorpos nocursorpos cursor show_cursor
+ noshow_cursor nocursor arrow xfixes noxfixes xdamage
+ noxdamage xd_area xd_mem alphacut alphafrac alpharemove
+ noalpharemove alphablend noalphablend 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
diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc
index 963eecd..f967047 100755
--- a/x11vnc/tkx11vnc
+++ b/x11vnc/tkx11vnc
@@ -107,6 +107,7 @@ Screen
id:
sid:
=D scale:
+ scale_cursor:
--
overlay
overlay_nocursor
@@ -140,6 +141,7 @@ Keyboard
Pointer
=D-C:none,arrow,X,some,most cursor:
+ =-C:1,2,3,4,5,6 arrow:
--
cursorpos
=D nocursorshape
@@ -239,9 +241,8 @@ Tuning
snapfb
--
xdamage
- xd_mem:
xd_area:
- xd_width:
+ xd_mem:
--
threads
--
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 1fcfbd0..2c62170 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -113,6 +113,7 @@
" id:\n"
" sid:\n"
" =D scale:\n"
+" scale_cursor:\n"
" --\n"
" overlay\n"
" overlay_nocursor\n"
@@ -146,6 +147,7 @@
"\n"
"Pointer\n"
" =D-C:none,arrow,X,some,most cursor:\n"
+" =-C:1,2,3,4,5,6 arrow:\n"
" --\n"
" cursorpos\n"
" =D nocursorshape\n"
@@ -245,9 +247,8 @@
" snapfb\n"
" --\n"
" xdamage\n"
-" xd_mem:\n"
" xd_area:\n"
-" xd_width:\n"
+" xd_mem:\n"
" --\n"
" threads\n"
" --\n"
diff --git a/x11vnc/x11vnc.1 b/x11vnc/x11vnc.1
index 7eeabe6..e1141e8 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-12
+ version: 0.7.2pre, lastmod: 2005-03-19
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@@ -119,7 +119,7 @@ or 0x hex. Run
.IR xdpyinfo (1)
for the values. One may
also use "TrueColor", etc. see <X11/X.h> for a list.
-If the string ends in ":m" the for better or for
+If the string ends in ":m" then for better or for
worse the visual depth is forced to be m.
.PP
\fB-overlay\fR
@@ -163,9 +163,8 @@ cursor shape using the overlay mechanism.
\fB-scale\fR \fIfraction\fR
.IP
Scale the framebuffer by factor \fIfraction\fR. Values
-less than 1 shrink the fb, larger ones expand it.
-Note: image may not be sharp and response may be
-slower. Currently the cursor shape is not scaled.
+less than 1 shrink the fb, larger ones expand it. Note:
+image may not be sharp and response may be slower.
If \fIfraction\fR contains a decimal point "." it
is taken as a floating point number, alternatively
the notation "m/n" may be used to denote fractions
@@ -182,6 +181,17 @@ interpolation scheme even when shrinking, ":pad",
pad scaled width and height to be multiples of scaling
denominator (e.g. 3 for 2/3).
.PP
+\fB-scale_cursor\fR \fIfrac\fR
+.IP
+By default if \fB-scale\fR is supplied the cursor shape is
+scaled by the same factor. Depending on your usage,
+you may want to scale the cursor independently of the
+screen or not at all. If you specify \fB-scale_cursor\fR
+the cursor will be scaled by that factor. When using
+\fB-scale\fR mode to keep the cursor at its "natural" size
+use "\fB-scale_cursor\fR \fI1\fR". Most of the ":" scaling
+options apply here as well.
+.PP
\fB-viewonly\fR
.IP
All VNC clients can only watch (default off).
@@ -686,6 +696,11 @@ either from large screen changes or high latency).
Note: your VNC viewer side will likely do autorepeating,
so this is no loss unless someone is simultaneously at
the real X display. Default: \fB-norepeat\fR
+.IP
+Use "\fB-norepeat\fR \fIN\fR" to set how many times norepeat will
+be reset if something else (e.g. X session manager)
+disables it. The default is 2. Use a negative value
+for unlimited resets.
.PP
\fB-nofb\fR
.IP
@@ -780,6 +795,11 @@ unless the display has overlay visuals or XFIXES
extensions available. On Solaris and IRIX if XFIXES
is not available, \fB-overlay\fR mode will be attempted.
.PP
+\fB-arrow\fR \fIn\fR
+.IP
+Choose an alternate "arrow" cursor from a set of
+some common ones. n can be 1 to 6. Default is: 1
+.PP
\fB-noxfixes\fR
.IP
Do not use the XFIXES extension to draw the exact cursor
@@ -1195,6 +1215,10 @@ id:windowid set \fB-id\fR window to "windowid". empty
.IP
sid:windowid set \fB-sid\fR window to "windowid"
.IP
+waitmapped wait until subwin is mapped.
+.IP
+nowaitmapped do not wait until subwin is mapped.
+.IP
clip:WxH+X+Y set \fB-clip\fR mode to "WxH+X+Y"
.IP
flashcmap enable \fB-flashcmap\fR mode.
@@ -1218,6 +1242,8 @@ visual:vis set \fB-visual\fR to "vis"
.IP
scale:frac set \fB-scale\fR to "frac"
.IP
+scale_cursor:f set \fB-scale_cursor\fR to "f"
+.IP
viewonly enable \fB-viewonly\fR mode.
.IP
noviewonly disable \fB-viewonly\fR mode.
@@ -1375,6 +1401,8 @@ show_cursor enable showing a cursor.
noshow_cursor disable showing a cursor. (same as
"nocursor")
.IP
+arrow:n set \fB-arrow\fR to alternate n.
+.IP
xfixes enable xfixes cursor shape mode.
.IP
noxfixes disable xfixes cursor shape mode.
@@ -1546,27 +1574,27 @@ remote command, we hope the name makes it obvious what
the returned value corresponds to (hint: the ext_*
variables correspond to the presence of X extensions):
.IP
-ans= stop quit exit shutdown ping blacken zero
-refresh reset close disconnect id sid clip waitmapped
-nowaitmapped flashcmap noflashcmap truecolor notruecolor
+ans= stop quit exit shutdown ping blacken zero refresh
+reset close disconnect id sid waitmapped nowaitmapped
+clip flashcmap noflashcmap truecolor notruecolor
overlay nooverlay overlay_cursor overlay_yescursor
nooverlay_nocursor nooverlay_cursor nooverlay_yescursor
-overlay_nocursor visual scale viewonly noviewonly
-shared noshared forever noforever once timeout deny
-lock nodeny unlock connect allowonce allow localhost
-nolocalhost listen accept gone shm noshm flipbyteorder
-noflipbyteorder onetile noonetile solid_color solid
-nosolid blackout xinerama noxinerama xrandr noxrandr
-xrandr_mode padgeom quiet q noquiet modtweak nomodtweak
-xkb noxkb skip_keycodes add_keysyms noadd_keysyms
-clear_mods noclear_mods clear_keys noclear_keys
-remap repeat norepeat fb nofb bell nobell sel
-nosel primary noprimary cursorshape nocursorshape
-cursorpos nocursorpos cursor show_cursor noshow_cursor
-nocursor xfixes noxfixes xdamage noxdamage xd_area
-xd_mem alphacut alphafrac alpharemove noalpharemove
-alphablend noalphablend xwarp xwarppointer noxwarp
-noxwarppointer buttonmap dragging nodragging
+overlay_nocursor visual scale scale_cursor viewonly
+noviewonly shared noshared forever noforever once
+timeout deny lock nodeny unlock connect allowonce
+allow localhost nolocalhost listen accept gone
+shm noshm flipbyteorder noflipbyteorder onetile
+noonetile solid_color solid nosolid blackout xinerama
+noxinerama xrandr noxrandr xrandr_mode padgeom quiet
+q noquiet modtweak nomodtweak xkb noxkb skip_keycodes
+add_keysyms noadd_keysyms clear_mods noclear_mods
+clear_keys noclear_keys remap repeat norepeat fb nofb
+bell nobell sel nosel primary noprimary cursorshape
+nocursorshape cursorpos nocursorpos cursor show_cursor
+noshow_cursor nocursor arrow xfixes noxfixes xdamage
+noxdamage xd_area xd_mem alphacut alphafrac alpharemove
+noalpharemove alphablend noalphablend 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
diff --git a/x11vnc/x11vnc.c b/x11vnc/x11vnc.c
index d64a318..cb38347 100644
--- a/x11vnc/x11vnc.c
+++ b/x11vnc/x11vnc.c
@@ -314,7 +314,6 @@ int overlay_present = 0;
static int xrandr_base_event_type;
#endif
-#define CURSOR_TRANSPARENCY 1
int xfixes_present = 0;
int use_xfixes = 1;
int got_xfixes_cursor_notify = 0;
@@ -323,6 +322,8 @@ double alpha_frac = 0.33;
int alpha_remove = 0;
int alpha_blend = 1;
+int alt_arrow = 1;
+
#if LIBVNCSERVER_HAVE_LIBXFIXES
#include <X11/extensions/Xfixes.h>
static int xfixes_base_event_type;
@@ -343,7 +344,7 @@ int xdamage_tile_count;
int hack_val = 0;
/* date +'lastmod: %Y-%m-%d' */
-char lastmod[] = "0.7.2pre lastmod: 2005-03-12";
+char lastmod[] = "0.7.2pre lastmod: 2005-03-19";
/* X display info */
@@ -436,6 +437,15 @@ int scaling_interpolate = 0; /* use interpolation scheme when shrinking */
int scaled_x = 0, scaled_y = 0; /* dimensions of scaled display */
int scale_numer = 0, scale_denom = 0; /* n/m */
+/* scale cursor */
+char *scale_cursor_str = NULL;
+double scale_cursor_fac = 1.0;
+int scaling_cursor = 0;
+int scaling_cursor_noblend = 0;
+int scaling_cursor_interpolate = 0;
+int scale_cursor_numer = 0, scale_cursor_denom = 0;
+
+
/* size of the basic tile unit that is polled for changes: */
int tile_x = 32;
int tile_y = 32;
@@ -492,6 +502,7 @@ int scanlines[NSCAN] = {
int all_clients_initialized(void);
void close_all_clients(void);
void close_clients(char *);
+int get_autorepeat_state(void);
void autorepeat(int restore);
char *bitprint(unsigned int, int);
void blackout_tiles(void);
@@ -576,6 +587,7 @@ void set_cursor(int, int, int);
void setup_cursors(void);
void setup_cursors_and_push(void);
void first_cursor(void);
+rfbCursorPtr pixels2curs(unsigned long *, int, int, int, int, int);
void set_no_cursor(void);
void set_cursor_was_changed(rfbScreenInfoPtr);
void set_cursor_was_moved(rfbScreenInfoPtr);
@@ -611,6 +623,13 @@ char *get_local_host(int sock);
void xcut_receive(char *text, int len, rfbClientPtr client);
+void parse_scale_string(char *, double *, int *, int *,
+ int *, int *, int *, int *, int *);
+void scale_rect(double, int, int, int,
+ char *, int, char *, int,
+ int, int, int, int, int, int, int, int, int);
+int scale_round(int, double);
+
void zero_fb(int, int, int, int);
void push_black_screen(int);
void push_sleep(int);
@@ -698,6 +717,7 @@ int cursor_shape_updates = 1; /* cursor shape updates -nocursorshape */
int use_xwarppointer = 0; /* use XWarpPointer instead of XTestFake... */
int show_dragging = 1; /* process mouse movement events */
int no_autorepeat = 1; /* turn off autorepeat with clients */
+int no_repeat_countdown = 2;
int watch_bell = 1; /* watch for the bell using XKEYBOARD */
int sound_bell = 1; /* actually send it */
int xkbcompat = 0; /* ignore XKEYBOARD extension */
@@ -2889,6 +2909,7 @@ static int run_user_command(char *cmd, rfbClientPtr client, char *mode) {
rfbLog("running command:\n");
rfbLog(" %s\n", cmd);
+ /* XXX need to close port 5900, etc.. */
rc = system(cmd);
if (rc >= 256) {
@@ -4152,8 +4173,16 @@ void clear_keys(void) {
* keystroke autorepeating as well, it kind of makes sense to shut it
* off if no one is at the physical display...
*/
-void autorepeat(int restore) {
+int get_autorepeat_state(void) {
XKeyboardState kstate;
+ X_LOCK;
+ XGetKeyboardControl(dpy, &kstate);
+ X_UNLOCK;
+ return kstate.global_auto_repeat;
+}
+
+void autorepeat(int restore) {
+ int global_auto_repeat;
XKeyboardControl kctrl;
static int save_auto_repeat = -1;
@@ -4161,10 +4190,10 @@ void autorepeat(int restore) {
if (save_auto_repeat < 0) {
return; /* nothing to restore */
}
+ global_auto_repeat = get_autorepeat_state();
X_LOCK;
/* read state and skip restore if equal (e.g. no clients) */
- XGetKeyboardControl(dpy, &kstate);
- if (kstate.global_auto_repeat == save_auto_repeat) {
+ if (global_auto_repeat == save_auto_repeat) {
X_UNLOCK;
return;
}
@@ -4177,17 +4206,21 @@ void autorepeat(int restore) {
rfbLog("Restored X server key autorepeat to: %d\n",
save_auto_repeat);
} else {
- X_LOCK;
- XGetKeyboardControl(dpy, &kstate);
- save_auto_repeat = kstate.global_auto_repeat;
+ global_auto_repeat = get_autorepeat_state();
+ save_auto_repeat = global_auto_repeat;
+ X_LOCK;
kctrl.auto_repeat_mode = AutoRepeatModeOff;
XChangeKeyboardControl(dpy, KBAutoRepeatMode, &kctrl);
XFlush(dpy);
X_UNLOCK;
- rfbLog("Disabled X server key autorepeat. (you can run the\n");
- rfbLog("command: 'xset r on' to force it back on)\n");
+ rfbLog("Disabled X server key autorepeat.\n");
+ if (no_repeat_countdown >= 0) {
+ rfbLog(" you can run the command: 'xset r on' (%d "
+ "times)\n", no_repeat_countdown+1);
+ rfbLog(" to force it back on.\n");
+ }
}
}
@@ -6884,6 +6917,30 @@ void check_xevents(void) {
}
}
+ if (no_autorepeat && client_count && no_repeat_countdown) {
+ static time_t last_check = 0;
+ if (now > last_check + 1) {
+ last_check = now;
+ X_UNLOCK;
+ if (get_autorepeat_state() != 0) {
+ int n = no_repeat_countdown - 1;
+ if (n >= 0) {
+ rfbLog("Battling with something for "
+ "-norepeat!! (%d resets left)\n",n);
+ } else {
+ rfbLog("Battling with something for "
+ "-norepeat!!\n");
+ }
+ if (no_repeat_countdown > 0) {
+ no_repeat_countdown--;
+ }
+ autorepeat(1);
+ autorepeat(0);
+ }
+ X_LOCK;
+ }
+ }
+
if (XCheckTypedEvent(dpy, MappingNotify, &xev)) {
XRefreshKeyboardMapping((XMappingEvent *) &xev);
if (use_modifier_tweak) {
@@ -7658,20 +7715,6 @@ 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,
@@ -7687,6 +7730,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
subwin_wait_mapped = 0;
+ } 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 (!strcmp(p, "flashcmap")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, flash_cmap);
@@ -7831,6 +7888,23 @@ char *process_remote_cmd(char *cmd, int stringonly) {
check_black_fb();
do_new_fb(0);
+ } else if (!strcmp(p, "scale_cursor") ||
+ strstr(p, "scale_cursor:") == p) { /* skip-cmd-list */
+ COLON_CHECK("scale_cursor:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%s", p, co,
+ NONUL(scale_cursor_str));
+ goto qry;
+ }
+ p += strlen("scale_cursor:");
+ if (scale_cursor_str) free(scale_cursor_str);
+ if (*p == '\0') {
+ scale_cursor_str = NULL;
+ } else {
+ scale_cursor_str = strdup(p);
+ }
+ setup_cursors_and_push();
+
} else if (!strcmp(p, "viewonly")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, view_only);
@@ -8657,6 +8731,9 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
rfbLog("process_remote_cmd: enabling -norepeat mode.\n");
no_autorepeat = 1;
+ if (no_repeat_countdown >= 0) {
+ no_repeat_countdown = 2;
+ }
if (client_count) {
autorepeat(0); /* disable if any clients */
}
@@ -8843,6 +8920,18 @@ char *process_remote_cmd(char *cmd, int stringonly) {
initialize_cursors_mode();
first_cursor();
+ } else if (strstr(p, "arrow") == p) {
+ COLON_CHECK("arrow:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%d", p, co, alt_arrow);
+ goto qry;
+ }
+ p += strlen("arrow:");
+ alt_arrow = atoi(p);
+ rfbLog("process_remote_cmd: setting alt_arrow: %d.\n",
+ alt_arrow);
+ setup_cursors_and_push();
+
} else if (!strcmp(p, "xfixes")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, use_xfixes);
@@ -9547,7 +9636,11 @@ char *process_remote_cmd(char *cmd, int stringonly) {
accept_remote_cmds = 0; /* cannot be turned back on. */
} else if (strstr(p, "hack:") == p) { /* skip-cmd-list */
- NOTAPP
+ COLON_CHECK("hack:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s%s%d", p, co, hack_val);
+ goto qry;
+ }
p += strlen("hack:");
hack_val = atoi(p);
rfbLog("set hack_val to: %d\n", hack_val);
@@ -9921,24 +10014,23 @@ void collect_xdamage(int scancnt) {
X_UNLOCK;
now = time(0);
-if (! last_rpt) {
- last_rpt = now;
-}
-if (now > last_rpt + 15) {
- double rat = -1.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 (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;
}
-
- 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
}
@@ -10072,6 +10164,25 @@ typedef struct cursor_info {
rfbCursorPtr rfb;
} cursor_info_t;
+void curs_copy(cursor_info_t *dest, cursor_info_t *src) {
+ if (src->data != NULL) {
+ dest->data = strdup(src->data);
+ } else {
+ dest->data = NULL;
+ }
+ if (src->mask != NULL) {
+ dest->mask = strdup(src->mask);
+ } else {
+ dest->mask = NULL;
+ }
+ dest->wx = src->wx;
+ dest->wy = src->wy;
+ dest->sx = src->sx;
+ dest->sy = src->sy;
+ dest->reverse = src->reverse;
+ dest->rfb = src->rfb;
+}
+
/* empty cursor */
static char* curs_empty_data =
" "
@@ -10092,6 +10203,7 @@ static char* curs_dot_mask =
" x";
static cursor_info_t cur_dot = {NULL, NULL, 2, 2, 0, 0, 0, NULL};
+
/* main cursor */
static char* curs_arrow_data =
" "
@@ -10132,8 +10244,198 @@ static char* curs_arrow_mask =
" xx "
" "
" ";
-static cursor_info_t cur_arrow = {NULL, NULL, 18, 18, 0, 0, 0, NULL};
+static cursor_info_t cur_arrow = {NULL, NULL, 18, 18, 0, 0, 1, NULL};
+
+static char* curs_arrow2_data =
+" "
+" x "
+" xx "
+" xxx "
+" xxxx "
+" xxxxx "
+" xxxxxx "
+" xxxxxxx "
+" xxxxxxxx "
+" xxxxx "
+" xx xx "
+" x xx "
+" xx "
+" xx "
+" xx "
+" "
+" "
+" ";
+
+static char* curs_arrow2_mask =
+"xx "
+"xxx "
+"xxxx "
+"xxxxx "
+"xxxxxx "
+"xxxxxxx "
+"xxxxxxxx "
+"xxxxxxxxx "
+"xxxxxxxxxx "
+"xxxxxxxxxx "
+"xxxxxxx "
+"xxx xxxx "
+"xx xxxx "
+" xxxx "
+" xxxx "
+" xx "
+" "
+" ";
+static cursor_info_t cur_arrow2 = {NULL, NULL, 18, 18, 0, 0, 0, NULL};
+
+static char* curs_arrow3_data =
+" "
+" xx "
+" xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxxxx "
+" xxxxx "
+" xxxxx "
+" xx x "
+" xx x "
+" x x "
+" x x "
+" x "
+" x "
+" ";
+
+static char* curs_arrow3_mask =
+"xxx "
+"xxxxx "
+"xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxxxx "
+" xxxxxxxxxxxx "
+" xxxxxxxxxxxx "
+" xxxxxxxxxxx "
+" xxxxxxx "
+" xxxxxxx "
+" xxxx xxx "
+" xxx xxx "
+" xxx xxx "
+" xxx xxx "
+" xxx"
+" xx";
+
+static cursor_info_t cur_arrow3 = {NULL, NULL, 16, 16, 0, 0, 1, NULL};
+
+static char* curs_arrow4_data =
+" "
+" xx "
+" xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxxxx "
+" xxxxx "
+" xxxxx "
+" xx x "
+" xx x "
+" x x "
+" x x "
+" x "
+" x "
+" ";
+static char* curs_arrow4_mask =
+"xxx "
+"xxxxx "
+"xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxxxx "
+" xxxxxxxxxxxx "
+" xxxxxxxxxxxx "
+" xxxxxxxxxxx "
+" xxxxxxx "
+" xxxxxxx "
+" xxxx xxx "
+" xxx xxx "
+" xxx xxx "
+" xxx xxx "
+" xxx"
+" xx";
+
+static cursor_info_t cur_arrow4 = {NULL, NULL, 16, 16, 0, 0, 0, NULL};
+
+static char* curs_arrow5_data =
+"x "
+" xx "
+" xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxx "
+" xx x "
+" x x "
+" x x "
+" x "
+" x "
+" x "
+" x "
+" x "
+" x";
+
+static char* curs_arrow5_mask =
+"xx "
+"xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxx "
+" xxxxx "
+" xxxxxx "
+" xx xxx "
+" x xxx "
+" xxx "
+" xxx "
+" xxx "
+" xxx"
+" xx";
+
+static cursor_info_t cur_arrow5 = {NULL, NULL, 15, 15, 0, 0, 1, NULL};
+
+static char* curs_arrow6_data =
+"x "
+" xx "
+" xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxx "
+" xx x "
+" x x "
+" x x "
+" x "
+" x "
+" x "
+" x "
+" x "
+" x";
+
+static char* curs_arrow6_mask =
+"xx "
+"xxxx "
+" xxxxx "
+" xxxxxxx "
+" xxxxxxxx "
+" xxxxxxxx "
+" xxxxx "
+" xxxxxx "
+" xx xxx "
+" x xxx "
+" xxx "
+" xxx "
+" xxx "
+" xxx"
+" xx";
+
+static cursor_info_t cur_arrow6 = {NULL, NULL, 15, 15, 0, 0, 0, NULL};
+
+int alt_arrow_max = 6;
/*
* It turns out we can at least detect mouse is on the root window so
* show it (under -cursor X) with this familiar cursor...
@@ -10338,7 +10640,8 @@ void first_cursor(void) {
void setup_cursors(void) {
rfbCursorPtr rfb_curs;
- int i, n = 0;
+ char *scale = NULL;
+ int i, j, n = 0;
static int first = 1;
rfbLog("setting up %d cursors...\n", CURS_MAX);
@@ -10380,6 +10683,7 @@ void setup_cursors(void) {
if (ci->mask) {
free(ci->mask);
}
+ free(ci);
}
/* create new struct: */
@@ -10407,6 +10711,16 @@ void setup_cursors(void) {
cur_arrow.data = curs_arrow_data;
cur_arrow.mask = curs_arrow_mask;
+ cur_arrow2.data = curs_arrow2_data;
+ cur_arrow2.mask = curs_arrow2_mask;
+ cur_arrow3.data = curs_arrow3_data;
+ cur_arrow3.mask = curs_arrow3_mask;
+ cur_arrow4.data = curs_arrow4_data;
+ cur_arrow4.mask = curs_arrow4_mask;
+ cur_arrow5.data = curs_arrow5_data;
+ cur_arrow5.mask = curs_arrow5_mask;
+ cur_arrow6.data = curs_arrow6_data;
+ cur_arrow6.mask = curs_arrow6_mask;
cur_root.data = curs_root_data;
cur_root.mask = curs_root_mask;
@@ -10420,74 +10734,155 @@ void setup_cursors(void) {
cur_xterm.data = curs_xterm_data;
cur_xterm.mask = curs_xterm_mask;
- cursors[CURS_EMPTY] = &cur_empty; n++;
- cursors[CURS_DOT] = &cur_dot; n++;
- cursors[CURS_ARROW] = &cur_arrow; n++;
- cursors[CURS_ROOT] = &cur_root; n++;
- cursors[CURS_WM] = &cur_fleur; n++;
- cursors[CURS_TERM] = &cur_xterm; n++;
- cursors[CURS_PLUS] = &cur_plus; n++;
+ curs_copy(cursors[CURS_EMPTY], &cur_empty); n++;
+ curs_copy(cursors[CURS_DOT], &cur_dot); n++;
+
+ if (alt_arrow < 1 || alt_arrow > alt_arrow_max) {
+ alt_arrow = 1;
+ }
+ if (alt_arrow == 1) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow); n++;
+ } else if (alt_arrow == 2) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow2); n++;
+ } else if (alt_arrow == 3) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow3); n++;
+ } else if (alt_arrow == 4) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow4); n++;
+ } else if (alt_arrow == 5) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow5); n++;
+ } else if (alt_arrow == 6) {
+ curs_copy(cursors[CURS_ARROW], &cur_arrow6); n++;
+ } else {
+ alt_arrow = 1;
+ curs_copy(cursors[CURS_ARROW], &cur_arrow); n++;
+ }
+
+ curs_copy(cursors[CURS_ROOT], &cur_root); n++;
+ curs_copy(cursors[CURS_WM], &cur_fleur); n++;
+ curs_copy(cursors[CURS_TERM], &cur_xterm); n++;
+ curs_copy(cursors[CURS_PLUS], &cur_plus); n++;
+
+ if (scale_cursor_str) {
+ scale = scale_cursor_str;
+ } else if (scaling && scale_str) {
+ scale = scale_str;
+ }
+ /* scale = NULL zeroes everything */
+ parse_scale_string(scale, &scale_cursor_fac, &scaling_cursor,
+ &scaling_cursor_noblend, &j, &j, &scaling_cursor_interpolate,
+ &scale_cursor_numer, &scale_cursor_denom);
for (i=0; i<n; i++) {
/* create rfbCursors for the special cursors: */
cursor_info_t *ci = cursors[i];
- ci->data = strdup(ci->data);
- ci->mask = strdup(ci->mask);
+ if (scaling_cursor && scale_cursor_fac != 1.0) {
+ int w, h, x, y, i;
+ unsigned long *pixels;
- rfb_curs = rfbMakeXCursor(ci->wx, ci->wy, ci->data, ci->mask);
+ w = ci->wx;
+ h = ci->wy;
- if (ci->reverse) {
- rfb_curs->foreRed = 0x0000;
- rfb_curs->foreGreen = 0x0000;
- rfb_curs->foreBlue = 0x0000;
- rfb_curs->backRed = 0xffff;
- rfb_curs->backGreen = 0xffff;
- rfb_curs->backBlue = 0xffff;
- }
- rfb_curs->xhot = ci->sx;
- rfb_curs->yhot = ci->sy;
- rfb_curs->cleanup = FALSE;
- rfb_curs->cleanupSource = FALSE;
- rfb_curs->cleanupMask = FALSE;
- rfb_curs->cleanupRichSource = FALSE;
+ pixels = (unsigned long *) malloc(4*w*h);
- if (bpp == 8 && indexed_color) {
- /*
- * use richsource in PseudoColor for better
- * looking cursors (i.e. two-color).
- */
- int x, y, k = 0, bw;
- char d, m;
- int black = BlackPixel(dpy, scr);
- int white = WhitePixel(dpy, scr);
-
- rfb_curs->richSource
- = (char *)calloc(ci->wx * ci->wy, 1);
-
- for (y = 0; y < ci->wy; y++) {
- for (x = 0; x < ci->wx; x++) {
- d = *(ci->data + k);
- m = *(ci->mask + k);
- if (d == ' ' && m == ' ') {
- k++;
- continue;
- } else if (m != ' ' && d == ' ') {
- bw = black;
- } else {
- bw = white;
+ i = 0;
+ for (y=0; y<h; y++) {
+ for (x=0; x<w; x++) {
+ char d = ci->data[i];
+ char m = ci->mask[i];
+ unsigned long *p;
+
+ p = pixels + i;
+
+ /* set alpha on */
+ *p = 0xff000000;
+
+ if (d == ' ' && m == ' ') {
+ /* alpha off */
+ *p = 0x00000000;
+ } else if (d != ' ') {
+ /* body */
+ if (ci->reverse) {
+ *p |= 0x00000000;
+ } else {
+ *p |= 0x00ffffff;
+ }
+ } else if (m != ' ') {
+ /* edge */
+ if (ci->reverse) {
+ *p |= 0x00ffffff;
+ } else {
+ *p |= 0x00000000;
+ }
+ }
+ i++;
}
- if (ci->reverse) {
- if (bw == black) {
- bw = white;
- } else {
+ }
+
+ rfb_curs = pixels2curs(pixels, w, h, ci->sx, ci->sy,
+ bpp/8);
+
+ free(pixels);
+
+ } else {
+
+ /* standard X cursor */
+ rfb_curs = rfbMakeXCursor(ci->wx, ci->wy,
+ ci->data, ci->mask);
+
+ if (ci->reverse) {
+ rfb_curs->foreRed = 0x0000;
+ rfb_curs->foreGreen = 0x0000;
+ rfb_curs->foreBlue = 0x0000;
+ rfb_curs->backRed = 0xffff;
+ rfb_curs->backGreen = 0xffff;
+ rfb_curs->backBlue = 0xffff;
+ }
+ rfb_curs->xhot = ci->sx;
+ rfb_curs->yhot = ci->sy;
+ rfb_curs->cleanup = FALSE;
+ rfb_curs->cleanupSource = FALSE;
+ rfb_curs->cleanupMask = FALSE;
+ rfb_curs->cleanupRichSource = FALSE;
+
+ if (bpp == 8 && indexed_color) {
+ /*
+ * use richsource in PseudoColor for better
+ * looking cursors (i.e. two-color).
+ */
+ int x, y, k = 0, bw;
+ char d, m;
+ int black = BlackPixel(dpy, scr);
+ int white = WhitePixel(dpy, scr);
+
+ rfb_curs->richSource
+ = (char *)calloc(ci->wx * ci->wy, 1);
+
+ for (y = 0; y < ci->wy; y++) {
+ for (x = 0; x < ci->wx; x++) {
+ d = *(ci->data + k);
+ m = *(ci->mask + k);
+ if (d == ' ' && m == ' ') {
+ k++;
+ continue;
+ } else if (m != ' ' && d == ' ') {
bw = black;
+ } else {
+ bw = white;
+ }
+ if (ci->reverse) {
+ if (bw == black) {
+ bw = white;
+ } else {
+ bw = black;
+ }
}
+ *(rfb_curs->richSource+k) =
+ (unsigned char) bw;
+ k++;
+ }
}
- *(rfb_curs->richSource+k) = (unsigned char) bw;
- k++;
- }
}
}
ci->rfb = rfb_curs;
@@ -10622,6 +11017,227 @@ void initialize_xfixes(void) {
#endif
}
+rfbCursorPtr pixels2curs(unsigned long *pixels, int w, int h,
+ int xhot, int yhot, int Bpp) {
+ rfbCursorPtr c;
+ static unsigned long black, white;
+ static int first = 1;
+ char *bitmap, *rich, *alpha;
+ char *new_pixels = NULL;
+ int n_opaque, n_trans, n_alpha, len, histo[256];
+ int send_alpha = 0, alpha_shift, thresh;
+ int i, x, y;
+
+ if (first) {
+ X_LOCK;
+ black = BlackPixel(dpy, scr);
+ white = WhitePixel(dpy, scr);
+ X_UNLOCK;
+ first = 0;
+ }
+
+ if (scaling_cursor && scale_cursor_fac != 1.0) {
+ int W, H;
+
+ W = w;
+ H = h;
+
+ w = scale_round(W, scale_cursor_fac);
+ h = scale_round(H, scale_cursor_fac);
+
+ new_pixels = (char *) malloc(4 * w * h);
+
+ scale_rect(scale_cursor_fac, scaling_cursor_noblend,
+ scaling_cursor_interpolate, 4,
+ (char *) pixels, 4*W, new_pixels, 4*w,
+ W, H, w, h,
+ 0, 0, W, H, 0);
+
+ pixels = (unsigned long *) new_pixels;
+
+ xhot = scale_round(xhot, scale_cursor_fac);
+ yhot = scale_round(yhot, scale_cursor_fac);
+ }
+
+ len = w * h;
+ /* for bitmap data */
+ bitmap = (char *)malloc(len+1);
+ bitmap[len] = '\0';
+
+ /* for rich cursor pixel data */
+ rich = (char *)calloc(Bpp*len, 1);
+ alpha = (char *)calloc(1*len, 1);
+
+ n_opaque = 0;
+ n_trans = 0;
+ n_alpha = 0;
+ for (i=0; i<256; i++) {
+ histo[i] = 0;
+ }
+
+ i = 0;
+ for (y = 0; y < h; y++) {
+ for (x = 0; x < w; x++) {
+ unsigned long a;
+
+ a = 0xff000000 & (*(pixels+i));
+ a = a >> 24; /* alpha channel */
+ if (a > 0) {
+ n_alpha++;
+ }
+ histo[a]++;
+ if (a < alpha_threshold) {
+ n_trans++;
+ } else {
+ n_opaque++;
+ }
+ i++;
+ }
+ }
+ if (alpha_blend) {
+ send_alpha = 0;
+ if (Bpp == 4) {
+ send_alpha = 1;
+ }
+ alpha_shift = 24;
+ if (main_red_shift == 24 || main_green_shift == 24 ||
+ main_blue_shift == 24) {
+ alpha_shift = 0; /* XXX correct? */
+ }
+ }
+ if (n_opaque >= alpha_frac * n_alpha) {
+ thresh = alpha_threshold;
+ } else {
+ n_opaque = 0;
+ for (i=255; i>=0; i--) {
+ n_opaque += histo[i];
+ thresh = i;
+ if (n_opaque >= alpha_frac * n_alpha) {
+ break;
+ }
+ }
+ }
+
+ i = 0;
+ for (y = 0; y < h; y++) {
+ for (x = 0; x < w; x++) {
+ unsigned long r, g, b, a;
+ unsigned int ui;
+ char *p;
+
+ a = 0xff000000 & (*(pixels+i));
+ a = a >> 24; /* alpha channel */
+
+
+ if (a < thresh) {
+ bitmap[i] = ' ';
+ } else {
+ bitmap[i] = 'x';
+ }
+
+ r = 0x00ff0000 & (*(pixels+i));
+ g = 0x0000ff00 & (*(pixels+i));
+ b = 0x000000ff & (*(pixels+i));
+ r = r >> 16; /* red */
+ g = g >> 8; /* green */
+ b = b >> 0; /* blue */
+
+ if (alpha_remove && a != 0) {
+ r = (255 * r) / a;
+ g = (255 * g) / a;
+ b = (255 * b) / a;
+ if (r > 255) r = 255;
+ if (g > 255) g = 255;
+ if (b > 255) b = 255;
+ }
+
+ if (indexed_color) {
+ /*
+ * Choose black or white for
+ * PseudoColor case.
+ */
+ int value = (r+g+b)/3;
+ if (value > 127) {
+ ui = white;
+ } else {
+ ui = black;
+ }
+ } else {
+ /*
+ * Otherwise map the RGB data onto
+ * the framebuffer format:
+ */
+ r = (main_red_max * r)/255;
+ g = (main_green_max * g)/255;
+ b = (main_blue_max * b)/255;
+ ui = 0;
+ ui |= (r << main_red_shift);
+ ui |= (g << main_green_shift);
+ ui |= (b << main_blue_shift);
+ if (send_alpha) {
+ ui |= (a << alpha_shift);
+ }
+ }
+
+ /* insert value into rich source: */
+ p = rich + Bpp*i;
+
+ if (Bpp == 1) {
+ *((unsigned char *)p)
+ = (unsigned char) ui;
+ } else if (Bpp == 2) {
+ *((unsigned short *)p)
+ = (unsigned short) ui;
+ } else if (Bpp == 3) {
+ *((unsigned char *)p)
+ = (unsigned char) ((ui & 0x0000ff) >> 0);
+ *((unsigned char *)(p+1))
+ = (unsigned char) ((ui & 0x00ff00) >> 8);
+ *((unsigned char *)(p+2))
+ = (unsigned char) ((ui & 0xff0000) >> 16);
+ } else if (Bpp == 4) {
+ *((unsigned int *)p)
+ = (unsigned int) ui;
+ }
+
+ /* insert alpha value into alpha source: */
+ p = alpha + i;
+ *((unsigned char *)p) = (unsigned char) a;
+
+ i++;
+ }
+ }
+
+ /* create the cursor with the bitmap: */
+ c = rfbMakeXCursor(w, h, bitmap, bitmap);
+ free(bitmap);
+
+ if (new_pixels) {
+ free(new_pixels);
+ }
+
+ /* set up the cursor parameters: */
+ c->xhot = xhot;
+ c->yhot = yhot;
+ c->cleanup = FALSE;
+ c->cleanupSource = FALSE;
+ c->cleanupMask = FALSE;
+ c->cleanupRichSource = FALSE;
+ c->richSource = rich;
+
+#if !OLD_TREE
+ if (alpha_blend && !indexed_color) {
+ c->alphaSource = alpha;
+ c->alphaPreMultiplied = TRUE;
+ } else {
+ free(alpha);
+ c->alphaSource = NULL;
+ }
+#endif
+
+ return c;
+}
+
int get_xfixes_cursor(int init) {
static unsigned long last_cursor = 0;
static int last_index = 0;
@@ -10643,14 +11259,8 @@ int get_xfixes_cursor(int init) {
if (xfixes_present) {
#if LIBVNCSERVER_HAVE_LIBXFIXES
- int use, oldest, i, x, y, w, h, len;
- int Bpp = bpp/8;
+ int use, oldest, i;
time_t oldtime, now;
- char *bitmap, *rich, *alpha;
- unsigned long black, white;
- rfbCursorPtr c;
- int thresh, n_opaque, n_trans, n_alpha, histo[256];
- int send_alpha = 0, alpha_shift;
XFixesCursorImage *xfc;
if (! got_xfixes_cursor_notify) {
@@ -10727,7 +11337,7 @@ int get_xfixes_cursor(int init) {
if (cursors[use]->rfb->richSource) {
free(cursors[use]->rfb->richSource);
}
-#if !OLD_TREE && CURSOR_TRANSPARENCY
+#if !OLD_TREE
if (cursors[use]->rfb->alphaSource) {
free(cursors[use]->rfb->alphaSource);
}
@@ -10741,193 +11351,9 @@ int get_xfixes_cursor(int init) {
free(cursors[use]->rfb);
}
- X_LOCK;
- black = BlackPixel(dpy, scr);
- white = WhitePixel(dpy, scr);
- X_UNLOCK;
-
- w = xfc->width;
- h = xfc->height;
- len = w * h;
-
- /* for bitmap data */
- bitmap = (char *)malloc(len+1);
- bitmap[len] = '\0';
-
- /* for rich cursor pixel data */
- rich = (char *)calloc(Bpp*len, 1);
- alpha = (char *)calloc(1*len, 1);
-
- n_opaque = 0;
- n_trans = 0;
- n_alpha = 0;
- for (i=0; i<256; i++) {
- histo[i] = 0;
- }
-
- i = 0;
- for (y = 0; y < h; y++) {
- for (x = 0; x < w; x++) {
- unsigned long a;
-
- a = 0xff000000 & (*(xfc->pixels+i));
- a = a >> 24; /* alpha channel */
- if (a > 0) {
- n_alpha++;
- }
- histo[a]++;
- if (a < alpha_threshold) {
- n_trans++;
- } else {
- n_opaque++;
- }
- i++;
- }
- }
- if (alpha_blend) {
- send_alpha = 0;
-#if CURSOR_TRANSPARENCY
- if (Bpp == 4) {
- send_alpha = 1;
- }
-#endif
- alpha_shift = 24;
- if (main_red_shift == 24 || main_green_shift == 24 ||
- main_blue_shift == 24) {
- alpha_shift = 0; /* XXX correct? */
- }
- }
- if (n_opaque >= alpha_frac * n_alpha) {
- thresh = alpha_threshold;
- } else {
- n_opaque = 0;
- for (i=255; i>=0; i--) {
- n_opaque += histo[i];
- thresh = i;
- if (n_opaque >= alpha_frac * n_alpha) {
- break;
- }
- }
- }
-
- i = 0;
- for (y = 0; y < h; y++) {
- for (x = 0; x < w; x++) {
- unsigned long r, g, b, a;
- unsigned int ui;
- char *p;
-
- a = 0xff000000 & (*(xfc->pixels+i));
- a = a >> 24; /* alpha channel */
-
-
- if (a < thresh) {
- bitmap[i] = ' ';
- } else {
- bitmap[i] = 'x';
- }
-
- r = 0x00ff0000 & (*(xfc->pixels+i));
- g = 0x0000ff00 & (*(xfc->pixels+i));
- b = 0x000000ff & (*(xfc->pixels+i));
- r = r >> 16; /* red */
- g = g >> 8; /* green */
- b = b >> 0; /* blue */
-
- if (alpha_remove && a != 0) {
- r = (255 * r) / a;
- g = (255 * g) / a;
- b = (255 * b) / a;
- if (r > 255) r = 255;
- if (g > 255) g = 255;
- if (b > 255) b = 255;
- }
-
- if (indexed_color) {
- /*
- * Choose black or white for
- * PseudoColor case.
- */
- int value = (r+g+b)/3;
- if (value > 127) {
- ui = white;
- } else {
- ui = black;
- }
- } else {
- /*
- * Otherwise map the RGB data onto
- * the framebuffer format:
- */
- r = (main_red_max * r)/255;
- g = (main_green_max * g)/255;
- b = (main_blue_max * b)/255;
- ui = 0;
- ui |= (r << main_red_shift);
- ui |= (g << main_green_shift);
- ui |= (b << main_blue_shift);
- if (send_alpha) {
- ui |= (a << alpha_shift);
- }
- }
-
- /* insert value into rich source: */
- p = rich + Bpp*i;
-
-#if 0
- memcpy(p, (char *)&ui, Bpp);
-#else
- if (Bpp == 1) {
- *((unsigned char *)p)
- = (unsigned char) ui;
- } else if (Bpp == 2) {
- *((unsigned short *)p)
- = (unsigned short) ui;
- } else if (Bpp == 3) {
- *((unsigned char *)p)
- = (unsigned char) ((ui & 0x0000ff) >> 0);
- *((unsigned char *)(p+1))
- = (unsigned char) ((ui & 0x00ff00) >> 8);
- *((unsigned char *)(p+2))
- = (unsigned char) ((ui & 0xff0000) >> 16);
- } else if (Bpp == 4) {
- *((unsigned int *)p)
- = (unsigned int) ui;
- }
-#endif
-
- /* insert alpha value into alpha source: */
- p = alpha + i;
- *((unsigned char *)p) = (unsigned char) a;
-
- i++;
- }
- }
-
- /* create the cursor with the bitmap: */
- c = rfbMakeXCursor(w, h, bitmap, bitmap);
- free(bitmap);
-
- /* set up the cursor parameters: */
- c->xhot = xfc->xhot;
- c->yhot = xfc->yhot;
- c->cleanup = FALSE;
- c->cleanupSource = FALSE;
- c->cleanupMask = FALSE;
- c->cleanupRichSource = FALSE;
- c->richSource = rich;
-
-#if !OLD_TREE && CURSOR_TRANSPARENCY
- if (alpha_blend && !indexed_color) {
- c->alphaSource = alpha;
- c->alphaPreMultiplied = TRUE;
- } else {
- c->alphaSource = NULL;
- }
-#endif
-
/* place cursor into our collection */
- cursors[use]->rfb = c;
+ cursors[use]->rfb = pixels2curs(xfc->pixels, xfc->width,
+ xfc->height, xfc->xhot, xfc->yhot, bpp/8);
/* update time and serial index: */
curs_times[use] = now;
@@ -12116,19 +12542,20 @@ XImage *initialize_xdisplay_fb(void) {
return fb;
}
-void parse_scale_string(char *str) {
+void parse_scale_string(char *str, double *factor, int *scaling, int *noblend,
+ int *nomult4, int *pad, int *interpolate, int *numer, int *denom) {
+
int m, n;
char *p, *tstr;
double f;
- scale_fac = 1.0;
- scaling = 0;
- scaling_noblend = 0;
- scaling_nomult4 = 0;
- scaling_pad = 0;
- scaling_interpolate = 0;
- scaled_x = 0, scaled_y = 0;
- scale_numer = 0, scale_denom = 0;
+ *factor = 1.0;
+ *scaling = 0;
+ *noblend = 0;
+ *nomult4 = 0;
+ *pad = 0;
+ *interpolate = 0;
+ *numer = 0, *denom = 0;
if (str == NULL || str[0] == '\0') {
return;
@@ -12138,16 +12565,16 @@ void parse_scale_string(char *str) {
if ( (p = strchr(tstr, ':')) != NULL) {
/* options */
if (strstr(p+1, "nb") != NULL) {
- scaling_noblend = 1;
+ *noblend = 1;
}
if (strstr(p+1, "n4") != NULL) {
- scaling_nomult4 = 1;
+ *nomult4 = 1;
}
if (strstr(p+1, "in") != NULL) {
- scaling_interpolate = 1;
+ *interpolate = 1;
}
if (strstr(p+1, "pad") != NULL) {
- scaling_pad = 1;
+ *pad = 1;
}
*p = '\0';
}
@@ -12157,24 +12584,24 @@ void parse_scale_string(char *str) {
rfbLog("bad -scale arg: %s\n", tstr);
clean_up_exit(1);
}
- scale_fac = (double) f;
+ *factor = (double) f;
/* look for common fractions from small ints: */
for (n=2; n<=10; n++) {
for (m=1; m<n; m++) {
test = ((double) m)/ n;
- diff = scale_fac - test;
+ diff = *factor - test;
if (-eps < diff && diff < eps) {
- scale_numer = m;
- scale_denom = n;
+ *numer = m;
+ *denom = n;
break;
}
}
- if (scale_denom) {
+ if (*denom) {
break;
}
}
- if (scale_fac < 0.01) {
+ if (*factor < 0.01) {
rfbLog("-scale factor too small: %f\n", scale_fac);
clean_up_exit(1);
}
@@ -12192,34 +12619,42 @@ void parse_scale_string(char *str) {
rfbLog("bad -scale arg: %s\n", tstr);
clean_up_exit(1);
}
- scale_fac = ((double) m)/ n;
- if (scale_fac < 0.01) {
- rfbLog("-scale factor too small: %f\n", scale_fac);
+ *factor = ((double) m)/ n;
+ if (*factor < 0.01) {
+ rfbLog("-scale factor too small: %f\n", *factor);
clean_up_exit(1);
}
- scale_numer = m;
- scale_denom = n;
+ *numer = m;
+ *denom = n;
}
- if (scale_fac == 1.0) {
+ if (*factor == 1.0) {
if (! quiet) {
- rfbLog("scaling disabled for factor %f\n", scale_fac);
+ rfbLog("scaling disabled for factor %f\n", *factor);
}
} else {
- scaling = 1;
+ *scaling = 1;
}
free(tstr);
}
+int scale_round(int len, double fac) {
+ double eps = 0.000001;
+
+ len = (int) (len * fac + eps);
+ return len;
+}
+
void setup_scaling(int *width_in, int *height_in) {
int width = *width_in;
int height = *height_in;
- parse_scale_string(scale_str);
+ parse_scale_string(scale_str, &scale_fac, &scaling, &scaling_noblend,
+ &scaling_nomult4, &scaling_pad, &scaling_interpolate,
+ &scale_numer, &scale_denom);
if (scaling) {
- double eps = 0.000001;
- width = (int) (width * scale_fac + eps);
- height = (int) (height * scale_fac + eps);
+ width = scale_round(width, scale_fac);
+ height = scale_round(height, scale_fac);
if (scale_denom && scaling_pad) {
/* it is not clear this padding is useful anymore */
rfbLog("width %% denom: %d %% %d = %d\n", width,
@@ -14304,7 +14739,9 @@ weights for this scaled pixel are:
* the loop over the 4 pixels.
*/
-static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
+void scale_rect(double factor, int noblend, int interpolate, int Bpp,
+ char *src_fb, int src_bytes_per_line, char *dst_fb, int dst_bytes_per_line,
+ int Nx, int Ny, int nx, int ny, int X1, int Y1, int X2, int Y2, int mark) {
/*
* Notation:
* "i" an x pixel index in the destination (scaled) framebuffer
@@ -14314,8 +14751,6 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
*
* Similarly for nx, ny, Nx, Ny, etc. Lowercase: dest, Uppercase: source.
*/
- int Nx, Ny, nx, ny, Bpp, b;
-
int i, j, i1, i2, j1, j2; /* indices for scaled fb (dest) */
int I, J, I1, I2, J1, J2; /* indices for main fb (source) */
@@ -14323,95 +14758,39 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
double x1, y1, x2, y2; /* x-y coords for destination pixels edges */
double dx, dy; /* size of destination pixel */
-
double ddx, ddy; /* for interpolation expansion */
char *src, *dest; /* pointers to the two framebuffers */
- double pixave[4]; /* for averaging pixel values */
unsigned short us;
+ unsigned char uc;
+ unsigned int ui;
+ int use_noblend_shortcut = 1;
int shrink; /* whether shrinking or expanding */
- static int constant_weights = -1, cnt = 0;
+ static int constant_weights = -1, mag_int = -1;
+ static int last_Nx = -1, last_Ny = -1, cnt = 0;
+ static double last_factor = -1.0;
+ int b, k;
+ double pixave[4]; /* for averaging pixel values */
- if (scale_fac <= 1.0) {
+ if (factor <= 1.0) {
shrink = 1;
} else {
shrink = 0;
}
- if (shrink && scaling_interpolate) {
- /*
- * User asked for interpolation scheme, presumably for
- * small shrink.
- */
- shrink = 0;
- }
- if (!screen || !rfb_fb || !main_fb) {
- return;
- }
-
- if (! screen->serverFormat.trueColour) {
- /*
- * PseudoColor colormap... blending leads to random colors.
- */
- scaling_noblend = 1;
- }
-
- Bpp = bpp/8; /* Bytes per pixel */
-
- Nx = dpy_x; /* extent of source (the whole main fb) */
- Ny = dpy_y;
-
- nx = scaled_x; /* extent of dest (the whole scaled rfb fb) */
- ny = scaled_y;
/*
- * width and height (real numbers) of a scaled pixel.
+ * N.B. width and height (real numbers) of a scaled pixel.
* both are > 1 (e.g. 1.333 for -scale 3/4)
* they should also be equal but we don't assume it.
- */
-
- /*
- * This original way is probably incorrect, giving rise to dx and
- * dy that will not exactly line up with the grid for 2/3, etc.
- * This gives rise to a whole spectrum of weights, leading to poor
- * tightvnc (and other encoding) compression.
- */
-#if 0
- dx = (double) Nx / nx;
- dy = (double) Ny / ny;
-#else
-
- /*
+ *
* This new way is probably the best we can do, take the inverse
* of the scaling factor to double precision.
*/
- dx = 1.0/scale_fac;
- dy = 1.0/scale_fac;
-#endif
-
- /*
- * find the extent of the change the input rectangle induces in
- * the scaled framebuffer.
- */
-
- /* Left edges: find largest i such that i * dx <= X1 */
- i1 = FLOOR(X1/dx);
-
- /* Right edges: find smallest i such that (i+1) * dx >= X2+1 */
- i2 = CEIL( (X2+1)/dx ) - 1;
-
- /* To be safe, correct any overflows: */
- i1 = nfix(i1, nx);
- i2 = nfix(i2, nx) + 1; /* add 1 to make a rectangle upper boundary */
-
- /* Repeat above for y direction: */
- j1 = FLOOR(Y1/dy);
- j2 = CEIL( (Y2+1)/dy ) - 1;
-
- j1 = nfix(j1, ny);
- j2 = nfix(j2, ny) + 1;
+ dx = 1.0/factor;
+ dy = 1.0/factor;
/*
* There is some speedup if the pixel weights are constant, so
@@ -14420,29 +14799,129 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
* If scale = 1/n and n divides Nx and Ny, the pixel weights
* are constant (e.g. 1/2 => equal on 2x2 square).
*/
+ if (factor != last_factor || Nx != last_Nx || Ny != last_Ny) {
+ constant_weights = -1;
+ mag_int = -1;
+ last_Nx = Nx;
+ last_Ny = Ny;
+ last_factor = factor;
+ }
+
if (constant_weights < 0) {
int n = 0;
+
constant_weights = 0;
+ mag_int = 0;
for (i = 2; i<=128; i++) {
double test = ((double) 1)/ i;
double diff, eps = 1.0e-7;
- diff = scale_fac - test;
+ diff = factor - test;
if (-eps < diff && diff < eps) {
n = i;
break;
}
}
- if (scaling_noblend || ! shrink) {
+ if (noblend || ! shrink || interpolate) {
;
} else if (n != 0) {
if (Nx % n == 0 && Ny % n == 0) {
- rfbLog("scale_and_mark_rect: using constant "
- "pixel weight speedup for 1/%d\n", n);
+ static int didmsg = 0;
+ if (mark && ! didmsg) {
+ didmsg = 1;
+ rfbLog("scale_and_mark_rect: using "
+ "constant pixel weight speedup "
+ "for 1/%d\n", n);
+ }
constant_weights = 1;
}
}
+
+ n = 0;
+ for (i = 2; i<=32; i++) {
+ double test = (double) i;
+ double diff, eps = 1.0e-7;
+ diff = factor - test;
+ if (-eps < diff && diff < eps) {
+ n = i;
+ break;
+ }
+ }
+ if (noblend && factor > 1.0 && n) {
+ mag_int = n;
+ }
+ }
+
+ if (mark && factor > 1.0 && ! noblend) {
+ /*
+ * kludge: correct for interpolating blurring leaking
+ * up or left 1 destination pixel.
+ */
+ if (X1 > 0) X1--;
+ if (Y1 > 0) Y1--;
+ }
+
+ /*
+ * find the extent of the change the input rectangle induces in
+ * the scaled framebuffer.
+ */
+
+ /* Left edges: find largest i such that i * dx <= X1 */
+ i1 = FLOOR(X1/dx);
+
+ /* Right edges: find smallest i such that (i+1) * dx >= X2+1 */
+ i2 = CEIL( (X2+1)/dx ) - 1;
+
+ /* To be safe, correct any overflows: */
+ i1 = nfix(i1, nx);
+ i2 = nfix(i2, nx) + 1; /* add 1 to make a rectangle upper boundary */
+
+ /* Repeat above for y direction: */
+ j1 = FLOOR(Y1/dy);
+ j2 = CEIL( (Y2+1)/dy ) - 1;
+
+ j1 = nfix(j1, ny);
+ j2 = nfix(j2, ny) + 1;
+
+ /* special case integer magnification with no blending */
+ if (mark && noblend && mag_int && Bpp != 3) {
+ int jmin, jmax, imin, imax;
+
+ /* outer loop over *source* pixels */
+ for (J=Y1; J < Y2; J++) {
+ jmin = J * mag_int;
+ jmax = jmin + mag_int;
+ for (I=X1; I < X2; I++) {
+ /* extract value */
+ src = src_fb + J*src_bytes_per_line + I*Bpp;
+ if (Bpp == 4) {
+ ui = *((unsigned int *)src);
+ } else if (Bpp == 2) {
+ us = *((unsigned short *)src);
+ } else if (Bpp == 1) {
+ uc = *((unsigned char *)src);
+ }
+ imin = I * mag_int;
+ imax = imin + mag_int;
+ /* inner loop over *dest* pixels */
+ for (j=jmin; j<jmax; j++) {
+ dest = dst_fb + j*dst_bytes_per_line + imin*Bpp;
+ for (i=imin; i<imax; i++) {
+ if (Bpp == 4) {
+ *((unsigned int *)dest) = ui;
+ } else if (Bpp == 2) {
+ *((unsigned short *)dest) = us;
+ } else if (Bpp == 1) {
+ *((unsigned char *)dest) = uc;
+ }
+ dest += Bpp;
+ }
+ }
+ }
+ }
+ goto markit;
}
+
/* set these all to 1.0 to begin with */
wx = 1.0;
wy = 1.0;
@@ -14463,7 +14942,7 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
J1 = (int) FLOOR(y1);
J1 = nfix(J1, Ny);
- if (shrink) {
+ if (shrink && ! interpolate) {
J2 = (int) CEIL(y2) - 1;
J2 = nfix(J2, Ny);
} else {
@@ -14472,9 +14951,10 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
}
/* destination char* pointer: */
- dest = rfb_fb + j*rfb_bytes_per_line + i1*Bpp;
+ dest = dst_fb + j*dst_bytes_per_line + i1*Bpp;
for (i=i1; i<i2; i++) {
+
x1 = i * dx; /* left edge */
if (x1 > Nx - 1) {
/* can go over with dx = 1/scale_fac */
@@ -14488,14 +14968,39 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
I1 = (int) FLOOR(x1);
if (I1 >= Nx) I1 = Nx - 1;
- if (shrink) {
+ if (noblend && use_noblend_shortcut) {
+ /*
+ * The noblend case involves no weights,
+ * and 1 pixel, so just copy the value
+ * directly.
+ */
+ src = src_fb + J1*src_bytes_per_line + I1*Bpp;
+ if (Bpp == 4) {
+ *((unsigned int *)dest)
+ = *((unsigned int *)src);
+ } else if (Bpp == 2) {
+ *((unsigned short *)dest)
+ = *((unsigned short *)src);
+ } else if (Bpp == 1) {
+ *(dest) = *(src);
+ } else if (Bpp == 3) {
+ /* rare case */
+ for (k=0; k<=2; k++) {
+ *(dest+k) = *(src+k);
+ }
+ }
+ dest += Bpp;
+ continue;
+ }
+
+ if (shrink && ! interpolate) {
I2 = (int) CEIL(x2) - 1;
if (I2 >= Nx) I2 = Nx - 1;
} else {
I2 = I1 + 1; /* simple interpolation */
ddx = x1 - I1;
}
-
+
/* Zero out accumulators for next pixel average: */
for (b=0; b<4; b++) {
pixave[b] = 0.0; /* for RGB weighted sums */
@@ -14517,19 +15022,22 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
* after the J > 0 data have been accessed and
* we are at j, i+1, J=0? The stride in J is
* main_bytes_per_line, and so ~4 KB.
+ *
+ * Typical case when shrinking are 2x2 loop, so
+ * just two lines to worry about.
*/
for (J=J1; J<=J2; J++) {
/* see comments for I, x1, x2, etc. below */
if (constant_weights) {
;
- } else if (scaling_noblend) {
+ } else if (noblend) {
if (J != J1) {
continue;
}
wy = 1.0;
/* interpolation scheme: */
- } else if (!shrink) {
+ } else if (!shrink || interpolate) {
if (J >= Ny) {
continue;
} else if (J == J1) {
@@ -14547,7 +15055,7 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
wy = 1.0;
}
- src = main_fb + J*main_bytes_per_line + I1*Bpp;
+ src = src_fb + J*src_bytes_per_line + I1*Bpp;
for (I=I1; I<=I2; I++) {
@@ -14555,7 +15063,7 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
if (constant_weights) {
;
- } else if (scaling_noblend) {
+ } else if (noblend) {
/*
* Ugh, PseudoColor colormap is
* bad news, to avoid random
@@ -14569,7 +15077,7 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
wx = 1.0;
/* interpolation scheme: */
- } else if (!shrink) {
+ } else if (!shrink || interpolate) {
if (I >= Nx) {
continue; /* off edge */
} else if (I == I1) {
@@ -14605,7 +15113,6 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
w = wx * wy;
wtot += w;
-
/*
* We average the unsigned char value
* instead of char value: otherwise
@@ -14613,21 +15120,34 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
* to the maximum (char -1)! This way
* they are spread between 0 and 255.
*/
- if (Bpp != 2) {
- for (b=0; b<Bpp; b++) {
- pixave[b] += w *
- ((unsigned char) *(src+b));
- }
- } else {
+ if (Bpp == 4) {
+ /* unroll the loops, can give 20% */
+ pixave[0] += w *
+ ((unsigned char) *(src ));
+ pixave[1] += w *
+ ((unsigned char) *(src+1));
+ pixave[2] += w *
+ ((unsigned char) *(src+2));
+ pixave[3] += w *
+ ((unsigned char) *(src+3));
+ } else if (Bpp == 2) {
/*
* 16bpp: trickier with green
* split over two bytes, so we
* use the masks:
*/
- us = *( (unsigned short *) src );
+ us = *((unsigned short *) src);
pixave[0] += w*(us & main_red_mask);
pixave[1] += w*(us & main_green_mask);
pixave[2] += w*(us & main_blue_mask);
+ } else if (Bpp == 1) {
+ pixave[0] += w *
+ ((unsigned char) *(src));
+ } else {
+ for (b=0; b<Bpp; b++) {
+ pixave[b] += w *
+ ((unsigned char) *(src+b));
+ }
}
src += Bpp;
}
@@ -14639,11 +15159,12 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
wtot = 1.0/wtot; /* normalization factor */
/* place weighted average pixel in the scaled fb: */
- if (Bpp != 2) {
- for (b=0; b<Bpp; b++) {
- *(dest + b) = (char) (wtot * pixave[b]);
- }
- } else {
+ if (Bpp == 4) {
+ *(dest ) = (char) (wtot * pixave[0]);
+ *(dest+1) = (char) (wtot * pixave[1]);
+ *(dest+2) = (char) (wtot * pixave[2]);
+ *(dest+3) = (char) (wtot * pixave[3]);
+ } else if (Bpp == 2) {
/* 16bpp / 565 case: */
pixave[0] *= wtot;
pixave[1] *= wtot;
@@ -14652,12 +15173,37 @@ static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
| (main_green_mask & (int) pixave[1])
| (main_blue_mask & (int) pixave[2]);
*( (unsigned short *) dest ) = us;
+ } else if (Bpp == 1) {
+ *(dest) = (char) (wtot * pixave[0]);
+ } else {
+ for (b=0; b<Bpp; b++) {
+ *(dest+b) = (char) (wtot * pixave[b]);
+ }
}
dest += Bpp;
}
}
+ markit:
+ if (mark) {
+ mark_rect_as_modified(i1, j1, i2, j2, 1);
+ }
+}
- mark_rect_as_modified(i1, j1, i2, j2, 1);
+static void scale_and_mark_rect(int X1, int Y1, int X2, int Y2) {
+
+ if (!screen || !rfb_fb || !main_fb) {
+ return;
+ }
+ if (! screen->serverFormat.trueColour) {
+ /*
+ * PseudoColor colormap... blending leads to random colors.
+ */
+ scaling_noblend = 1;
+ }
+
+ scale_rect(scale_fac, scaling_noblend, scaling_interpolate, bpp/8,
+ main_fb, main_bytes_per_line, rfb_fb, rfb_bytes_per_line,
+ dpy_x, dpy_y, scaled_x, scaled_y, X1, Y1, X2, Y2, 1);
}
void mark_rect_as_modified(int x1, int y1, int x2, int y2, int force) {
@@ -15449,6 +15995,7 @@ int copy_snap(void) {
* Utilities for managing the "naps" to cut down on amount of polling.
*/
static void nap_set(int tile_cnt) {
+ int nap_in = nap_ok;
if (scan_count == 0) {
/* roll up check for all NSCAN scans */
@@ -15459,6 +16006,12 @@ static void nap_set(int tile_cnt) {
}
nap_diff_count = 0;
}
+ if (nap_ok && ! nap_in && using_xdamage) {
+ if (XD_skip > 0.8 * XD_tot) {
+ /* X DAMAGE is keeping load low, so skip nap */
+ nap_ok = 0;
+ }
+ }
if (show_cursor) {
/* kludge for the up to 4 tiles the mouse patch could occupy */
@@ -17315,6 +17868,7 @@ static void print_help(int mode) {
" 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"
+"\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"
@@ -17326,7 +17880,7 @@ static void print_help(int mode) {
" and for some workarounds. n may be a decimal number,\n"
" or 0x hex. Run xdpyinfo(1) for the values. One may\n"
" also use \"TrueColor\", etc. see <X11/X.h> for a list.\n"
-" If the string ends in \":m\" the for better or for\n"
+" If the string ends in \":m\" then for better or for\n"
" worse the visual depth is forced to be m.\n"
"-overlay Handle multiple depth visuals on one screen, e.g. 8+24\n"
" and 24+8 overlay visuals (the 32 bits per pixel are\n"
@@ -17360,9 +17914,8 @@ static void print_help(int mode) {
" cursor shape using the overlay mechanism.\n"
"\n"
"-scale fraction Scale the framebuffer by factor \"fraction\". Values\n"
-" less than 1 shrink the fb, larger ones expand it.\n"
-" Note: image may not be sharp and response may be\n"
-" slower. Currently the cursor shape is not scaled.\n"
+" less than 1 shrink the fb, larger ones expand it. Note:\n"
+" image may not be sharp and response may be slower.\n"
" If \"fraction\" contains a decimal point \".\" it\n"
" is taken as a floating point number, alternatively\n"
" the notation \"m/n\" may be used to denote fractions\n"
@@ -17379,6 +17932,15 @@ static void print_help(int mode) {
" pad scaled width and height to be multiples of scaling\n"
" denominator (e.g. 3 for 2/3).\n"
"\n"
+"-scale_cursor frac By default if -scale is supplied the cursor shape is\n"
+" scaled by the same factor. Depending on your usage,\n"
+" you may want to scale the cursor independently of the\n"
+" screen or not at all. If you specify -scale_cursor\n"
+" the cursor will be scaled by that factor. When using\n"
+" -scale mode to keep the cursor at its \"natural\" size\n"
+" use \"-scale_cursor 1\". Most of the \":\" scaling\n"
+" options apply here as well.\n"
+"\n"
"-viewonly All VNC clients can only watch (default %s).\n"
"-shared VNC display is shared (default %s).\n"
"-once Exit after the first successfully connected viewer\n"
@@ -17746,6 +18308,11 @@ static void print_help(int mode) {
" so this is no loss unless someone is simultaneously at\n"
" the real X display. Default: %s\n"
"\n"
+" Use \"-norepeat N\" to set how many times norepeat will\n"
+" be reset if something else (e.g. X session manager)\n"
+" disables it. The default is 2. Use a negative value\n"
+" for unlimited resets.\n"
+"\n"
"-nofb Ignore video framebuffer: only process keyboard and\n"
" pointer. Intended for use with Win2VNC and x2vnc\n"
" dual-monitor setups.\n"
@@ -17826,6 +18393,9 @@ static void print_help(int mode) {
" extensions available. On Solaris and IRIX if XFIXES\n"
" is not available, -overlay mode will be attempted.\n"
"\n"
+"-arrow n Choose an alternate \"arrow\" cursor from a set of\n"
+" some common ones. n can be 1 to %d. Default is: %d\n"
+"\n"
"-noxfixes Do not use the XFIXES extension to draw the exact cursor\n"
" shape even if it is available.\n"
"-alphacut n When using the XFIXES extension for the cursor shape,\n"
@@ -18144,6 +18714,8 @@ 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"
+" waitmapped wait until subwin is mapped.\n"
+" nowaitmapped do not wait until subwin is mapped.\n"
" clip:WxH+X+Y set -clip mode to \"WxH+X+Y\"\n"
" flashcmap enable -flashcmap mode.\n"
" noflashcmap disable -flashcmap mode.\n"
@@ -18156,6 +18728,7 @@ static void print_help(int mode) {
" nooverlay_cursor.\n"
" visual:vis set -visual to \"vis\"\n"
" scale:frac set -scale to \"frac\"\n"
+" scale_cursor:f set -scale_cursor to \"f\"\n"
" viewonly enable -viewonly mode.\n"
/* access view,share,forever */
" noviewonly disable -viewonly mode.\n"
@@ -18257,6 +18830,7 @@ static void print_help(int mode) {
" show_cursor enable showing a cursor.\n"
" noshow_cursor disable showing a cursor. (same as\n"
" \"nocursor\")\n"
+" arrow:n set -arrow to alternate n.\n"
" xfixes enable xfixes cursor shape mode.\n"
" noxfixes disable xfixes cursor shape mode.\n"
" alphacut:n set -alphacut to n.\n"
@@ -18356,27 +18930,27 @@ static void print_help(int mode) {
" the returned value corresponds to (hint: the ext_*\n"
" variables correspond to the presence of X extensions):\n"
"\n"
-" ans= stop quit exit shutdown ping blacken zero\n"
-" refresh reset close disconnect id sid clip waitmapped\n"
-" nowaitmapped flashcmap noflashcmap truecolor notruecolor\n"
+" ans= stop quit exit shutdown ping blacken zero refresh\n"
+" reset close disconnect id sid waitmapped nowaitmapped\n"
+" clip flashcmap noflashcmap truecolor notruecolor\n"
" overlay nooverlay overlay_cursor overlay_yescursor\n"
" nooverlay_nocursor nooverlay_cursor nooverlay_yescursor\n"
-" overlay_nocursor visual scale viewonly noviewonly\n"
-" shared noshared forever noforever once timeout deny\n"
-" lock nodeny unlock connect allowonce allow localhost\n"
-" nolocalhost listen accept gone shm noshm flipbyteorder\n"
-" noflipbyteorder onetile noonetile solid_color solid\n"
-" nosolid blackout xinerama noxinerama xrandr noxrandr\n"
-" xrandr_mode padgeom quiet q noquiet modtweak nomodtweak\n"
-" xkb noxkb skip_keycodes add_keysyms noadd_keysyms\n"
-" clear_mods noclear_mods clear_keys noclear_keys\n"
-" 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 xdamage noxdamage xd_area\n"
-" xd_mem alphacut alphafrac alpharemove noalpharemove\n"
-" alphablend noalphablend xwarp xwarppointer noxwarp\n"
-" noxwarppointer buttonmap dragging nodragging\n"
+" overlay_nocursor visual scale scale_cursor viewonly\n"
+" noviewonly shared noshared forever noforever once\n"
+" timeout deny lock nodeny unlock connect allowonce\n"
+" allow localhost nolocalhost listen accept gone\n"
+" shm noshm flipbyteorder noflipbyteorder onetile\n"
+" noonetile solid_color solid nosolid blackout xinerama\n"
+" noxinerama xrandr noxrandr xrandr_mode padgeom quiet\n"
+" q noquiet modtweak nomodtweak xkb noxkb skip_keycodes\n"
+" add_keysyms noadd_keysyms clear_mods noclear_mods\n"
+" clear_keys noclear_keys remap repeat norepeat fb nofb\n"
+" bell nobell sel nosel primary noprimary cursorshape\n"
+" nocursorshape cursorpos nocursorpos cursor show_cursor\n"
+" noshow_cursor nocursor arrow xfixes noxfixes xdamage\n"
+" noxdamage xd_area xd_mem alphacut alphafrac alpharemove\n"
+" noalpharemove alphablend noalphablend xwarp xwarppointer\n"
+" noxwarp 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"
@@ -18486,6 +19060,7 @@ static void print_help(int mode) {
vnc_connect ? "-vncconnect":"-novncconnect",
use_modifier_tweak ? "-modtweak":"-nomodtweak",
no_autorepeat ? "-norepeat":"-repeat",
+ alt_arrow_max, alt_arrow,
alpha_threshold,
alpha_frac,
cursor_pos_updates ? "-cursorpos":"-nocursorpos",
@@ -18968,6 +19543,9 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-scale")) {
CHECK_ARGC
scale_str = strdup(argv[++i]);
+ } else if (!strcmp(arg, "-scale_cursor")) {
+ CHECK_ARGC
+ scale_cursor_str = strdup(argv[++i]);
} else if (!strcmp(arg, "-viewonly")) {
view_only = 1;
} else if (!strcmp(arg, "-shared")) {
@@ -19114,6 +19692,15 @@ int main(int argc, char* argv[]) {
remap_file = strdup(argv[++i]);
} else if (!strcmp(arg, "-norepeat")) {
no_autorepeat = 1;
+ if (i < argc-1) {
+ char *s = argv[i+1];
+ if (*s == '-') {
+ s++;
+ }
+ if (isdigit(*s)) {
+ no_repeat_countdown = atoi(argv[++i]);
+ }
+ }
} else if (!strcmp(arg, "-repeat")) {
no_autorepeat = 0;
} else if (!strcmp(arg, "-nofb")) {
@@ -19139,6 +19726,9 @@ int main(int argc, char* argv[]) {
} else if (!strcmp(arg, "-nocursor")) {
multiple_cursors_mode = strdup("none");
show_cursor = 0;
+ } else if (!strcmp(arg, "-arrow")) {
+ CHECK_ARGC
+ alt_arrow = atoi(argv[++i]);
} else if (!strcmp(arg, "-noxfixes")) {
use_xfixes = 0;
} else if (!strcmp(arg, "-alphacut")) {
@@ -19639,6 +20229,7 @@ int main(int argc, char* argv[]) {
fprintf(stderr, " remap: %s\n", remap_file ? remap_file
: "null");
fprintf(stderr, " norepeat: %d\n", no_autorepeat);
+ fprintf(stderr, " norepeatcnt:%d\n", no_repeat_countdown);
fprintf(stderr, " nofb: %d\n", nofb);
fprintf(stderr, " watchbell: %d\n", watch_bell);
fprintf(stderr, " watchsel: %d\n", watch_selection);
@@ -19711,11 +20302,12 @@ int main(int argc, char* argv[]) {
if (xkbcompat) {
Bool rc = XkbIgnoreExtension(True);
if (! quiet) {
- rfbLog("disabling xkb extension. rc=%d\n", rc);
+ rfbLog("Disabling xkb XKEYBOARD extension. rc=%d\n",
+ rc);
}
if (watch_bell) {
watch_bell = 0;
- if (! quiet) rfbLog("disabling bell.\n");
+ if (! quiet) rfbLog("Disabling bell.\n");
}
}
#else
@@ -19792,7 +20384,7 @@ int main(int argc, char* argv[]) {
#if LIBVNCSERVER_HAVE_LIBXFIXES
if (! XFixesQueryExtension(dpy, &xfixes_base_event_type, &er)) {
if (! quiet) {
- rfbLog("disabling xfixes mode: display does not "
+ rfbLog("Disabling XFIXES mode: display does not "
"support it.\n");
}
xfixes_present = 0;
@@ -19803,8 +20395,8 @@ int main(int argc, char* argv[]) {
#if LIBVNCSERVER_HAVE_LIBXDAMAGE
if (! XDamageQueryExtension(dpy, &xdamage_base_event_type, &er)) {
- if (0 && ! quiet) {
- rfbLog("disabling xdamage mode: display does not "
+ if (! quiet) {
+ rfbLog("Disabling X DAMAGE mode: display does not "
"support it.\n");
}
xdamage_present = 0;
@@ -19823,7 +20415,7 @@ int main(int argc, char* argv[]) {
#ifdef SOLARIS_OVERLAY
if (! XQueryExtension(dpy, "SUN_OVL", &maj, &ev, &er)) {
if (! quiet && overlay) {
- rfbLog("disabling -overlay: SUN_OVL "
+ rfbLog("Disabling -overlay: SUN_OVL "
"extension not available.\n");
}
} else {
@@ -19833,7 +20425,7 @@ int main(int argc, char* argv[]) {
#ifdef IRIX_OVERLAY
if (! XReadDisplayQueryExtension(dpy, &ev, &er)) {
if (! quiet && overlay) {
- rfbLog("disabling -overlay: IRIX ReadDisplay "
+ rfbLog("Disabling -overlay: IRIX ReadDisplay "
"extension not available.\n");
}
} else {
@@ -19905,15 +20497,24 @@ int main(int argc, char* argv[]) {
/* check for XTEST */
if (! XTestQueryExtension_wr(dpy, &ev, &er, &maj, &min)) {
- if (! quiet) {
- rfbLog("warning: XTest extension not available, most user"
- " input\n");
- rfbLog("(pointer and keyboard) will be discarded.\n");
- rfbLog("no XTest extension, switching to -xwarppointer mode\n");
- rfbLog("for pointer motion input.\n");
- }
- xtest_present = 0;
- use_xwarppointer = 1;
+ if (! quiet) {
+ rfbLog("WARNING: XTEST extension not available "
+ "(either missing from\n");
+ rfbLog(" display or client library libXtst "
+ "missing at build time).\n");
+ rfbLog(" MOST user input (pointer and keyboard) "
+ "will be DISCARDED.\n");
+ rfbLog(" If display does have XTEST, be sure to "
+ "build x11vnc with\n");
+ rfbLog(" a working libXtst build environment "
+ "(e.g. libxtst-dev,\n");
+ rfbLog(" or other packages).\n");
+ rfbLog("No XTEST extension, switching to "
+ "-xwarppointer mode for\n");
+ rfbLog(" pointer motion input.\n");
+ }
+ xtest_present = 0;
+ use_xwarppointer = 1;
}
/*
* Window managers will often grab the display during resize, etc.
@@ -19980,8 +20581,8 @@ int main(int argc, char* argv[]) {
#if LIBVNCSERVER_HAVE_LIBXRANDR
if (! XRRQueryExtension(dpy, &xrandr_base_event_type, &er)) {
if (xrandr && ! quiet) {
- rfbLog("disabling -xrandr mode: display does not"
- " support it.\n");
+ rfbLog("Disabling -xrandr mode: display does not"
+ " support X RANDR.\n");
}
xrandr = 0;
xrandr_present = 0;