Commit 5764cd3f authored by runge's avatar runge

x11vnc: Fix problems in --without-x builds. Fix crash

with -QD query for dbus info.  Adjust window size for
small screens in -gui.  Improve F1 help for xdm, etc.
include ssvnc 1.0.25 source.
parent 018f152b
2009-12-28 Karl Runge <runge@karlrunge.com>
* x11vnc: Fix problems in --without-x builds. Fix crash
with -QD query for dbus info. Adjust window size for
small screens in -gui. Improve F1 help for xdm, etc.
include ssvnc 1.0.25 source.
2009-12-24 Karl Runge <runge@karlrunge.com> 2009-12-24 Karl Runge <runge@karlrunge.com>
* x11vnc: prepare_x11vnc_dist.sh for 0.9.10. -xdummy_xvfb, * x11vnc: prepare_x11vnc_dist.sh for 0.9.10. -xdummy_xvfb,
-svc_xdummy_xvfb and -create_x shorthand. lxde session. -svc_xdummy_xvfb and -create_x shorthand. lxde session.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (C) 2002-2009 Karl J. Runge <runge@karlrunge.com> Copyright (C) 2002-2009 Karl J. Runge <runge@karlrunge.com>
All rights reserved. All rights reserved.
x11vnc README file Date: Thu Dec 24 16:08:39 EST 2009 x11vnc README file Date: Mon Dec 28 00:07:34 EST 2009
The following information is taken from these URLs: The following information is taken from these URLs:
...@@ -910,12 +910,15 @@ make ...@@ -910,12 +910,15 @@ make
Here are some features that will appear in the 0.9.10 release: Here are some features that will appear in the 0.9.10 release:
* Coming Soon. * The [122]Xdummy wrapper script for Xorg's dummy driver is updated
and no longer requires being run as root. New service options are
provided to select Xdummy over Xvfb as the virtual X server to be
created.
Here are some features that appeared in the 0.9.9 release: Here are some features that appeared in the 0.9.9 release:
* The [122]-unixpw_system_greeter option, when used in combined * The [123]-unixpw_system_greeter option, when used in combined
unixpw and XDMCP FINDCREATEDISPLAY mode (e.g. [123]-xdmsvc), unixpw and XDMCP FINDCREATEDISPLAY mode (e.g. [124]-xdmsvc),
enables the user to press Escape to jump directly to the enables the user to press Escape to jump directly to the
XDM/GDM/KDM login greeter screen. This way the user avoids XDM/GDM/KDM login greeter screen. This way the user avoids
entering his unix password twice at X session creation time. Also, entering his unix password twice at X session creation time. Also,
...@@ -926,10 +929,10 @@ make ...@@ -926,10 +929,10 @@ make
clients like Eggplant and JollysFastVNC continuously spray these clients like Eggplant and JollysFastVNC continuously spray these
requests at VNC servers (regardless of whether they have received requests at VNC servers (regardless of whether they have received
any updates or not.) Under some circumstances this could lead to any updates or not.) Under some circumstances this could lead to
x11vnc falling behind. The [124]-extra_fbur option allows one to x11vnc falling behind. The [125]-extra_fbur option allows one to
fine tune the setting. Additionally, one may also dial down fine tune the setting. Additionally, one may also dial down
delays: e.g. "[125]-defer 5" and "[126]-wait 5" (or to 1 or even delays: e.g. "[126]-defer 5" and "[127]-wait 5" (or to 1 or even
0) or [127]-nonap or [128]-allinput to keep up with these VNC 0) or [128]-nonap or [129]-allinput to keep up with these VNC
clients at the expense of increased system load. clients at the expense of increased system load.
* Heuristics are applied to try to determine if the X display is * Heuristics are applied to try to determine if the X display is
currently in a Display Manager Greeter Login panel (e.g. GDM) If currently in a Display Manager Greeter Login panel (e.g. GDM) If
...@@ -941,9 +944,9 @@ make ...@@ -941,9 +944,9 @@ make
the use of the XFIXES cursor fetching functionality; this avoids the use of the XFIXES cursor fetching functionality; this avoids
an Xorg bug that causes Xorg to crash right after the user logs an Xorg bug that causes Xorg to crash right after the user logs
in. in.
* A new option [129]-findauth runs the FINDDISPLAY script that * A new option [130]-findauth runs the FINDDISPLAY script that
applies heuristics that try to determine the XAUTHORITY file. The applies heuristics that try to determine the XAUTHORITY file. The
use of '[130]-auth guess' will use the XAUTHORITY that -findauth use of '[131]-auth guess' will use the XAUTHORITY that -findauth
reveals. This can be handy in with the lastest GDM where the reveals. This can be handy in with the lastest GDM where the
ability to store cookies in ~/.Xauthority has been removed. If ability to store cookies in ~/.Xauthority has been removed. If
x11vnc is running as root (e.g. inetd) and you add -env FD_XDM=1 x11vnc is running as root (e.g. inetd) and you add -env FD_XDM=1
...@@ -951,28 +954,28 @@ make ...@@ -951,28 +954,28 @@ make
the correct XAUTHORITY for the given display (this works for the correct XAUTHORITY for the given display (this works for
XDM/GDM/KDM if the login greeter panel is up or if someone has XDM/GDM/KDM if the login greeter panel is up or if someone has
already logged into an X session.) already logged into an X session.)
* The FINDDISPLAY and FINDCREATEDISPLAY modes (i.e. "[131]-display * The FINDDISPLAY and FINDCREATEDISPLAY modes (i.e. "[132]-display
WAIT:cmd=...", [132]-find, [133]-create) now work correctly for WAIT:cmd=...", [133]-find, [134]-create) now work correctly for
the user-supplied login program scheme "[134]-unixpw_cmd ...", as the user-supplied login program scheme "[135]-unixpw_cmd ...", as
long as the login program supports running commands specified in long as the login program supports running commands specified in
the environment variable "RFB_UNIXPW_CMD_RUN" as the logged-in the environment variable "RFB_UNIXPW_CMD_RUN" as the logged-in
user. The mode "[135]-unixpw_nis ..." has also been made more user. The mode "[136]-unixpw_nis ..." has also been made more
consistent. consistent.
* The [136]-stunnel option (like [137]-ssl but uses stunnel as an * The [137]-stunnel option (like [138]-ssl but uses stunnel as an
external helper program) now works with the [138]-ssl "SAVE" and external helper program) now works with the [139]-ssl "SAVE" and
"TMP" special certificate names. The [139]-sslverify and "TMP" special certificate names. The [140]-sslverify and
[140]-sslCRL options now work correctly in [141]-stunnel mode. [141]-sslCRL options now work correctly in [142]-stunnel mode.
Single port HTTPS connections are also supported for this mode. Single port HTTPS connections are also supported for this mode.
* There is an experimental Application Sharing mode that improves * There is an experimental Application Sharing mode that improves
upon the -id/-sid single window sharing: [142]-appshare (run upon the -id/-sid single window sharing: [143]-appshare (run
"x11vnc -appshare -help" for more info.) It is still very "x11vnc -appshare -help" for more info.) It is still very
primitive and approximate, but at least it displays multiple primitive and approximate, but at least it displays multiple
top-level windows. top-level windows.
* The remote control command [143]-R can be used to instruct x11vnc * The remote control command [144]-R can be used to instruct x11vnc
to resend its most recent copy of the Clipboard, Primary, or to resend its most recent copy of the Clipboard, Primary, or
Cutbuffer selections: "x11vnc -R resend_clipboard", "x11vnc -R Cutbuffer selections: "x11vnc -R resend_clipboard", "x11vnc -R
resend_primary", and "x11vnc -R resend_cutbuffer". resend_primary", and "x11vnc -R resend_cutbuffer".
* The fonts in the GUI ([144]-gui) can now by set via environment * The fonts in the GUI ([145]-gui) can now by set via environment
variables, e.g. -env X11VNC_FONT_BOLD='Helvetica -16 bold' and variables, e.g. -env X11VNC_FONT_BOLD='Helvetica -16 bold' and
-env X11VNC_FONT_FIXED='Courier -14'. -env X11VNC_FONT_FIXED='Courier -14'.
* The XDAMAGE mechanism is now automatically disabled for a period * The XDAMAGE mechanism is now automatically disabled for a period
...@@ -982,18 +985,18 @@ make ...@@ -982,18 +985,18 @@ make
* There is an experimental workaround: "-env X11VNC_WATCH_DX_DY=1" * There is an experimental workaround: "-env X11VNC_WATCH_DX_DY=1"
that tries to avoid problems with poorly constructed menu themes that tries to avoid problems with poorly constructed menu themes
that place the initial position of the mouse cursor inside a menu that place the initial position of the mouse cursor inside a menu
item's active zone. More information [145]can be found here. item's active zone. More information [146]can be found here.
Here are some features that appeared in the 0.9.8 release: Here are some features that appeared in the 0.9.8 release:
* Stability improvements to [146]-threads mode. Running x11vnc this * Stability improvements to [147]-threads mode. Running x11vnc this
way is more reliable now. Threaded operation sometimes gives way is more reliable now. Threaded operation sometimes gives
better interactive response and faster updates: try it out. The better interactive response and faster updates: try it out. The
threaded mode now supports multiple VNC viewers using the same VNC threaded mode now supports multiple VNC viewers using the same VNC
encoding. The threaded mode can also yield a performance encoding. The threaded mode can also yield a performance
enhancement in the many client case (e.g. class-room broadcast.) enhancement in the many client case (e.g. class-room broadcast.)
We have tested with 30 to 50 simultaneous clients. See also We have tested with 30 to 50 simultaneous clients. See also
[147]-reflect. [148]-reflect.
For simultaneous clients: the ZRLE encoding is thread safe on all For simultaneous clients: the ZRLE encoding is thread safe on all
platforms, and the Tight and Zlib encodings are currently only platforms, and the Tight and Zlib encodings are currently only
thread safe on Linux where thread local storage, __thread, is thread safe on Linux where thread local storage, __thread, is
...@@ -1002,12 +1005,12 @@ make ...@@ -1002,12 +1005,12 @@ make
connected client, all encodings are safe on all platforms. Note connected client, all encodings are safe on all platforms. Note
that some features (e.g. scroll detection and -ncache) may be that some features (e.g. scroll detection and -ncache) may be
disabled or run with reduced functionality in -threads mode. disabled or run with reduced functionality in -threads mode.
* Automatically tries to work around an [148]Xorg server bug * Automatically tries to work around an [149]Xorg server bug
involving infinitely repeating keys when turning off key involving infinitely repeating keys when turning off key
repeating. Use [149]-repeat if the automatic workaround fails. repeating. Use [150]-repeat if the automatic workaround fails.
* Improved reliability of the Single Port SSL VNC and HTTPS java * Improved reliability of the Single Port SSL VNC and HTTPS java
viewer applet delivery mechanism. viewer applet delivery mechanism.
* The [150]-clip mode works under [151]-rawfb. * The [151]-clip mode works under [152]-rawfb.
Here are some features that appeared in the 0.9.7 release: Here are some features that appeared in the 0.9.7 release:
...@@ -1017,38 +1020,38 @@ make ...@@ -1017,38 +1020,38 @@ make
case the special file /dev/vcsa2 is used to retrieve vt2's current case the special file /dev/vcsa2 is used to retrieve vt2's current
text. Text and colors are shown, but no graphics. text. Text and colors are shown, but no graphics.
* Support for less than 8 bits per pixel framebuffers (e.g. 4 or 1 * Support for less than 8 bits per pixel framebuffers (e.g. 4 or 1
bpp) in the [152]-rawfb mode. bpp) in the [153]-rawfb mode.
* The SSL enabled UltraVNC Java viewer applet now has a [Home] entry * The SSL enabled UltraVNC Java viewer applet now has a [Home] entry
in the "drives" drop down menu. This menu can be configured with in the "drives" drop down menu. This menu can be configured with
the ftpDropDown applet parameter. All of the applet parameters are the ftpDropDown applet parameter. All of the applet parameters are
documented in classes/ssl/README. documented in classes/ssl/README.
* Experimental support for [153]VirtualGL's [154]TurboVNC (an * Experimental support for [154]VirtualGL's [155]TurboVNC (an
enhanced TightVNC for fast LAN high framerate usage.) enhanced TightVNC for fast LAN high framerate usage.)
* The CUPS Terminal Services helper mode has been improved. * The CUPS Terminal Services helper mode has been improved.
* Improvements to the [155]-ncache_cr that allows smooth opaque * Improvements to the [156]-ncache_cr that allows smooth opaque
window motions using the 'copyrect' encoding when using window motions using the 'copyrect' encoding when using
[156]-ncache mode. [157]-ncache mode.
* The [157]-rmflag option enables a way to indicate to other * The [158]-rmflag option enables a way to indicate to other
processes x11vnc has exited. processes x11vnc has exited.
* Reverse connections using anonymous Diffie Hellman SSL encryption * Reverse connections using anonymous Diffie Hellman SSL encryption
now work. now work.
Here are some features that appeared in the 0.9.6 release: Here are some features that appeared in the 0.9.6 release:
* Support for [158]VeNCrypt SSL/TLS encrypted connections. It is * Support for [159]VeNCrypt SSL/TLS encrypted connections. It is
enabled by default in the [159]-ssl mode. VNC Viewers like enabled by default in the [160]-ssl mode. VNC Viewers like
vinagre, gvncviewer/gtk-vnc, the vencrypt package, [160]SSVNC, and vinagre, gvncviewer/gtk-vnc, the vencrypt package, [161]SSVNC, and
others support this encryption mode. It can also be used with the others support this encryption mode. It can also be used with the
[161]-unixpw option to enable Unix username and password [162]-unixpw option to enable Unix username and password
authentication (VeNCrypt's "*Plain" modes.) A similar but older authentication (VeNCrypt's "*Plain" modes.) A similar but older
VNC security type "ANONTLS" (used by vino) is supported as well. VNC security type "ANONTLS" (used by vino) is supported as well.
See the [162]-vencrypt and [163]-anontls options for additional See the [163]-vencrypt and [164]-anontls options for additional
control. The difference between x11vnc's normal -ssl mode and control. The difference between x11vnc's normal -ssl mode and
VeNCrypt is that the former wraps the entire VNC connection in SSL VeNCrypt is that the former wraps the entire VNC connection in SSL
(like HTTPS does for HTTP, i.e. "vncs://") while VeNCrypt switches (like HTTPS does for HTTP, i.e. "vncs://") while VeNCrypt switches
on the SSL/TLS at a certain point during the VNC handshake. Use on the SSL/TLS at a certain point during the VNC handshake. Use
[164]-sslonly to disable both VeNCrypt and ANONTLS (vino.) [165]-sslonly to disable both VeNCrypt and ANONTLS (vino.)
* The "[165]-ssl ANON" option enables Anonymous Diffie-Hellman (ADH) * The "[166]-ssl ANON" option enables Anonymous Diffie-Hellman (ADH)
key exchange for x11vnc's normal SSL/TLS operation. Note that key exchange for x11vnc's normal SSL/TLS operation. Note that
Anonymous Diffie-Hellman uses encryption for privacy, but provides Anonymous Diffie-Hellman uses encryption for privacy, but provides
no authentication and so is susceptible to Man-In-The-Middle no authentication and so is susceptible to Man-In-The-Middle
...@@ -1056,17 +1059,17 @@ make ...@@ -1056,17 +1059,17 @@ make
SAVE", etc. and have the VNC viewer verify the cert.) The ANONTLS SAVE", etc. and have the VNC viewer verify the cert.) The ANONTLS
mode (vino) only supports ADH. VeNCrypt mode supports both ADH and mode (vino) only supports ADH. VeNCrypt mode supports both ADH and
regular X509 SSL certificates modes. For these ADH is enabled by regular X509 SSL certificates modes. For these ADH is enabled by
default. See [166]-vencrypt and [167]-anontls for how to disable default. See [167]-vencrypt and [168]-anontls for how to disable
ADH. ADH.
* For x11vnc's SSL/TLS modes, one can now specify a Certificate * For x11vnc's SSL/TLS modes, one can now specify a Certificate
Revocation List (CRL) with the [168]-sslCRL option. This will only Revocation List (CRL) with the [169]-sslCRL option. This will only
be useful for wide deployments: say a company-wide x11vnc SSL be useful for wide deployments: say a company-wide x11vnc SSL
access deployment using a central Certificate Authority (CA) via access deployment using a central Certificate Authority (CA) via
[169]-sslGenCA and [170]-sslGenCert. This way if a user has his [170]-sslGenCA and [171]-sslGenCert. This way if a user has his
laptop lost or stolen, you only have to revoke his key instead of laptop lost or stolen, you only have to revoke his key instead of
creating a new Certificate Authority and redeploying new keys to creating a new Certificate Authority and redeploying new keys to
all users. all users.
* The default SSL/TLS mode, "[171]-ssl" (no pem file parameter * The default SSL/TLS mode, "[172]-ssl" (no pem file parameter
supplied), is now the same as "-ssl SAVE" and will save the supplied), is now the same as "-ssl SAVE" and will save the
generated self-signed cert in "~/.vnc/certs/server.pem". generated self-signed cert in "~/.vnc/certs/server.pem".
Previously "-ssl" would create a temporary self-signed cert that Previously "-ssl" would create a temporary self-signed cert that
...@@ -1076,45 +1079,45 @@ make ...@@ -1076,45 +1079,45 @@ make
same x11vnc server. Use "-ssl TMP" to regain the previous same x11vnc server. Use "-ssl TMP" to regain the previous
behavior. Use "-ssl SAVE_NOPROMPT" to avoid being prompted about behavior. Use "-ssl SAVE_NOPROMPT" to avoid being prompted about
using passphrase when the certificate is created. using passphrase when the certificate is created.
* The option [172]-http_oneport enables single-port HTTP connections * The option [173]-http_oneport enables single-port HTTP connections
via the Java VNC Viewer. So, for example, the web browser URL via the Java VNC Viewer. So, for example, the web browser URL
"http://myhost.org:5900" works the same as "http://myhost.org:5900" works the same as
"http://myhost.org:5800", but with the convenience of only "http://myhost.org:5800", but with the convenience of only
involving one port instead of two. This works for both unencrypted involving one port instead of two. This works for both unencrypted
connections and for SSH tunnels (see [173]-httpsredir if the connections and for SSH tunnels (see [174]-httpsredir if the
tunnel port differs.) Note that HTTPS single-port operation in tunnel port differs.) Note that HTTPS single-port operation in
[174]-ssl SSL encrypted mode has been available since x11vnc [175]-ssl SSL encrypted mode has been available since x11vnc
version 0.8.3. version 0.8.3.
* For the [175]-avahi/[176]-zeroconf Service Advertizing mode, if * For the [176]-avahi/[177]-zeroconf Service Advertizing mode, if
x11vnc was not compiled with the avahi-client library, then an x11vnc was not compiled with the avahi-client library, then an
external helper program, either avahi-publish(1) (on Unix) or external helper program, either avahi-publish(1) (on Unix) or
dns-sd(1) (on Mac OS X), is used instead. dns-sd(1) (on Mac OS X), is used instead.
* The "[177]-rfbport PROMPT" option will prompt the user via the GUI * The "[178]-rfbport PROMPT" option will prompt the user via the GUI
to select the VNC port (e.g. 5901) to listen on, and a few other to select the VNC port (e.g. 5901) to listen on, and a few other
basic settings. This enables a handy GUI mode for naive users: basic settings. This enables a handy GUI mode for naive users:
x11vnc -gui tray=setpass -rfbport PROMPT -logfile $HOME/.x11vnc.log.%VNCDISP x11vnc -gui tray=setpass -rfbport PROMPT -logfile $HOME/.x11vnc.log.%VNCDISP
LAY LAY
suitable for putting in a launcher or menu, e.g. suitable for putting in a launcher or menu, e.g.
[178]x11vnc.desktop. The [179]-logfile expansion is new too. In [179]x11vnc.desktop. The [180]-logfile expansion is new too. In
the GUI, the tray=setpass Properties panel has been improved. the GUI, the tray=setpass Properties panel has been improved.
* The [180]-solid solid background color option now works for the * The [181]-solid solid background color option now works for the
Mac OS X console. Mac OS X console.
* The [181]-reopen option instructs x11vnc to try to reopen the X * The [182]-reopen option instructs x11vnc to try to reopen the X
display if it is prematurely closed by, say, the display manager display if it is prematurely closed by, say, the display manager
(e.g. [182]GDM.) (e.g. [183]GDM.)
Here are some features that appeared in the 0.9.5 release: Here are some features that appeared in the 0.9.5 release:
* Symmetric key [183]encryption ciphers. ARC4, AES-128, AES-256, * Symmetric key [184]encryption ciphers. ARC4, AES-128, AES-256,
blowfish, and 3des are supported. Salt and initialization vector blowfish, and 3des are supported. Salt and initialization vector
seeding is provided. These compliment the more widely used SSL and seeding is provided. These compliment the more widely used SSL and
SSH encryption access methods. [184]SSVNC also supports these SSH encryption access methods. [185]SSVNC also supports these
encryption modes. encryption modes.
* Scaling differently along the X- and Y-directions. E.g. * Scaling differently along the X- and Y-directions. E.g.
"[185]-scale 1280x1024" or "-scale 0.8x0.75" Also, "[186]-scale 1280x1024" or "-scale 0.8x0.75" Also,
"[186]-geometry WxH" is an alias for "-scale WxH" "[187]-geometry WxH" is an alias for "-scale WxH"
* By having SSVNC version 1.0.21 or later available in your $PATH, * By having SSVNC version 1.0.21 or later available in your $PATH,
the [187]-chatwindow option allows a UltraVNC Text Chat window to the [188]-chatwindow option allows a UltraVNC Text Chat window to
appear on the local X11 console/display (this way the remote appear on the local X11 console/display (this way the remote
viewer can chat with the person at the physical display; e.g. viewer can chat with the person at the physical display; e.g.
helpdesk mode.) This also works on the Mac OS X console if the helpdesk mode.) This also works on the Mac OS X console if the
...@@ -1126,47 +1129,47 @@ LAY ...@@ -1126,47 +1129,47 @@ LAY
Here are some features that appeared in the 0.9.4 release: Here are some features that appeared in the 0.9.4 release:
* Improvements to the [188]-find and [189]-create X session finding * Improvements to the [189]-find and [190]-create X session finding
or creating modes: new desktop types and service redirection or creating modes: new desktop types and service redirection
options. Personal cupsd daemon and SSH port redirection helper for options. Personal cupsd daemon and SSH port redirection helper for
use with [190]SSVNC's Terminal Services feature. use with [191]SSVNC's Terminal Services feature.
* Reverse VNC connections via [191]-connect work in the [192]-find, * Reverse VNC connections via [192]-connect work in the [193]-find,
[193]-create and related [194]-display WAIT:... modes. [194]-create and related [195]-display WAIT:... modes.
* Reverse VNC connections (either normal or SSL) can use a Web Proxy * Reverse VNC connections (either normal or SSL) can use a Web Proxy
or a SOCKS proxy, or a SSH connection, or even a CGI URL to make or a SOCKS proxy, or a SSH connection, or even a CGI URL to make
the outgoing connection. See: [195]-proxy. Forward connections can the outgoing connection. See: [196]-proxy. Forward connections can
also use: [196]-ssh. also use: [197]-ssh.
* Reverse VNC connections via the [197]UltraVNC repeater proxy * Reverse VNC connections via the [198]UltraVNC repeater proxy
(either normal or SSL) are supported. Use either the (either normal or SSL) are supported. Use either the
"[198]-connect repeater=ID:NNNN+host:port" or "[199]-connect "[199]-connect repeater=ID:NNNN+host:port" or "[200]-connect
repeater://host:port+ID:NNNN" notation. The [200]SSVNC VNC viewer repeater://host:port+ID:NNNN" notation. The [201]SSVNC VNC viewer
also supports the UltraVNC repeater. Also, a perl repeater also supports the UltraVNC repeater. Also, a perl repeater
implemention is here: [201]ultravnc_repeater.pl implemention is here: [202]ultravnc_repeater.pl
* Support for indexed colormaps (PseudoColor) with depths other than * Support for indexed colormaps (PseudoColor) with depths other than
8 (from 1 to 16 now work) for non-standard hardware. Option 8 (from 1 to 16 now work) for non-standard hardware. Option
"[202]-advertise_truecolor" to handle some workaround in this "[203]-advertise_truecolor" to handle some workaround in this
mode. mode.
* Support for the ZYWRLE encoding, this is the RealVNC ZRLE encoding * Support for the ZYWRLE encoding, this is the RealVNC ZRLE encoding
extended to do motion video and photo regions more efficiently by extended to do motion video and photo regions more efficiently by
way of a Wavelet based transformation. way of a Wavelet based transformation.
* The [203]-finddpy and [204]-listdpy utilities help to debug and * The [204]-finddpy and [205]-listdpy utilities help to debug and
configure the [205]-find, [206]-create, and [207]-display WAIT:... configure the [206]-find, [207]-create, and [208]-display WAIT:...
modes. modes.
* Some automatic detection of screen resizes are handled even if the * Some automatic detection of screen resizes are handled even if the
[208]-xrandr option is not supplied. [209]-xrandr option is not supplied.
* The [209]-autoport options gives more control over the VNC port * The [210]-autoport options gives more control over the VNC port
x11vnc chooses. x11vnc chooses.
* The [210]-ping secs can be used to help keep idle connections * The [211]-ping secs can be used to help keep idle connections
alive. alive.
* Pasting of the selection/clipboard into remote applications (e.g. * Pasting of the selection/clipboard into remote applications (e.g.
Java) has been improved. Java) has been improved.
* Fixed a bug if a client disconnects during the 'speed-estimation' * Fixed a bug if a client disconnects during the 'speed-estimation'
phase. phase.
* To unset Caps_Lock, Num_Lock and raise all keys in the X server * To unset Caps_Lock, Num_Lock and raise all keys in the X server
use [211]-clear_all. use [212]-clear_all.
* Usage with dvorak keyboards has been improved. See also: * Usage with dvorak keyboards has been improved. See also:
[212]-xkb. [213]-xkb.
* The [213]Java Viewer applet source code is now included in the * The [214]Java Viewer applet source code is now included in the
x11vnc-0.9.*.tar.gz tarball. This means you can now build the Java x11vnc-0.9.*.tar.gz tarball. This means you can now build the Java
viewer applet jar files from source. If you stopped shipping the viewer applet jar files from source. If you stopped shipping the
Java viewer applet jar files due to lack of source code, you can Java viewer applet jar files due to lack of source code, you can
...@@ -1174,7 +1177,7 @@ LAY ...@@ -1174,7 +1177,7 @@ LAY
Here are some features that appeared in the 0.9.3 release: Here are some features that appeared in the 0.9.3 release:
* [214]Viewer-side pixmap caching. A large area of pixels (at least * [215]Viewer-side pixmap caching. A large area of pixels (at least
2-3 times as big as the framebuffer itself; the bigger the 2-3 times as big as the framebuffer itself; the bigger the
better... default is 10X) is placed below the framebuffer to act better... default is 10X) is placed below the framebuffer to act
as a buffer/cache area for pixel data. The VNC CopyRect encoding as a buffer/cache area for pixel data. The VNC CopyRect encoding
...@@ -1182,7 +1185,7 @@ LAY ...@@ -1182,7 +1185,7 @@ LAY
Until we start modifying viewers you will be able to see the cache Until we start modifying viewers you will be able to see the cache
area if you scroll down (this makes it easier to debug!) For area if you scroll down (this makes it easier to debug!) For
testing the default is "-ncache 10". The unix Enhanced TightVNC testing the default is "-ncache 10". The unix Enhanced TightVNC
Viewer [215]ssvnc has a nice [216]-ycrop option to help hide the Viewer [216]ssvnc has a nice [217]-ycrop option to help hide the
pixel cache area from view. pixel cache area from view.
...@@ -1195,14 +1198,14 @@ LAY ...@@ -1195,14 +1198,14 @@ LAY
* If UltraVNC file transfer or chat is detected, then VNC clients * If UltraVNC file transfer or chat is detected, then VNC clients
are "pinged" more often to prevent these side channels from are "pinged" more often to prevent these side channels from
becoming serviced too infrequently. becoming serviced too infrequently.
* In [217]-unixpw mode in the username and password dialog no text * In [218]-unixpw mode in the username and password dialog no text
will be echoed if the first character sent is "Escape". This will be echoed if the first character sent is "Escape". This
enables a convenience feature in SSVNC to send the username and enables a convenience feature in SSVNC to send the username and
password automatically. password automatically.
Here are some features that appeared in the 0.9.1 release: Here are some features that appeared in the 0.9.1 release:
* The [218]UltraVNC Java viewer has been enhanced to support SSL (as * The [219]UltraVNC Java viewer has been enhanced to support SSL (as
the TightVNC viewer had been previously.) The UltraVNC Java the TightVNC viewer had been previously.) The UltraVNC Java
supports ultravnc filetransfer, and so can be used as a VNC viewer supports ultravnc filetransfer, and so can be used as a VNC viewer
on Unix that supports ultravnc filetransfer. It is in the on Unix that supports ultravnc filetransfer. It is in the
...@@ -1213,12 +1216,12 @@ LAY ...@@ -1213,12 +1216,12 @@ LAY
Some other bugs in the UltraVNC Java viewer were fixed and a few Some other bugs in the UltraVNC Java viewer were fixed and a few
improvements to the UI made. improvements to the UI made.
* A new Unix username login mode for VNC Viewers authenticated via a * A new Unix username login mode for VNC Viewers authenticated via a
Client SSL Certificate: "[219]-users sslpeer=". The emailAddress Client SSL Certificate: "[220]-users sslpeer=". The emailAddress
subject field is inspected for username@hostname and then acts as subject field is inspected for username@hostname and then acts as
though "-users +username" has been supplied. This way the Unix though "-users +username" has been supplied. This way the Unix
username is identified by (i.e. simply extracted from) the Client username is identified by (i.e. simply extracted from) the Client
SSL Certificate. This could be useful with [220]-find, SSL Certificate. This could be useful with [221]-find,
[221]-create and [222]-svc modes if you are also have set up and [222]-create and [223]-svc modes if you are also have set up and
use VNC Client SSL Certificate authentication. use VNC Client SSL Certificate authentication.
* For external display finding/creating programs (e.g. WAIT:cmd=...) * For external display finding/creating programs (e.g. WAIT:cmd=...)
if the VNC Viewer is authenticated via a Client SSL Certificate, if the VNC Viewer is authenticated via a Client SSL Certificate,
...@@ -1227,41 +1230,41 @@ LAY ...@@ -1227,41 +1230,41 @@ LAY
Here are some features that appeared in the 0.9 release: Here are some features that appeared in the 0.9 release:
* [223]VNC Service advertising via mDNS / ZeroConf / BonJour with * [224]VNC Service advertising via mDNS / ZeroConf / BonJour with
the [224]Avahi client library. Enable via "[225]-avahi" or the [225]Avahi client library. Enable via "[226]-avahi" or
"[226]-zeroconf". "[227]-zeroconf".
* Implementations of UltraVNC's TextChat, SingleWindow, and * Implementations of UltraVNC's TextChat, SingleWindow, and
ServerInput extensions (requires ultravnc viewer or [227]ssvnc ServerInput extensions (requires ultravnc viewer or [228]ssvnc
Unix viewer.) They toggle the selection of a single window Unix viewer.) They toggle the selection of a single window
([228]-id), and disable (friendly) user input and viewing (monitor ([229]-id), and disable (friendly) user input and viewing (monitor
blank) at the VNC server. blank) at the VNC server.
* Short aliases "[229]-find", "[230]-create", "[231]-svc", and * Short aliases "[230]-find", "[231]-create", "[232]-svc", and
"[232]-xdmsvc" for commonly used FINDCREATEDISPLAY usage modes. "[233]-xdmsvc" for commonly used FINDCREATEDISPLAY usage modes.
* Reverse VNC connections (viewer listening) now work in SSL * Reverse VNC connections (viewer listening) now work in SSL
([233]-ssl) mode. ([234]-ssl) mode.
* New options to control the Monitor power state and keyboard/mouse * New options to control the Monitor power state and keyboard/mouse
grabbing: [234]-forcedpms, [235]-clientdpms, [236]-noserverdpms, grabbing: [235]-forcedpms, [236]-clientdpms, [237]-noserverdpms,
and [237]-grabalways. and [238]-grabalways.
* A simple way to emulate inetd(8) to some degree via the * A simple way to emulate inetd(8) to some degree via the
"[238]-loopbg" option. "[239]-loopbg" option.
* Monitor the accuracy of XDAMAGE and apply "[239]-noxdamage" if it * Monitor the accuracy of XDAMAGE and apply "[240]-noxdamage" if it
is not working well. OpenGL applications like like [240]beryl and is not working well. OpenGL applications like like [241]beryl and
MythTv have been shown to make XDAMAGE not work properly. MythTv have been shown to make XDAMAGE not work properly.
* For Java SSL connections involving a router/firewall port * For Java SSL connections involving a router/firewall port
redirection, an option [241]-httpsredir to spare the user from redirection, an option [242]-httpsredir to spare the user from
needing to include &PORT=NNN in the browser URL. needing to include &PORT=NNN in the browser URL.
Here are some features that appeared in the 0.8.4 release: Here are some features that appeared in the 0.8.4 release:
* Native [242]Mac OS X Aqua/Quartz support. (i.e. OSXvnc * Native [243]Mac OS X Aqua/Quartz support. (i.e. OSXvnc
alternative; some activities are faster) alternative; some activities are faster)
* A [243]new login mode: "-display WAIT:cmd=FINDCREATEDISPLAY * A [244]new login mode: "-display WAIT:cmd=FINDCREATEDISPLAY
-unixpw ..." that will Create a new X session (either virtual or -unixpw ..." that will Create a new X session (either virtual or
real and with or without a display manager, e.g. kdm) for the user real and with or without a display manager, e.g. kdm) for the user
if it cannot find the user's X session display via the FINDDISPLAY if it cannot find the user's X session display via the FINDDISPLAY
method. See the [244]-svc and the [245]-xdmsvc aliases. method. See the [245]-svc and the [246]-xdmsvc aliases.
* x11vnc can act as a VNC [246]reflector/repeater using the * x11vnc can act as a VNC [247]reflector/repeater using the
"[247]-reflect host:N" option. Instead of polling an X display, "[248]-reflect host:N" option. Instead of polling an X display,
the remote VNC Server host:N is connected to and re-exported via the remote VNC Server host:N is connected to and re-exported via
VNC. This is intended for use in broadcasting a display to many VNC. This is intended for use in broadcasting a display to many
(e.g. > 16; classroom or large demo) VNC viewers where bandwidth (e.g. > 16; classroom or large demo) VNC viewers where bandwidth
...@@ -1269,16 +1272,16 @@ LAY ...@@ -1269,16 +1272,16 @@ LAY
number of repeaters. number of repeaters.
* Wireframe copyrect detection for local user activity (e.g. someone * Wireframe copyrect detection for local user activity (e.g. someone
sitting at the physical display moving windows) Use sitting at the physical display moving windows) Use
[248]-nowireframelocal to disable. [249]-nowireframelocal to disable.
* The "[249]-N" option couples the VNC Display number to the X * The "[250]-N" option couples the VNC Display number to the X
Display number. E.g. if your X DISPLAY is :2 then the VNC display Display number. E.g. if your X DISPLAY is :2 then the VNC display
will be :2 (i.e. using port 5902.) If that port is taken x11vnc will be :2 (i.e. using port 5902.) If that port is taken x11vnc
will exit. will exit.
* Option [250]-nodpms to avoid problems with programs like KDE's * Option [251]-nodpms to avoid problems with programs like KDE's
kdesktop_lock that keep restarting the screen saver every few kdesktop_lock that keep restarting the screen saver every few
seconds. seconds.
* To automatically fix the common mouse motion problem on XINERAMA * To automatically fix the common mouse motion problem on XINERAMA
(multi-headed) displays, the [251]-xwarppointer option is enabled (multi-headed) displays, the [252]-xwarppointer option is enabled
by default when XINERAMA is active. by default when XINERAMA is active.
If you have a Mac please try out the native Mac OS X support, build If you have a Mac please try out the native Mac OS X support, build
...@@ -1288,62 +1291,62 @@ LAY ...@@ -1288,62 +1291,62 @@ LAY
Here are some features that appeared in the 0.8.3 release: Here are some features that appeared in the 0.8.3 release:
* The [252]-ssl option provides SSL encryption and authentication * The [253]-ssl option provides SSL encryption and authentication
natively via the [253]www.openssl.org library. One can use from a natively via the [254]www.openssl.org library. One can use from a
simple self-signed certificate server certificate up to full CA simple self-signed certificate server certificate up to full CA
and client certificate authentication schemes. and client certificate authentication schemes.
* Similar to -ssl, the [254]-stunnel option starts up a SSL tunnel * Similar to -ssl, the [255]-stunnel option starts up a SSL tunnel
server stunnel (that must be installed separately on the system: server stunnel (that must be installed separately on the system:
[255]stunnel.mirt.net ) to allow only encrypted SSL connections [256]stunnel.mirt.net ) to allow only encrypted SSL connections
from the network. from the network.
* The [256]-sslverify option allows for authenticating VNC clients * The [257]-sslverify option allows for authenticating VNC clients
via their certificates in either -ssl or -stunnel modes. via their certificates in either -ssl or -stunnel modes.
* Certificate creation and management tools are provide in the * Certificate creation and management tools are provide in the
[257]-sslGenCert, [258]-sslGenCA, and [259]related options. [258]-sslGenCert, [259]-sslGenCA, and [260]related options.
* An SSL enabled Java applet VNC Viewer applet is provided by x11vnc * An SSL enabled Java applet VNC Viewer applet is provided by x11vnc
in classes/ssl/VncViewer.jar. In addition to normal HTTP, the in classes/ssl/VncViewer.jar. In addition to normal HTTP, the
applet may be loaded into the web browser via HTTPS (HTTP over applet may be loaded into the web browser via HTTPS (HTTP over
SSL.) (one can use the VNC port, e.g. https://host:5900/, or also SSL.) (one can use the VNC port, e.g. https://host:5900/, or also
the separate [260]-https port option.) A wrapper shell script the separate [261]-https port option.) A wrapper shell script
[261]ss_vncviewer is also provided that sets up a stunnel [262]ss_vncviewer is also provided that sets up a stunnel
client-side tunnel on Unix systems. See [262]Enhanced TightVNC client-side tunnel on Unix systems. See [263]Enhanced TightVNC
Viewer (SSVNC) for other SSL/SSH viewer possibilities. Viewer (SSVNC) for other SSL/SSH viewer possibilities.
* The [263]-unixpw option supports Unix username and password * The [264]-unixpw option supports Unix username and password
authentication (a simpler variant is the [264]-unixpw_nis option authentication (a simpler variant is the [265]-unixpw_nis option
that works in environments where the encrypted passwords are that works in environments where the encrypted passwords are
readable, e.g. NIS.) The [265]-ssl or [266]-localhost + readable, e.g. NIS.) The [266]-ssl or [267]-localhost +
[267]-stunnel options are enforced in this mode to prevent [268]-stunnel options are enforced in this mode to prevent
password sniffing. As a convenience, these requirements are lifted password sniffing. As a convenience, these requirements are lifted
if a SSH tunnel can be deduced (but -localhost still applies.) if a SSH tunnel can be deduced (but -localhost still applies.)
* Coupling [268]-unixpw with "[269]-display WAIT:cmd=FINDDISPLAY" or * Coupling [269]-unixpw with "[270]-display WAIT:cmd=FINDDISPLAY" or
"-display WAIT:cmd=FINDCREATEDISPLAY" provides a way to allow a "-display WAIT:cmd=FINDCREATEDISPLAY" provides a way to allow a
user to login with their UNIX password and have their display user to login with their UNIX password and have their display
connected to [270]automatically. See the [271]-svc and the connected to [271]automatically. See the [272]-svc and the
[272]-xdmsvc aliases. [273]-xdmsvc aliases.
* Hooks are provided in the [273]-unixpw_cmd and "[274]-passwdfile * Hooks are provided in the [274]-unixpw_cmd and "[275]-passwdfile
cmd:,custom:..." options to allow you to supply your own cmd:,custom:..." options to allow you to supply your own
authentication and password lookup programs. authentication and password lookup programs.
* x11vnc can be configured and built to not depend on X11 libraries * x11vnc can be configured and built to not depend on X11 libraries
"./configure --without-x" for [275]-rawfb only operation (e.g. "./configure --without-x" for [276]-rawfb only operation (e.g.
embedded linux console devices.) embedded linux console devices.)
* The [276]-rotate option enables you to rotate or reflect the * The [277]-rotate option enables you to rotate or reflect the
screen before exporting via VNC. This is intended for use on screen before exporting via VNC. This is intended for use on
handhelds and other devices where the rotation orientation is not handhelds and other devices where the rotation orientation is not
"natural". "natural".
* The "[277]-ultrafilexfer" alias is provided and improved UltraVNC * The "[278]-ultrafilexfer" alias is provided and improved UltraVNC
filetransfer rates have been achieved. filetransfer rates have been achieved.
* Under the "[278]-connect_or_exit host" option x11vnc will exit * Under the "[279]-connect_or_exit host" option x11vnc will exit
immediately unless the reverse connection to host succeeds. The immediately unless the reverse connection to host succeeds. The
"-rfbport 0" option disables TCP listening for connections (useful "-rfbport 0" option disables TCP listening for connections (useful
for this mode.) for this mode.)
* The "[279]-rawfb rand" and "-rawfb none" options are useful for * The "[280]-rawfb rand" and "-rawfb none" options are useful for
testing automation scripts, etc., without requiring a full testing automation scripts, etc., without requiring a full
desktop. desktop.
* Reduced spewing of information at startup, use "[280]-verbose" * Reduced spewing of information at startup, use "[281]-verbose"
(also "-v") to turn it back on for debugging or if you are going (also "-v") to turn it back on for debugging or if you are going
to send me a problem report. to send me a problem report.
Here are some [281]Previous Release Notes Here are some [282]Previous Release Notes
_________________________________________________________________ _________________________________________________________________
Some Notes: Some Notes:
...@@ -1370,13 +1373,13 @@ LAY ...@@ -1370,13 +1373,13 @@ LAY
protocol.) I suggest using xsetroot, dtstyle or similar utility to set protocol.) I suggest using xsetroot, dtstyle or similar utility to set
a solid background while using x11vnc. You can turn the pretty a solid background while using x11vnc. You can turn the pretty
background image back on when you are using the display directly. background image back on when you are using the display directly.
Update: As of Feb/2005 x11vnc has the [282]-solid [color] option that Update: As of Feb/2005 x11vnc has the [283]-solid [color] option that
works on recent GNOME, KDE, and CDE and also on classic X (background works on recent GNOME, KDE, and CDE and also on classic X (background
image is on the root window.) Update: As of Oct/2007 x11vnc has the image is on the root window.) Update: As of Oct/2007 x11vnc has the
[283]-ncache option that does a reasonable job caching the background [284]-ncache option that does a reasonable job caching the background
(and other) pixmap data on the viewer side. (and other) pixmap data on the viewer side.
I also find the [284]TightVNC encoding gives the best response for my I also find the [285]TightVNC encoding gives the best response for my
usage (Unix <-> Unix over cable modem.) One needs a tightvnc-aware usage (Unix <-> Unix over cable modem.) One needs a tightvnc-aware
vncviewer to take advantage of this encoding. vncviewer to take advantage of this encoding.
...@@ -1388,17 +1391,17 @@ LAY ...@@ -1388,17 +1391,17 @@ LAY
is X11's default listening port.) Had port 5900 been taken by some is X11's default listening port.) Had port 5900 been taken by some
other application, x11vnc would have next tried 5901. That would mean other application, x11vnc would have next tried 5901. That would mean
the viewer command above should be changed to vncviewer the viewer command above should be changed to vncviewer
far-away.east:1. You can force the port with the "[285]-rfbport NNNN" far-away.east:1. You can force the port with the "[286]-rfbport NNNN"
option where NNNN is the desired port number. If that port is already option where NNNN is the desired port number. If that port is already
taken, x11vnc will exit immediately. The "[286]-N" option will try to taken, x11vnc will exit immediately. The "[287]-N" option will try to
match the VNC display number to the X display. (also see the "SunRay match the VNC display number to the X display. (also see the "SunRay
Gotcha" note below) Gotcha" note below)
Options: x11vnc has (far too) many features that may be activated Options: x11vnc has (far too) many features that may be activated
via its [287]command line options. Useful options are, e.g., -scale to via its [288]command line options. Useful options are, e.g., -scale to
do server-side scaling, and -rfbauth passwd-file to use VNC password do server-side scaling, and -rfbauth passwd-file to use VNC password
protection (the vncpasswd or storepasswd programs, or the x11vnc protection (the vncpasswd or storepasswd programs, or the x11vnc
[288]-storepasswd option can be used to create the password file.) [289]-storepasswd option can be used to create the password file.)
Algorithm: How does x11vnc do it? Rather brute-forcedly: it Algorithm: How does x11vnc do it? Rather brute-forcedly: it
continuously polls the X11 framebuffer for changes using continuously polls the X11 framebuffer for changes using
...@@ -1426,7 +1429,7 @@ LAY ...@@ -1426,7 +1429,7 @@ LAY
first testing out the programs. You get an interesting first testing out the programs. You get an interesting
recursive/feedback effect where vncviewer images keep popping up each recursive/feedback effect where vncviewer images keep popping up each
one contained in the previous one and slightly shifted a bit by the one contained in the previous one and slightly shifted a bit by the
window manager decorations. There will be an [289]even more window manager decorations. There will be an [290]even more
interesting effect if -scale is used. Also, if the XKEYBOARD is interesting effect if -scale is used. Also, if the XKEYBOARD is
supported and the XBell "beeps" once, you get an infinite loop of supported and the XBell "beeps" once, you get an infinite loop of
beeps going off. Although all of this is mildly exciting it is not beeps going off. Although all of this is mildly exciting it is not
...@@ -1436,8 +1439,8 @@ LAY ...@@ -1436,8 +1439,8 @@ LAY
Sun Ray Notes: Sun Ray Notes:
You can run x11vnc on your (connected or disconnected) [290]SunRay You can run x11vnc on your (connected or disconnected) [291]SunRay
session. Here are some [291]notes on SunRay usage with x11vnc. session. Here are some [292]notes on SunRay usage with x11vnc.
_________________________________________________________________ _________________________________________________________________
...@@ -1449,7 +1452,7 @@ LAY ...@@ -1449,7 +1452,7 @@ LAY
than you normally do to minimize the effects (e.g. do fullpage than you normally do to minimize the effects (e.g. do fullpage
paging rather than line-by-line scrolling, and move windows in a paging rather than line-by-line scrolling, and move windows in a
single, quick motion.) Recent work has provided the single, quick motion.) Recent work has provided the
[292]-scrollcopyrect and [293]-wireframe speedups using the [293]-scrollcopyrect and [294]-wireframe speedups using the
CopyRect VNC encoding and other things, but they only speed up CopyRect VNC encoding and other things, but they only speed up
some activities, not all. some activities, not all.
* A rate limiting factor for x11vnc performance is that graphics * A rate limiting factor for x11vnc performance is that graphics
...@@ -1508,18 +1511,18 @@ LAY ...@@ -1508,18 +1511,18 @@ LAY
but we mention it because it may be of use for special purpose but we mention it because it may be of use for special purpose
applications. You may need to use the "-cc 4" option to force Xvfb applications. You may need to use the "-cc 4" option to force Xvfb
to use a TrueColor visual instead of DirectColor. See also the to use a TrueColor visual instead of DirectColor. See also the
description of the [294]-create option that does all of this description of the [295]-create option that does all of this
automatically for you. automatically for you.
Also, a faster and more accurate way is to use the "dummy" Also, a faster and more accurate way is to use the "dummy"
Xorg/XFree86 device driver (or our Xdummy wrapper script.) See Xorg/XFree86 device driver (or our Xdummy wrapper script.) See
[295]this FAQ for details. [296]this FAQ for details.
* Somewhat surprisingly, the X11 mouse (cursor) shape is write-only * Somewhat surprisingly, the X11 mouse (cursor) shape is write-only
and cannot be queried from the X server. So traditionally in and cannot be queried from the X server. So traditionally in
x11vnc the cursor shape stays fixed at an arrow. (see the "-cursor x11vnc the cursor shape stays fixed at an arrow. (see the "-cursor
X" and "-cursor some" [296]options, however, for a partial hack X" and "-cursor some" [297]options, however, for a partial hack
for the root window, etc.) However, on Solaris using the SUN_OVL for the root window, etc.) However, on Solaris using the SUN_OVL
overlay extension, x11vnc can show the correct mouse cursor when overlay extension, x11vnc can show the correct mouse cursor when
the [297]-overlay option is also supplied. A similar thing is done the [298]-overlay option is also supplied. A similar thing is done
on IRIX as well when -overlay is supplied. on IRIX as well when -overlay is supplied.
More generally, as of Dec/2004 x11vnc supports the new XFIXES More generally, as of Dec/2004 x11vnc supports the new XFIXES
extension (in Xorg and Solaris 10) to query the X server for the extension (in Xorg and Solaris 10) to query the X server for the
...@@ -1527,18 +1530,18 @@ LAY ...@@ -1527,18 +1530,18 @@ LAY
with transparency (alpha channel) need to approximated to solid with transparency (alpha channel) need to approximated to solid
RGB values (some cursors look worse than others.) RGB values (some cursors look worse than others.)
* Audio from applications is of course not redirected (separate * Audio from applications is of course not redirected (separate
redirectors do exist, e.g. esd, see [298]the FAQ on this below.) redirectors do exist, e.g. esd, see [299]the FAQ on this below.)
The XBell() "beeps" will work if the X server supports the The XBell() "beeps" will work if the X server supports the
XKEYBOARD extension. (Note that on Solaris XKEYBOARD is disabled XKEYBOARD extension. (Note that on Solaris XKEYBOARD is disabled
by default. Passing +kb to Xsun enables it.) by default. Passing +kb to Xsun enables it.)
* The scroll detection algorithm for the [299]-scrollcopyrect option * The scroll detection algorithm for the [300]-scrollcopyrect option
can give choppy or bunched up transient output and occasionally can give choppy or bunched up transient output and occasionally
painting errors. painting errors.
* Using -threads can expose some bugs/crashes in libvncserver. * Using -threads can expose some bugs/crashes in libvncserver.
Please feel free to [300]contact me if you have any questions, Please feel free to [301]contact me if you have any questions,
problems, or comments about x11vnc, etc. problems, or comments about x11vnc, etc.
Also, some people ask if they can make a donation, see [301]this link Also, some people ask if they can make a donation, see [302]this link
for that. for that.
References References
...@@ -1664,186 +1667,187 @@ References ...@@ -1664,186 +1667,187 @@ References
119. http://www.karlrunge.com/x11vnc/faq.html#faq-ssl-tunnel-ext 119. http://www.karlrunge.com/x11vnc/faq.html#faq-ssl-tunnel-ext
120. http://www.karlrunge.com/x11vnc/ssvnc.html 120. http://www.karlrunge.com/x11vnc/ssvnc.html
121. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-enc 121. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-enc
122. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_system_greeter 122. http://www.karlrunge.com/x11vnc/Xdummy
123. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc 123. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_system_greeter
124. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-extra_fbur 124. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc
125. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer 125. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-extra_fbur
126. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait 126. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-defer
127. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nonap 127. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wait
128. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allinput 128. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nonap
129. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-findauth 129. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-allinput
130. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth 130. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-findauth
131. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display_WAIT 131. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-auth
132. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find 132. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display_WAIT
133. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 133. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find
134. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_cmd 134. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
135. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_nis 135. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_cmd
136. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel 136. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_nis
137. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 137. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel
138. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 138. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
139. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslverify 139. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
140. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslCRL 140. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslverify
141. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel 141. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslCRL
142. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-appshare 142. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel
143. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote 143. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-appshare
144. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui 144. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-remote
145. http://ubuntuforums.org/showthread.php?t=1223490 145. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-gui
146. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads 146. http://ubuntuforums.org/showthread.php?t=1223490
147. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reflect 147. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-threads
148. http://bugs.freedesktop.org/show_bug.cgi?id=21454 148. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reflect
149. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-repeat 149. http://bugs.freedesktop.org/show_bug.cgi?id=21454
150. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip 150. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-repeat
151. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb 151. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clip
152. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb 152. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb
153. http://www.virtualgl.org/ 153. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb
154. http://www.karlrunge.com/x11vnc/faq.html#faq-turbovnc 154. http://www.virtualgl.org/
155. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache_cr 155. http://www.karlrunge.com/x11vnc/faq.html#faq-turbovnc
156. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache 156. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache_cr
157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rmflag 157. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache
158. http://sourceforge.net/projects/vencrypt/ 158. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rmflag
159. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 159. http://sourceforge.net/projects/vencrypt/
160. http://www.karlrunge.com/x11vnc/ssvnc.html 160. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
161. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw 161. http://www.karlrunge.com/x11vnc/ssvnc.html
162. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vencrypt 162. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw
163. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-anontls 163. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vencrypt
164. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslonly 164. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-anontls
165. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 165. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslonly
166. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vencrypt 166. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
167. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-anontls 167. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-vencrypt
168. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslCRL 168. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-anontls
169. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCA 169. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslCRL
170. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCert 170. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCA
171. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 171. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCert
172. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-http_oneport 172. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
173. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpsredir 173. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-http_oneport
174. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 174. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpsredir
175. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-avahi 175. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-zeroconf 176. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-avahi
177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport 177. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-zeroconf
178. http://www.karlrunge.com/x11vnc/x11vnc.desktop 178. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
179. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o 179. http://www.karlrunge.com/x11vnc/x11vnc.desktop
180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid 180. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-o
181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reopen 181. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
182. http://www.karlrunge.com/x11vnc/faq.html#infaq_gdm 182. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reopen
183. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-enc 183. http://www.karlrunge.com/x11vnc/faq.html#infaq_gdm
184. http://www.karlrunge.com/x11vnc/ssvnc.html 184. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-enc
185. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale 185. http://www.karlrunge.com/x11vnc/ssvnc.html
186. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-geometry 186. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scale
187. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-chatwindow 187. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-geometry
188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find 188. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-chatwindow
189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 189. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find
190. http://www.karlrunge.com/x11vnc/ssvnc.html 190. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
191. http://www.karlrunge.com/x11vnc/faq.html#faq-reverse-connect 191. http://www.karlrunge.com/x11vnc/ssvnc.html
192. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find 192. http://www.karlrunge.com/x11vnc/faq.html#faq-reverse-connect
193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 193. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find
194. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay 194. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
195. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-proxy 195. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay
196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssh 196. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-proxy
197. http://www.uvnc.com/addons/repeater.html 197. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssh
198. http://www.karlrunge.com/x11vnc/faq.html#faq-reverse-connect 198. http://www.uvnc.com/addons/repeater.html
199. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect 199. http://www.karlrunge.com/x11vnc/faq.html#faq-reverse-connect
200. http://www.karlrunge.com/x11vnc/ssvnc.html 200. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect
201. http://www.karlrunge.com/x11vnc/ultravnc_repeater.pl 201. http://www.karlrunge.com/x11vnc/ssvnc.html
202. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-advertise_truecolor 202. http://www.karlrunge.com/x11vnc/ultravnc_repeater.pl
203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-finddpy 203. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-advertise_truecolor
204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listdpy 204. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-finddpy
205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find 205. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-listdpy
206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 206. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find
207. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay 207. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
208. http://www.karlrunge.com/x11vnc/faq.html#faq-xrandr 208. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay
209. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-autoport 209. http://www.karlrunge.com/x11vnc/faq.html#faq-xrandr
210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ping 210. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-autoport
211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_all 211. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ping
212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb 212. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clear_all
213. http://www.karlrunge.com/x11vnc/faq.html#faq-ssl-tunnel-viewers 213. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xkb
214. http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching 214. http://www.karlrunge.com/x11vnc/faq.html#faq-ssl-tunnel-viewers
215. http://www.karlrunge.com/x11vnc/ssvnc.html 215. http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
216. http://www.karlrunge.com/x11vnc/ssvnc.html#ycrop 216. http://www.karlrunge.com/x11vnc/ssvnc.html
217. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw 217. http://www.karlrunge.com/x11vnc/ssvnc.html#ycrop
218. http://www.ultravnc.com/ 218. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw
219. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users 219. http://www.ultravnc.com/
220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 220. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-users
221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 221. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 222. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
223. http://www.karlrunge.com/x11vnc/faq.html#faq-avahi 223. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
224. http://www.avahi.org/ 224. http://www.karlrunge.com/x11vnc/faq.html#faq-avahi
225. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-avahi 225. http://www.avahi.org/
226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-zeroconf 226. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-avahi
227. http://www.karlrunge.com/x11vnc/ssvnc.html 227. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-zeroconf
228. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id 228. http://www.karlrunge.com/x11vnc/ssvnc.html
229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find 229. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-id
230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create 230. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-find
231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc 231. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-create
232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc 232. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc
233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 233. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc
234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forcedpms 234. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clientdpms 235. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-forcedpms
236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noserverdpms 236. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-clientdpms
237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-grabalways 237. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noserverdpms
238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-loop 238. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-grabalways
239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage 239. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-loop
240. http://www.karlrunge.com/x11vnc/faq.html#faq-beryl 240. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-noxdamage
241. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpsredir 241. http://www.karlrunge.com/x11vnc/faq.html#faq-beryl
242. http://www.karlrunge.com/x11vnc/faq.html#faq-macosx 242. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-httpsredir
243. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay 243. http://www.karlrunge.com/x11vnc/faq.html#faq-macosx
244. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc 244. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay
245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc 245. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc
246. http://www.karlrunge.com/x11vnc/faq.html#faq-reflect 246. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc
247. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reflect 247. http://www.karlrunge.com/x11vnc/faq.html#faq-reflect
248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nowireframelocal 248. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-reflect
249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-N 249. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nowireframelocal
250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodpms 250. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-N
251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer 251. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-nodpms
252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 252. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xwarppointer
253. http://www.openssl.org/ 253. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
254. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel 254. http://www.openssl.org/
255. http://stunnel.mirt.net/ 255. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel
256. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslverify 256. http://stunnel.mirt.net/
257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCert 257. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslverify
258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCA 258. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCert
259. http://www.karlrunge.com/x11vnc/ssl.html 259. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-sslGenCA
260. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-https 260. http://www.karlrunge.com/x11vnc/ssl.html
261. http://www.karlrunge.com/x11vnc/faq.html#infaq_ss_vncviewer 261. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-https
262. http://www.karlrunge.com/x11vnc/ssvnc.html 262. http://www.karlrunge.com/x11vnc/faq.html#infaq_ss_vncviewer
263. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw 263. http://www.karlrunge.com/x11vnc/ssvnc.html
264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_nis 264. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw
265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl 265. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_nis
266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost 266. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ssl
267. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel 267. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-localhost
268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw 268. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-stunnel
269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display_WAIT 269. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw
270. http://www.karlrunge.com/x11vnc/faq.html#faq-userlogin 270. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-display_WAIT
271. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc 271. http://www.karlrunge.com/x11vnc/faq.html#faq-userlogin
272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc 272. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-svc
273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_cmd 273. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-xdmsvc
274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile 274. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-unixpw_cmd
275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb 275. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-passwdfile
276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rotate 276. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb
277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ultrafilexfer 277. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rotate
278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect_or_exit 278. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ultrafilexfer
279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb 279. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-connect_or_exit
280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-v, 280. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rawfb
281. http://www.karlrunge.com/x11vnc/prevrels.html 281. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-v,
282. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid 282. http://www.karlrunge.com/x11vnc/prevrels.html
283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache 283. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-solid
284. http://www.tightvnc.com/ 284. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-ncache
285. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport 285. http://www.tightvnc.com/
286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-N 286. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-rfbport
287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html 287. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-N
288. http://www.karlrunge.com/x11vnc/faq.html#faq-passwd 288. http://www.karlrunge.com/x11vnc/x11vnc_opts.html
289. http://www.karlrunge.com/x11vnc/recurse_x11vnc.jpg 289. http://www.karlrunge.com/x11vnc/faq.html#faq-passwd
290. http://www.sun.com/sunray/index.html 290. http://www.karlrunge.com/x11vnc/recurse_x11vnc.jpg
291. http://www.karlrunge.com/x11vnc/sunray.html 291. http://www.sun.com/sunray/index.html
292. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect 292. http://www.karlrunge.com/x11vnc/sunray.html
293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe 293. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
294. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay 294. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-wireframe
295. http://www.karlrunge.com/x11vnc/faq.html#faq-xvfb 295. http://www.karlrunge.com/x11vnc/faq.html#infaq_findcreatedisplay
296. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor 296. http://www.karlrunge.com/x11vnc/faq.html#faq-xvfb
297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay 297. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-cursor
298. http://www.karlrunge.com/x11vnc/faq.html#faq-sound 298. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-overlay
299. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect 299. http://www.karlrunge.com/x11vnc/faq.html#faq-sound
300. mailto:xvml@karlrunge.com 300. http://www.karlrunge.com/x11vnc/x11vnc_opts.html#opt-scrollcopyrect
301. http://www.karlrunge.com/x11vnc/faq.html#faq-thanks 301. mailto:xvml@karlrunge.com
302. http://www.karlrunge.com/x11vnc/faq.html#faq-thanks
======================================================================= =======================================================================
http://www.karlrunge.com/x11vnc/faq.html: http://www.karlrunge.com/x11vnc/faq.html:
...@@ -2655,7 +2659,7 @@ typedef unsigned int in_addr_t; ...@@ -2655,7 +2659,7 @@ typedef unsigned int in_addr_t;
up the Java VNC Viewer jar file (either SSL enabled or regular one), up the Java VNC Viewer jar file (either SSL enabled or regular one),
then you will need to extract the classes subdirectory from the source then you will need to extract the classes subdirectory from the source
tarball and point x11vnc to it via the [161]-httpdir option. E.g.: tarball and point x11vnc to it via the [161]-httpdir option. E.g.:
x11vnc -httpdir /path/to/x11vnc-0.8.3/classes/ssl ... x11vnc -httpdir /path/to/x11vnc-0.9.9/classes/ssl ...
Q-6: Where can I get a VNC Viewer binary (or source code) for the Q-6: Where can I get a VNC Viewer binary (or source code) for the
...@@ -9279,8 +9283,8 @@ References ...@@ -9279,8 +9283,8 @@ References
143. http://www.karlrunge.com/x11vnc/index.html#building 143. http://www.karlrunge.com/x11vnc/index.html#building
144. http://www.karlrunge.com/x11vnc/faq.html#faq-build 144. http://www.karlrunge.com/x11vnc/faq.html#faq-build
145. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc 145. http://www.linuxpackages.net/search_view.php?by=name&name=x11vnc
146. http://software.opensuse.org/search?baseproject=openSUSE%3A11.1&p=1&q=x11vnc 146. http://software.opensuse.org/search?baseproject=openSUSE%3A11.2&p=1&q=x11vnc
147. http://gentoo-wiki.com/HOWTO_Use_VNC_to_connect_to_existing_X_Sessions 147. http://en.gentoo-wiki.com/wiki/X11VNC
148. http://gentoo-portage.com/x11-misc/x11vnc 148. http://gentoo-portage.com/x11-misc/x11vnc
149. http://www.freebsd.org/cgi/ports.cgi?query=x11vnc&stype=all 149. http://www.freebsd.org/cgi/ports.cgi?query=x11vnc&stype=all
150. http://www.freshports.org/net/x11vnc 150. http://www.freshports.org/net/x11vnc
...@@ -12919,7 +12923,7 @@ x11vnc: a VNC server for real X displays ...@@ -12919,7 +12923,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options: Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions) % x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.9.10 lastmod: 2009-12-24 x11vnc: allow VNC connections to real X11 displays. 0.9.10 lastmod: 2009-12-27
x11vnc options: x11vnc options:
-display disp -auth file -N -display disp -auth file -N
...@@ -13047,7 +13051,7 @@ libvncserver-tight-extension options: ...@@ -13047,7 +13051,7 @@ libvncserver-tight-extension options:
% x11vnc -help % x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.9.10 lastmod: 2009-12-24 x11vnc: allow VNC connections to real X11 displays. 0.9.10 lastmod: 2009-12-27
(type "x11vnc -opts" to just list the options.) (type "x11vnc -opts" to just list the options.)
......
...@@ -563,6 +563,9 @@ static void be_helper_pid(char *dpy_str) { ...@@ -563,6 +563,9 @@ static void be_helper_pid(char *dpy_str) {
if (ms < 50) ms = 50; if (ms < 50) ms = 50;
#if NO_X11
fprintf(stderr, "be_helper_pid: not compiled with X11.\n");
#else
dpy = XOpenDisplay(dpy_str); dpy = XOpenDisplay(dpy_str);
ticker_atom = XInternAtom(dpy, ticker_atom_str, False); ticker_atom = XInternAtom(dpy, ticker_atom_str, False);
...@@ -583,6 +586,7 @@ static void be_helper_pid(char *dpy_str) { ...@@ -583,6 +586,7 @@ static void be_helper_pid(char *dpy_str) {
} }
} }
} }
#endif
exit(0); exit(0);
} }
...@@ -895,7 +899,7 @@ static void delete_win(Window win) { ...@@ -895,7 +899,7 @@ static void delete_win(Window win) {
static void recurse_search(int level, int level_max, Window top, Window app, int *nw) { static void recurse_search(int level, int level_max, Window top, Window app, int *nw) {
Window w, r, parent, *list = NULL; Window w, r, parent, *list = NULL;
unsigned int nchild; unsigned int nchild;
int ok; int ok = 0;
if (appshare_debug > 1) { if (appshare_debug > 1) {
fprintf(stderr, "level: %d level_max: %d top: 0x%lx app: 0x%lx\n", level, level_max, top, app); fprintf(stderr, "level: %d level_max: %d top: 0x%lx app: 0x%lx\n", level, level_max, top, app);
...@@ -904,6 +908,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int ...@@ -904,6 +908,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int
return; return;
} }
#if !NO_X11
ok = XQueryTree(dpy, top, &r, &parent, &list, &nchild); ok = XQueryTree(dpy, top, &r, &parent, &list, &nchild);
if (ok) { if (ok) {
int i; int i;
...@@ -930,6 +935,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int ...@@ -930,6 +935,7 @@ static void recurse_search(int level, int level_max, Window top, Window app, int
if (list) { if (list) {
XFree(list); XFree(list);
} }
#endif
} }
static void add_app(Window app) { static void add_app(Window app) {
......
...@@ -652,7 +652,8 @@ if [ -e "$xserver_path" -a "X$root" = "X" -a "X$runit" != "X" ]; then ...@@ -652,7 +652,8 @@ if [ -e "$xserver_path" -a "X$root" = "X" -a "X$runit" != "X" ]; then
warn "" warn ""
warn "Please restart Xdummy now." warn "Please restart Xdummy now."
exit 0 exit 0
elif [ ! -O $new ]; then fi
if [ ! -O $new ]; then
warn "file \"$new\" not owned by us!" warn "file \"$new\" not owned by us!"
ls -l $new ls -l $new
exit 1 exit 1
......
...@@ -17,6 +17,7 @@ SYNOPSIS ...@@ -17,6 +17,7 @@ SYNOPSIS
ssvnc [host][:display] ssvnc [host][:display]
ssvnc [saved-profile-name] ssvnc [saved-profile-name]
ssvnc [options] [host-or-profile] ssvnc [options] [host-or-profile]
ssvnc -cmd [ssvnc_cmd-args]
ssvnc --help ssvnc --help
DESCRIPTION DESCRIPTION
...@@ -33,6 +34,12 @@ OPTIONS ...@@ -33,6 +34,12 @@ OPTIONS
--help Starts up the GUI as though the 'Help' button was pressed to --help Starts up the GUI as though the 'Help' button was pressed to
show the main Help panel. show the main Help panel.
-cmd [ssvnc_cmd-args]
Launch the ssvnc_cmd utility command directly (no GUI) with the
given arguments (for use when ssvnc_cmd is not in one's PATH.)
If neither ssvnc_cmd nor ssvncviewer is in PATH, one can launch
the viewer directly via: ssvnc -cmd -viewer [viewer-args]
-profiles -profiles
List the saved SSVNC profiles you have created. A profile is a List the saved SSVNC profiles you have created. A profile is a
destination host with specific parameter settings. destination host with specific parameter settings.
...@@ -63,11 +70,12 @@ OPTIONS ...@@ -63,11 +70,12 @@ OPTIONS
Make the Profile Selection Dialog window bigger. Same as Make the Profile Selection Dialog window bigger. Same as
SSVNC_BIGGER_DIALOG=1. SSVNC_BIGGER_DIALOG=1.
-noenc Start off in a mode where a 'No Encryption' check button is -noenc Start off in a mode where a 'No Encryption' check button is
present. You can toggle the mode with Ctrl-E. Same as present. You can toggle the mode with Ctrl-E. Same as
SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc. SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc.
Selecting no encryption is the same as the vnc:// and Vnc:// Selecting no encryption is the same as the vnc:// and Vnc://
prefixes described below. -enc implies the opposite. prefixes described below. The -noenc mode is now the default,
use -enc or noenc=0 for the opposite behavior.
-killstunnel -killstunnel
On Windows, automatically terminate the STUNNEL process when the On Windows, automatically terminate the STUNNEL process when the
...@@ -271,7 +279,7 @@ if [ -f "$dir/util/ultraftp.jar" ]; then ...@@ -271,7 +279,7 @@ if [ -f "$dir/util/ultraftp.jar" ]; then
export SSVNC_ULTRA_FTP_JAR export SSVNC_ULTRA_FTP_JAR
fi fi
if [ "X$1" = "X-cmd" ]; then if [ "X$1" = "X-cmd" -o "X$1" = "X--cmd" ]; then
shift shift
exec ssvnc_cmd "$@" exec ssvnc_cmd "$@"
elif [ "X$WISH" = "Xwish" ]; then elif [ "X$WISH" = "Xwish" ]; then
......
...@@ -25,13 +25,16 @@ ...@@ -25,13 +25,16 @@
# #
# ssvnc_cmd [ss_vncviewer-args] hostname:N [vncviewer-args] # ssvnc_cmd [ss_vncviewer-args] hostname:N [vncviewer-args]
# #
# if, instead, this script is named "tightvncviewer" it calls the # if, instead, this script is named "tightvncviewer" or "-viewer" is the
# vncviewer directly and must be invoked as: # first argument it calls the vncviewer directly (there is no encryption)
# and must be invoked as:
# #
# tightvncviewer [vncviewer-args] hostname:N # tightvncviewer [vncviewer-args] hostname:N
# or
# ssvnc_cmd -viewer [vncviewer-args] hostname:N
# #
# In both cases, "hostname:N" is the host and VNC display to connect to, # In both cases, "hostname:N" is the host and VNC display to connect to,
# e.g. snoopy:0 # e.g. snoopy:0. (-listen N and -appshare N modes works too.)
# #
# See the script util/ss_vncviewer for details about its arguments: # See the script util/ss_vncviewer for details about its arguments:
# #
...@@ -240,6 +243,15 @@ if [ "X$1" = "X-ssl" ]; then ...@@ -240,6 +243,15 @@ if [ "X$1" = "X-ssl" ]; then
base="ssvnc_cmd" base="ssvnc_cmd"
fi fi
do_viewer_directly=""
if [ "X$1" = "X-viewer" ]; then
do_viewer_directly=1
shift
fi
if [ "X$base" = "Xtightvncviewer" ]; then
do_viewer_directly=1
fi
# If ours (and not cotvnc), force the use of tight encoding for localhost # If ours (and not cotvnc), force the use of tight encoding for localhost
# redir connection: # redir connection:
# #
...@@ -260,13 +272,13 @@ if [ $use_ours = 1 ]; then ...@@ -260,13 +272,13 @@ if [ $use_ours = 1 ]; then
fi fi
fi fi
if [ "X$base" = "Xtightvncviewer" ]; then if [ "X$do_viewer_directly" = "X1" ]; then
$VNCVIEWERCMD -encodings 'copyrect tight zrle zlib hextile' "$@" $VNCVIEWERCMD -encodings 'copyrect tight zrle zlib hextile' "$@"
else else
ss_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile' ss_vncviewer "$@" -encodings 'copyrect tight zrle zlib hextile'
fi fi
else else
if [ "X$base" = "Xtightvncviewer" ]; then if [ "X$do_viewer_directly" = "X1" ]; then
$VNCVIEWERCMD "$@" $VNCVIEWERCMD "$@"
else else
ss_vncviewer "$@" ss_vncviewer "$@"
......
...@@ -33,6 +33,15 @@ proc center_win {w} { ...@@ -33,6 +33,15 @@ proc center_win {w} {
update update
} }
proc small_height {} {
set H [winfo screenheight .]
if {$H < 700} {
return 1
} else {
return 0
}
}
proc mac_raise {} { proc mac_raise {} {
global uname global uname
if {$uname == "Darwin"} { if {$uname == "Darwin"} {
...@@ -67,6 +76,9 @@ proc line_count {{str ""} {pad 0}} { ...@@ -67,6 +76,9 @@ proc line_count {{str ""} {pad 0}} {
proc scroll_text {fr {w 80} {h 35}} { proc scroll_text {fr {w 80} {h 35}} {
global help_font is_windows scroll_text_focus global help_font is_windows scroll_text_focus
if {$h == 35 && [small_height]} {
set h 28
}
catch {destroy $fr} catch {destroy $fr}
frame $fr -bd 0 frame $fr -bd 0
...@@ -88,6 +100,9 @@ proc scroll_text {fr {w 80} {h 35}} { ...@@ -88,6 +100,9 @@ proc scroll_text {fr {w 80} {h 35}} {
proc scroll_text_dismiss {fr {w 80} {h 35}} { proc scroll_text_dismiss {fr {w 80} {h 35}} {
global help_font global help_font
if {$h == 35 && [small_height]} {
set h 28
}
scroll_text $fr $w $h scroll_text $fr $w $h
set up $fr set up $fr
...@@ -354,7 +369,11 @@ proc help {} { ...@@ -354,7 +369,11 @@ proc help {} {
} }
toplev .h toplev .h
scroll_text_dismiss .h.f 82 37 set h 37
if [small_height] {
set h 26
}
scroll_text_dismiss .h.f 82 $h
center_win .h center_win .h
wm title .h "SSL/SSH VNC Viewer Help" wm title .h "SSL/SSH VNC Viewer Help"
...@@ -1693,7 +1712,11 @@ proc ssvnc_escape_help {} { ...@@ -1693,7 +1712,11 @@ proc ssvnc_escape_help {} {
proc help_certs {} { proc help_certs {} {
toplev .ch toplev .ch
scroll_text_dismiss .ch.f 87 33 set h 33
if [small_height] {
set h 28
}
scroll_text_dismiss .ch.f 87 $h
center_win .ch center_win .ch
wm resizable .ch 1 0 wm resizable .ch 1 0
...@@ -2506,7 +2529,11 @@ set msg { ...@@ -2506,7 +2529,11 @@ set msg {
proc help_fetch_cert {{selfsigned 1}} { proc help_fetch_cert {{selfsigned 1}} {
toplev .fh toplev .fh
scroll_text_dismiss .fh.f 85 35 set h 35
if [small_height] {
set h 28
}
scroll_text_dismiss .fh.f 85 $h
center_win .fh center_win .fh
wm resizable .fh 1 0 wm resizable .fh 1 0
...@@ -3566,7 +3593,11 @@ proc check_debug_netstat {port str wn} { ...@@ -3566,7 +3593,11 @@ proc check_debug_netstat {port str wn} {
toplev .dbns toplev .dbns
scroll_text_dismiss .dbns.f 82 35 set h 35
if [small_height] {
set h 28
}
scroll_text_dismiss .dbns.f 82 $h
center_win .dbns center_win .dbns
.dbns.f.t insert end "LOOKING FOR PORT: $port\n\n$str" .dbns.f.t insert end "LOOKING FOR PORT: $port\n\n$str"
jiggle_text .dbns.f.t jiggle_text .dbns.f.t
...@@ -5189,6 +5220,10 @@ proc skip_non_self_signed {w hp} { ...@@ -5189,6 +5220,10 @@ proc skip_non_self_signed {w hp} {
proc fetch_dialog {cert_text hp hpnew ok n} { proc fetch_dialog {cert_text hp hpnew ok n} {
toplev .fetch toplev .fetch
if [small_height] {
set n 28
}
scroll_text_dismiss .fetch.f 90 $n scroll_text_dismiss .fetch.f 90 $n
if {$ok} { if {$ok} {
...@@ -5868,6 +5903,11 @@ proc check_accepted_certs {{probe_only 0}} { ...@@ -5868,6 +5903,11 @@ proc check_accepted_certs {{probe_only 0}} {
} else { } else {
set n [expr $n + 1] set n [expr $n + 1]
} }
if [small_height] {
if {$n > 26} {
set n 26
}
}
toplev .acert toplev .acert
scroll_text .acert.f 83 $n scroll_text .acert.f 83 $n
...@@ -9005,11 +9045,13 @@ proc create_cert {{name ""}} { ...@@ -9005,11 +9045,13 @@ proc create_cert {{name ""}} {
wm title .ccrt "Create SSL Certificate" wm title .ccrt "Create SSL Certificate"
global uname global uname
if {$uname == "Darwin"} { set h 27
scroll_text .ccrt.f 80 20 if [small_height] {
} else { set h 14
scroll_text .ccrt.f 80 30 } elseif {$uname == "Darwin"} {
set h 20
} }
scroll_text .ccrt.f 80 $h
set msg { set msg {
This dialog helps you to create a simple Self-Signed SSL certificate. This dialog helps you to create a simple Self-Signed SSL certificate.
...@@ -9451,11 +9493,13 @@ proc import_cert {} { ...@@ -9451,11 +9493,13 @@ proc import_cert {} {
global scroll_text_focus global scroll_text_focus
set scroll_text_focus 0 set scroll_text_focus 0
global uname global uname
if {$uname == "Darwin"} { set h 19
scroll_text .icrt.f 90 16 if [small_height] {
} else { set h 12
scroll_text .icrt.f 90 20 } elseif {$uname == "Darwin"} {
set h 16
} }
scroll_text .icrt.f 90 $h
set scroll_text_focus 1 set scroll_text_focus 1
set msg { set msg {
...@@ -9530,11 +9574,13 @@ TCQ+tbQ/DOiTXGKx1nlcKoPdkG+QVQVJthlQcpam ...@@ -9530,11 +9574,13 @@ TCQ+tbQ/DOiTXGKx1nlcKoPdkG+QVQVJthlQcpam
$w.e configure -state disabled $w.e configure -state disabled
label .icrt.plab -anchor w -text "Paste Certificate here: (extra blank lines above or below are OK)" label .icrt.plab -anchor w -text "Paste Certificate here: (extra blank lines above or below are OK)"
if {$uname == "Darwin"} { set h 22
scroll_text .icrt.paste 90 11 if [small_height] {
} else { set h 11
scroll_text .icrt.paste 90 22 } elseif {$uname == "Darwin"} {
set h 11
} }
scroll_text .icrt.paste 90 $h
button .icrt.cancel -text "Cancel" -command {destroy .icrt; catch {raise .c}} button .icrt.cancel -text "Cancel" -command {destroy .icrt; catch {raise .c}}
bind .icrt <Escape> {destroy .icrt; catch {raise .c}} bind .icrt <Escape> {destroy .icrt; catch {raise .c}}
...@@ -9577,20 +9623,29 @@ proc save_cert {hp} { ...@@ -9577,20 +9623,29 @@ proc save_cert {hp} {
global cert_text global cert_text
toplev .scrt toplev .scrt
wm title .scrt "Import SSL Certificate" wm title .scrt "Import/Save SSL Certificate"
global scroll_text_focus global scroll_text_focus
set scroll_text_focus 0 set scroll_text_focus 0
global uname global uname
global accepted_cert_dialog_in_progress global accepted_cert_dialog_in_progress
set h 20
if {$accepted_cert_dialog_in_progress} { if {$accepted_cert_dialog_in_progress} {
set mode "accepted" set mode "accepted"
scroll_text .scrt.f 90 15 set h 15
if [small_height] {
set h 11
}
} else { } else {
set mode "normal" set mode "normal"
scroll_text .scrt.f 90 20 set h 20
if [small_height] {
set h 16
}
} }
scroll_text .scrt.f 90 $h
set scroll_text_focus 1 set scroll_text_focus 1
set msg1 { set msg1 {
...@@ -9647,7 +9702,11 @@ proc save_cert {hp} { ...@@ -9647,7 +9702,11 @@ proc save_cert {hp} {
set import_file "" set import_file ""
entry $w.e -width 40 -textvariable import_file entry $w.e -width 40 -textvariable import_file
scroll_text .scrt.paste 90 23 set h 22
if [small_height] {
set h 10
}
scroll_text .scrt.paste 90 $h
button .scrt.cancel -text "Cancel" -command {destroy .scrt; catch {raise .c}} button .scrt.cancel -text "Cancel" -command {destroy .scrt; catch {raise .c}}
bind .scrt <Escape> {destroy .scrt; catch {raise .c}} bind .scrt <Escape> {destroy .scrt; catch {raise .c}}
...@@ -11358,7 +11417,11 @@ proc ts_xlogin_dialog {} { ...@@ -11358,7 +11417,11 @@ proc ts_xlogin_dialog {} {
toplev .xlog toplev .xlog
wm title .xlog "X Login Greeter" wm title .xlog "X Login Greeter"
scroll_text .xlog.f 80 33 set h 33
if [small_height] {
set h 28
}
scroll_text .xlog.f 80 $h
global ts_xlogin global ts_xlogin
...@@ -11569,7 +11632,11 @@ proc ts_x11vnc_opts_dialog {} { ...@@ -11569,7 +11632,11 @@ proc ts_x11vnc_opts_dialog {} {
toplev .x11v toplev .x11v
wm title .x11v "x11vnc Options" wm title .x11v "x11vnc Options"
scroll_text .x11v.f 80 23 set h 23
if [small_height] {
set h 21
}
scroll_text .x11v.f 80 $h
global ts_x11vnc_opts ts_x11vnc_path ts_x11vnc_autoport choose_x11vnc_opts global ts_x11vnc_opts ts_x11vnc_path ts_x11vnc_autoport choose_x11vnc_opts
global additional_port_redirs_list global additional_port_redirs_list
...@@ -11699,7 +11766,11 @@ proc ts_cups_dialog {} { ...@@ -11699,7 +11766,11 @@ proc ts_cups_dialog {} {
global cups_local_server cups_remote_port cups_manage_rcfile ts_cups_manage_rcfile cups_x11vnc global cups_local_server cups_remote_port cups_manage_rcfile ts_cups_manage_rcfile cups_x11vnc
global cups_local_smb_server cups_remote_smb_port global cups_local_smb_server cups_remote_smb_port
scroll_text .cups.f 80 30 set h 30
if [small_height] {
set h 24
}
scroll_text .cups.f 80 $h
set msg { set msg {
...@@ -11844,11 +11915,13 @@ proc cups_dialog {} { ...@@ -11844,11 +11915,13 @@ proc cups_dialog {} {
} }
global uname global uname
if {$uname == "Darwin"} { set h 33
scroll_text .cups.f 80 25 if [small_height] {
} else { set h 17
scroll_text .cups.f } elseif {$uname == "Darwin"} {
set h 24
} }
scroll_text .cups.f 80 $h
set msg { set msg {
...@@ -12210,11 +12283,13 @@ proc sound_dialog {} { ...@@ -12210,11 +12283,13 @@ proc sound_dialog {} {
wm title .snd "ESD/ARTSD Sound Tunnelling" wm title .snd "ESD/ARTSD Sound Tunnelling"
global uname global uname
if {$uname == "Darwin"} { set h 28
scroll_text .snd.f 80 20 if [small_height] {
} else { set h 14
scroll_text .snd.f 80 30 } elseif {$uname == "Darwin"} {
set h 20
} }
scroll_text .snd.f 80 $h
set msg { set msg {
Sound tunnelling to a sound daemon requires SSH be used to set up the Sound tunnelling to a sound daemon requires SSH be used to set up the
...@@ -12765,7 +12840,11 @@ proc smb_help_me_decide {} { ...@@ -12765,7 +12840,11 @@ proc smb_help_me_decide {} {
wm title .smbwiz $title wm title .smbwiz $title
set id " " set id " "
scroll_text .smbwiz.f 100 40 set h 40
if [small_height] {
set h 30
}
scroll_text .smbwiz.f 100 $h
set msg { set msg {
For now you will have to verify the following information manually. For now you will have to verify the following information manually.
...@@ -12979,11 +13058,13 @@ proc smb_dialog {} { ...@@ -12979,11 +13058,13 @@ proc smb_dialog {} {
global help_font global help_font
global uname global uname
if {$uname == "Darwin"} { set h 33
scroll_text .smb.f 80 25 if [small_height] {
} else { set h 17
scroll_text .smb.f } elseif {$uname == "Darwin"} {
set h 24
} }
scroll_text .smb.f 80 $h
set msg { set msg {
Windows/Samba Filesystem mounting requires SSH be used to set up the SMB Windows/Samba Filesystem mounting requires SSH be used to set up the SMB
...@@ -13679,7 +13760,11 @@ proc help_ssvncviewer_opts {} { ...@@ -13679,7 +13760,11 @@ proc help_ssvncviewer_opts {} {
proc show_viewer_help {} { proc show_viewer_help {} {
toplev .vhlp toplev .vhlp
scroll_text_dismiss .vhlp.f 83 35 set h 35
if [small_height] {
set h 30
}
scroll_text_dismiss .vhlp.f 83 $h
center_win .vhlp center_win .vhlp
wm resizable .vhlp 1 0 wm resizable .vhlp 1 0
...@@ -13710,9 +13795,9 @@ proc change_vncviewer_dialog {} { ...@@ -13710,9 +13795,9 @@ proc change_vncviewer_dialog {} {
global help_font global help_font
if {$ts_only} { if {$ts_only} {
eval text .chviewer.t -width 90 -height 18 $help_font eval text .chviewer.t -width 90 -height 16 $help_font
} else { } else {
eval text .chviewer.t -width 90 -height 29 $help_font eval text .chviewer.t -width 90 -height 27 $help_font
} }
apply_bg .chviewer.t apply_bg .chviewer.t
...@@ -13726,8 +13811,7 @@ proc change_vncviewer_dialog {} { ...@@ -13726,8 +13811,7 @@ proc change_vncviewer_dialog {} {
You can specify your own command line options below if you like (and try to You can specify your own command line options below if you like (and try to
avoid setting any others in this GUI under "Options"). avoid setting any others in this GUI under "Options").
If the path to the program name has any spaces it in, please surround it with If the path to the program name has spaces it in, surround it with double quotes:
double quotes, e.g.
"C:\Program Files\My Vnc Viewer\VNCVIEWER.EXE" "C:\Program Files\My Vnc Viewer\VNCVIEWER.EXE"
...@@ -13739,11 +13823,10 @@ proc change_vncviewer_dialog {} { ...@@ -13739,11 +13823,10 @@ proc change_vncviewer_dialog {} {
Since the command line options differ between them greatly, if you know it Since the command line options differ between them greatly, if you know it
is of the RealVNC 4.x flavor, indicate on the check box. Otherwise we guess. is of the RealVNC 4.x flavor, indicate on the check box. Otherwise we guess.
To have SSVNC act as a general STUNNEL redirector (no VNC) set the viewer to To have SSVNC act as a general STUNNEL redirector (no VNC) set the viewer to be
be "xmessage OK" or "xmessage <port>" or "sleep n" or "sleep n <port>" (or "xmessage OK" or "xmessage <port>" or "sleep n" or "sleep n <port>" (or "NOTEPAD"
"NOTEPAD" on Windows). The default listen port is 5930. The destination is on Windows). The default listen port is 5930. The destination is set in "VNC
set in "VNC Host:Display" (for a remote port less then 200 use the negative Host:Display" (for a remote port less than 200 use the negative of the port value).
of the port value).
} }
if {$ts_only} { if {$ts_only} {
...@@ -13785,11 +13868,11 @@ proc port_redir_dialog {} { ...@@ -13785,11 +13868,11 @@ proc port_redir_dialog {} {
wm title .redirs "Additional Port Redirections (via SSH)" wm title .redirs "Additional Port Redirections (via SSH)"
global help_font uname global help_font uname
if {$uname == "Darwin"} { set h 35
eval text .redirs.t -width 80 -height 35 $help_font if [small_height] {
} else { set h 27
eval text .redirs.t -width 80 -height 35 $help_font
} }
eval text .redirs.t -width 80 -height $h $help_font
apply_bg .redirs.t apply_bg .redirs.t
set msg { set msg {
...@@ -13856,11 +13939,12 @@ proc stunnel_sec_dialog {} { ...@@ -13856,11 +13939,12 @@ proc stunnel_sec_dialog {} {
wm title .stlsec "STUNNEL Local Port Protections" wm title .stlsec "STUNNEL Local Port Protections"
global help_font uname global help_font uname
if {$uname == "Darwin"} {
scroll_text .stlsec.f 82 37 set h 37
} else { if [small_height] {
scroll_text .stlsec.f 82 37 set h 26
} }
scroll_text .stlsec.f 82 $h
apply_bg .stlsec.f apply_bg .stlsec.f
...@@ -13924,7 +14008,11 @@ proc disable_ssl_workarounds_dialog {} { ...@@ -13924,7 +14008,11 @@ proc disable_ssl_workarounds_dialog {} {
wm title .sslwrk "Disable SSL Workarounds" wm title .sslwrk "Disable SSL Workarounds"
global help_font uname global help_font uname
scroll_text .sslwrk.f 86 36 set h 36
if [small_height] {
set h 24
}
scroll_text .sslwrk.f 86 $h
apply_bg .sslwrk.f apply_bg .sslwrk.f
...@@ -14020,7 +14108,11 @@ proc ultra_dsm_dialog {} { ...@@ -14020,7 +14108,11 @@ proc ultra_dsm_dialog {} {
wm title .ultradsm "UltraVNC DSM Encryption Plugin" wm title .ultradsm "UltraVNC DSM Encryption Plugin"
global help_font global help_font
scroll_text .ultradsm.f 85 40 set h 40
if [small_height] {
set h 22
}
scroll_text .ultradsm.f 85 $h
set msg { set msg {
On Unix and MacOSX with the provided SSVNC vncviewer, you can connect to an On Unix and MacOSX with the provided SSVNC vncviewer, you can connect to an
...@@ -14200,7 +14292,11 @@ proc ssh_known_hosts_dialog {} { ...@@ -14200,7 +14292,11 @@ proc ssh_known_hosts_dialog {} {
wm title .sshknownhosts "Private SSH KnownHosts file" wm title .sshknownhosts "Private SSH KnownHosts file"
global help_font global help_font
scroll_text .sshknownhosts.f 80 31 set h 31
if [small_height] {
set h 23
}
scroll_text .sshknownhosts.f 80 $h
set msg { set msg {
Private SSH KnownHosts file: Private SSH KnownHosts file:
...@@ -14318,7 +14414,11 @@ proc multilisten_dialog {} { ...@@ -14318,7 +14414,11 @@ proc multilisten_dialog {} {
wm title .multil "Multiple LISTEN Connections" wm title .multil "Multiple LISTEN Connections"
global help_font global help_font
eval text .multil.t -width 84 -height 35 $help_font set h 35
if [small_height] {
set h 30
}
eval text .multil.t -width 84 -height $h $help_font
apply_bg .multil.t apply_bg .multil.t
...@@ -14805,11 +14905,14 @@ proc port_knocking_dialog {} { ...@@ -14805,11 +14905,14 @@ proc port_knocking_dialog {} {
global help_font global help_font
global uname global uname
if {$uname == "Darwin"} {
scroll_text .pk.f 85 25 set h 35
} else { if [small_height] {
scroll_text .pk.f 85 set h 22
} elseif {$uname == "Darwin"} {
set h 25
} }
scroll_text .pk.f 85 $h
set msg { set msg {
Description: Description:
...@@ -15355,18 +15458,18 @@ proc set_ts_adv_options {} { ...@@ -15355,18 +15458,18 @@ proc set_ts_adv_options {} {
} }
proc change_vncviewer_dialog_wrap {} { proc change_vncviewer_dialog_wrap {} {
global change_vncviewer ts_uss_button global change_vncviewer ts_uss_button is_windows
if {$change_vncviewer} { if {$change_vncviewer} {
change_vncviewer_dialog change_vncviewer_dialog
catch {tkwait window .chviewer} catch {tkwait window .chviewer}
} }
if {$change_vncviewer} { if {$change_vncviewer || $is_windows} {
catch {.oa.ss configure -state disabled} catch {.oa.ss configure -state disabled}
} else { } else {
catch {.oa.ss configure -state normal} catch {.oa.ss configure -state normal}
} }
if [info exists ts_uss_button] { if [info exists ts_uss_button] {
if {$change_vncviewer} { if {$change_vncviewer || $is_windows} {
catch {$ts_uss_button configure -state disabled} catch {$ts_uss_button configure -state disabled}
} else { } else {
catch {$ts_uss_button configure -state normal} catch {$ts_uss_button configure -state normal}
...@@ -15529,7 +15632,7 @@ proc set_advanced_options {} { ...@@ -15529,7 +15632,7 @@ proc set_advanced_options {} {
set t1 " Unix ssvncviewer ..." set t1 " Unix ssvncviewer ..."
if {$uname == "Darwin" } { regsub {^ *} $t1 "" t1 } if {$uname == "Darwin" } { regsub {^ *} $t1 "" t1 }
button .oa.ss -anchor w -text $t1 -command set_ssvncviewer_options button .oa.ss -anchor w -text $t1 -command set_ssvncviewer_options
pack .oa.ss -side top -fill x pack .oa.ss -side top -fill x
if {$is_windows} { if {$is_windows} {
.oa.ss configure -state disabled .oa.ss configure -state disabled
} }
...@@ -15817,7 +15920,7 @@ proc set_ssvncviewer_options {} { ...@@ -15817,7 +15920,7 @@ proc set_ssvncviewer_options {} {
frame $fr.b$j -relief $relief -borderwidth 2 frame $fr.b$j -relief $relief -borderwidth 2
label $fr.b$j.l1 -font $ffont -anchor w -text "Add any extra options for ssvncviewer that you want."; label $fr.b$j.l1 -font $ffont -anchor w -text "Add any extra options for ssvncviewer that you want.";
label $fr.b$j.l2 -font $ffont -anchor w -text "For example: -16bpp -noshm etc. See Help for a list."; label $fr.b$j.l2 -font $ffont -anchor w -text "For example: -16bpp -appshare -noshm etc. See Help for a list.";
global ssvnc_extra_opts global ssvnc_extra_opts
frame $fr.b$j.f frame $fr.b$j.f
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
.\" ** The above line should force tbl to be a preprocessor ** .\" ** The above line should force tbl to be a preprocessor **
.\" Man page for the SSVNC vncviewer .\" Man page for the SSVNC vncviewer
.\" .\"
.\" Copyright (C) 2006-2008 Karl J. Runge <runge@karlrunge.com> .\" Copyright (C) 2006-2009 Karl J. Runge <runge@karlrunge.com>
.\" .\"
.\" You may distribute under the terms of the GNU General Public .\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file LICENCE.TXT that comes with the .\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution. .\" TightVNC distribution.
.\" .\"
.TH ssvnc 1 "September 2009" "" "SSVNC" .TH ssvnc 1 "December 2009" "" "SSVNC"
.SH NAME .SH NAME
ssvnc \- a GUI wrapper for SSL and SSH VNC connections. ssvnc \- a GUI wrapper for SSL and SSH VNC connections.
.SH SYNOPSIS .SH SYNOPSIS
...@@ -24,6 +24,10 @@ ssvnc \- a GUI wrapper for SSL and SSH VNC connections. ...@@ -24,6 +24,10 @@ ssvnc \- a GUI wrapper for SSL and SSH VNC connections.
.RI [\| options \|]\ [\| host-or-profile \] .RI [\| options \|]\ [\| host-or-profile \]
.br .br
.B ssvnc .B ssvnc
.IR \-cmd
.RI [\| ssvnc_cmd-args \|]
.br
.B ssvnc
.IR \--help .IR \--help
.br .br
.SH DESCRIPTION .SH DESCRIPTION
...@@ -47,10 +51,10 @@ Or supply user@hostname:display and click on the "Use SSH" option, then ...@@ -47,10 +51,10 @@ Or supply user@hostname:display and click on the "Use SSH" option, then
press the "Connect" button to connect to the server via an SSH tunnel. press the "Connect" button to connect to the server via an SSH tunnel.
E.g. "fred@far-away.east:0". E.g. "fred@far-away.east:0".
As an easter egg, we note it is also possible to disable the use of SSL/SSH Note it is also possible to disable the use of SSL/SSH
encryption tunnels by using a vnc:// or Vnc:// prefix before encryption tunnels by using a vnc:// or Vnc:// prefix before
host:display. Shift+Ctrl-E is a short-cut to add/remove it. host:display. Shift+Ctrl-E is a short-cut to add/remove it.
See also the \fB-noenc\fR option below. See also the \fB-noenc\fR option below for the 'No Encryption' button.
Normally you do not specify any command line options. You simply Normally you do not specify any command line options. You simply
run \fBssvnc\fR and use the GUI that starts up. run \fBssvnc\fR and use the GUI that starts up.
...@@ -70,6 +74,12 @@ See below and the application Help for more information on the modes. ...@@ -70,6 +74,12 @@ See below and the application Help for more information on the modes.
You can also place certain settings in your ~/.ssvncrc, see the You can also place certain settings in your ~/.ssvncrc, see the
SSVNC Help panel ('Tips') for more info. SSVNC Help panel ('Tips') for more info.
The \fB-cmd\fR option does not start the GUI, it runs the command
line utility \fBssvnc_cmd\fR directly with the given arguments.
\fBssvnc_cmd\fR can launch the viewer directly (\fB-viewer ...\fR)
or, by default, the \fBss_vncviewer\fR SSL/SSH tunnel wrapper script.
See its help output for more information.
There are also some command line options described as follows. There are also some command line options described as follows.
.SH OPTIONS .SH OPTIONS
.TP .TP
...@@ -80,6 +90,12 @@ Prints out to the terminal a brief description and the options. ...@@ -80,6 +90,12 @@ Prints out to the terminal a brief description and the options.
Starts up the GUI as though the 'Help' button was pressed to show the Starts up the GUI as though the 'Help' button was pressed to show the
main Help panel. main Help panel.
.TP .TP
\fB\-cmd\fR \fI[ssvnc_cmd-args]\fR
Launch the ssvnc_cmd utility command directly (no GUI) with the given
arguments (for use when ssvnc_cmd is not in one's PATH.) If neither
ssvnc_cmd nor ssvncviewer is in PATH, one can launch the viewer
directly via: ssvnc -cmd -viewer [viewer-args]
.TP
\fB\-profiles\fR \fB\-profiles\fR
List the saved SSVNC profiles you have created. A profile List the saved SSVNC profiles you have created. A profile
is a destination host with specific parameter settings. is a destination host with specific parameter settings.
...@@ -122,7 +138,8 @@ Start off in a mode where a 'No Encryption' check button is present. ...@@ -122,7 +138,8 @@ Start off in a mode where a 'No Encryption' check button is present.
You can toggle the mode with Ctrl-E. You can toggle the mode with Ctrl-E.
Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or \fInoenc=1\fR in ~/.ssvncrc. Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or \fInoenc=1\fR in ~/.ssvncrc.
Selecting no encryption is the same as the vnc:// and Vnc:// prefixes Selecting no encryption is the same as the vnc:// and Vnc:// prefixes
described below. \fB-enc\fR implies the opposite. described below. The \fB\-noenc\fR mode is now the default, use \fB-enc\fR
or \fInoenc=0\fR for the opposite behavior.
.TP .TP
\fB\-killstunnel\fR \fB\-killstunnel\fR
On Windows, automatically terminate the STUNNEL process when the viewer On Windows, automatically terminate the STUNNEL process when the viewer
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.\" License as specified in the file LICENCE.TXT that comes with the .\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution. .\" TightVNC distribution.
.\" .\"
.TH ssvncviewer 1 "September 2009" "" "SSVNC" .TH ssvncviewer 1 "December 2009" "" "SSVNC"
.SH NAME .SH NAME
ssvncviewer \- an X viewer client for VNC ssvncviewer \- an X viewer client for VNC
.SH SYNOPSIS .SH SYNOPSIS
...@@ -465,6 +465,18 @@ as possible instead of waiting until the end of the current ...@@ -465,6 +465,18 @@ as possible instead of waiting until the end of the current
framebuffer update coming in. Helps 'pipeline' the updates. framebuffer update coming in. Helps 'pipeline' the updates.
This is currently the default, use \fB-nopipeline\fR to disable. This is currently the default, use \fB-nopipeline\fR to disable.
.TP .TP
\fB\-appshare\fR
Enable features for use with x11vnc's \fB\-appshare\fR mode where
instead of sharing the full desktop only the application's
windows are shared. Viewer multilisten mode is used to
create the multiple windows: \fB\-multilisten\fR is implied.
See 'x11vnc \fB\-appshare\fR \fB\-help\fR' more information on the mode.
Features enabled in the viewer under \fB\-appshare\fR are:
Minimum extra text in the title, auto \fB\-ycrop\fR is disabled,
x11vnc \fB\-remote_prefix\fR X11VNC_APPSHARE_CMD: message channel,
x11vnc initial window position hints. See also Escape Keys
below for additional key and mouse bindings.
.TP
\fB\-escape \fR\fIstr\fR \fB\-escape \fR\fIstr\fR
This sets the 'Escape Keys' modifier sequence and enables This sets the 'Escape Keys' modifier sequence and enables
escape keys mode. When the modifier keys escape sequence escape keys mode. When the modifier keys escape sequence
...@@ -511,6 +523,18 @@ Clicking Mouse Button3 brings up the Popup Menu. ...@@ -511,6 +523,18 @@ Clicking Mouse Button3 brings up the Popup Menu.
The above mappings are \fBalways\fR active in ViewOnly mode, unless you set The above mappings are \fBalways\fR active in ViewOnly mode, unless you set
the Escape Keys value to 'never'. the Escape Keys value to 'never'.
x11vnc -appshare hot-keys: x11vnc has a simple application sharing mode
that enables the viewer-side to move, resize, or raise the remote toplevel
windows. To enable it, hold down Shift + the Escape Keys and press these:
Arrow keys: move the remote window around in its desktop.
PageUp/PageDn/Home/End: resize the remote window.
+/-: raise or lower the remote window.
M or Button1 move win to local position; D or Button3: delete remote win.
If the Escape Keys value below is set to 'default' then a default list of If the Escape Keys value below is set to 'default' then a default list of
of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it
is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag
......
...@@ -664,7 +664,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview ...@@ -664,7 +664,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview
+ +
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/vncviewer/argsresources.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/vncviewer/argsresources.c
--- vnc_unixsrc.orig/vncviewer/argsresources.c 2007-02-04 17:10:31.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/argsresources.c 2007-02-04 17:10:31.000000000 -0500
+++ vnc_unixsrc/vncviewer/argsresources.c 2009-10-26 23:26:12.000000000 -0400 +++ vnc_unixsrc/vncviewer/argsresources.c 2009-11-25 00:02:42.000000000 -0500
@@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
char *fallback_resources[] = { char *fallback_resources[] = {
...@@ -739,7 +739,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -739,7 +739,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
<ButtonPress>: SendRFBEvent()\\n\ <ButtonPress>: SendRFBEvent()\\n\
<ButtonRelease>: SendRFBEvent()\\n\ <ButtonRelease>: SendRFBEvent()\\n\
<Motion>: SendRFBEvent()\\n\ <Motion>: SendRFBEvent()\\n\
@@ -55,26 +107,129 @@ @@ -55,26 +107,137 @@
"*serverDialog.dialog.label: VNC server:", "*serverDialog.dialog.label: VNC server:",
"*serverDialog.dialog.value:", "*serverDialog.dialog.value:",
...@@ -785,11 +785,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -785,11 +785,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ "The above mappings are *always* active in ViewOnly mode, unless you set the\\n" + "The above mappings are *always* active in ViewOnly mode, unless you set the\\n"
+ "Escape Keys value to 'never'.\\n" + "Escape Keys value to 'never'.\\n"
+ "\\n" + "\\n"
+ "If the Escape Keys value below is set to 'default' then a default list of\\n" + "x11vnc -appshare hot-keys: x11vnc has a simple application sharing mode\\n"
+ "of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it\\n" + "that enables the viewer-side to move, resize, or raise the remote toplevel\\n"
+ "is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag\\n" + "windows. To enable it, hold down Shift + the Escape Keys and press these:\\n"
+ "on it. Also note the _L and _R mean the key is on the LEFT or RIGHT side\\n" + "\\n"
+ "of the keyboard.\\n" + " Arrow keys: move the remote window around in its desktop.\\n"
+ " PageUp/PageDn/Home/End: resize the remote window.\\n"
+ " +/- raise or lower the remote window.\\n"
+ " M or Button1 move win to local position; D or Button3: delete remote win.\\n"
+ "\\n"
+ "If the Escape Keys value below is set to 'default' then a fixed list of\\n"
+ "modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it is\\n"
+ "Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag.\\n"
+ "Also note the _L and _R mean the key is on the LEFT or RIGHT side of keyboard.\\n"
+ "\\n" + "\\n"
+ "On Unix the default is Alt and Windows keys on Left side of keyboard.\\n" + "On Unix the default is Alt and Windows keys on Left side of keyboard.\\n"
+ "On MacOSX the default is Control and Command keys on Left side of keyboard.\\n" + "On MacOSX the default is Control and Command keys on Left side of keyboard.\\n"
...@@ -804,7 +812,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -804,7 +812,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ "\\n" + "\\n"
+ "Current Escape Keys Value:", + "Current Escape Keys Value:",
+ "*escapeDialog.dialog.value:", + "*escapeDialog.dialog.value:",
+ "*escapeDialog.dialog.value.width: 275", + "*escapeDialog.dialog.value.width: 280",
+ "*escapeDialog.dialog.value.translations: #override\\n\ + "*escapeDialog.dialog.value.translations: #override\\n\
+ <KeyRelease>Return: EscapeDialogDone()", + <KeyRelease>Return: EscapeDialogDone()",
+ +
...@@ -875,7 +883,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -875,7 +883,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
"*popup*button1.label: Dismiss popup", "*popup*button1.label: Dismiss popup",
"*popup*button1.translations: #override\\n\ "*popup*button1.translations: #override\\n\
@@ -84,7 +239,7 @@ @@ -84,7 +247,7 @@
"*popup*button2.translations: #override\\n\ "*popup*button2.translations: #override\\n\
<Btn1Down>,<Btn1Up>: Quit()", <Btn1Down>,<Btn1Up>: Quit()",
...@@ -884,7 +892,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -884,7 +892,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
"*popup*button3.type: toggle", "*popup*button3.type: toggle",
"*popup*button3.translations: #override\\n\ "*popup*button3.translations: #override\\n\
<Visible>: SetFullScreenState()\\n\ <Visible>: SetFullScreenState()\\n\
@@ -105,16 +260,426 @@ @@ -105,16 +268,426 @@
"*popup*button7.label: Send ctrl-alt-del", "*popup*button7.label: Send ctrl-alt-del",
"*popup*button7.translations: #override\\n\ "*popup*button7.translations: #override\\n\
<Btn1Down>,<Btn1Up>: SendRFBEvent(keydown,Control_L)\ <Btn1Down>,<Btn1Up>: SendRFBEvent(keydown,Control_L)\
...@@ -1316,7 +1324,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1316,7 +1324,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
NULL NULL
}; };
@@ -124,7 +689,7 @@ @@ -124,7 +697,7 @@
* from a dialog box. * from a dialog box.
*/ */
...@@ -1325,7 +1333,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1325,7 +1333,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
int vncServerPort = 0; int vncServerPort = 0;
@@ -135,6 +700,7 @@ @@ -135,6 +708,7 @@
*/ */
AppData appData; AppData appData;
...@@ -1333,7 +1341,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1333,7 +1341,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
static XtResource appDataResourceList[] = { static XtResource appDataResourceList[] = {
{"shareDesktop", "ShareDesktop", XtRBool, sizeof(Bool), {"shareDesktop", "ShareDesktop", XtRBool, sizeof(Bool),
@@ -155,14 +721,44 @@ @@ -155,14 +729,44 @@
{"userLogin", "UserLogin", XtRString, sizeof(String), {"userLogin", "UserLogin", XtRString, sizeof(String),
XtOffsetOf(AppData, userLogin), XtRImmediate, (XtPointer) 0}, XtOffsetOf(AppData, userLogin), XtRImmediate, (XtPointer) 0},
...@@ -1380,7 +1388,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1380,7 +1388,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"nColours", "NColours", XtRInt, sizeof(int), {"nColours", "NColours", XtRInt, sizeof(int),
XtOffsetOf(AppData, nColours), XtRImmediate, (XtPointer) 256}, XtOffsetOf(AppData, nColours), XtRImmediate, (XtPointer) 256},
@@ -179,9 +775,12 @@ @@ -179,9 +783,12 @@
{"requestedDepth", "RequestedDepth", XtRInt, sizeof(int), {"requestedDepth", "RequestedDepth", XtRInt, sizeof(int),
XtOffsetOf(AppData, requestedDepth), XtRImmediate, (XtPointer) 0}, XtOffsetOf(AppData, requestedDepth), XtRImmediate, (XtPointer) 0},
...@@ -1394,7 +1402,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1394,7 +1402,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"wmDecorationWidth", "WmDecorationWidth", XtRInt, sizeof(int), {"wmDecorationWidth", "WmDecorationWidth", XtRInt, sizeof(int),
XtOffsetOf(AppData, wmDecorationWidth), XtRImmediate, (XtPointer) 4}, XtOffsetOf(AppData, wmDecorationWidth), XtRImmediate, (XtPointer) 4},
@@ -191,6 +790,9 @@ @@ -191,6 +798,9 @@
{"popupButtonCount", "PopupButtonCount", XtRInt, sizeof(int), {"popupButtonCount", "PopupButtonCount", XtRInt, sizeof(int),
XtOffsetOf(AppData, popupButtonCount), XtRImmediate, (XtPointer) 0}, XtOffsetOf(AppData, popupButtonCount), XtRImmediate, (XtPointer) 0},
...@@ -1404,7 +1412,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1404,7 +1412,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"debug", "Debug", XtRBool, sizeof(Bool), {"debug", "Debug", XtRBool, sizeof(Bool),
XtOffsetOf(AppData, debug), XtRImmediate, (XtPointer) False}, XtOffsetOf(AppData, debug), XtRImmediate, (XtPointer) False},
@@ -206,11 +808,13 @@ @@ -206,11 +816,13 @@
{"bumpScrollPixels", "BumpScrollPixels", XtRInt, sizeof(int), {"bumpScrollPixels", "BumpScrollPixels", XtRInt, sizeof(int),
XtOffsetOf(AppData, bumpScrollPixels), XtRImmediate, (XtPointer) 20}, XtOffsetOf(AppData, bumpScrollPixels), XtRImmediate, (XtPointer) 20},
...@@ -1419,7 +1427,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1419,7 +1427,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"enableJPEG", "EnableJPEG", XtRBool, sizeof(Bool), {"enableJPEG", "EnableJPEG", XtRBool, sizeof(Bool),
XtOffsetOf(AppData, enableJPEG), XtRImmediate, (XtPointer) True}, XtOffsetOf(AppData, enableJPEG), XtRImmediate, (XtPointer) True},
@@ -218,14 +822,88 @@ @@ -218,14 +830,91 @@
{"useRemoteCursor", "UseRemoteCursor", XtRBool, sizeof(Bool), {"useRemoteCursor", "UseRemoteCursor", XtRBool, sizeof(Bool),
XtOffsetOf(AppData, useRemoteCursor), XtRImmediate, (XtPointer) True}, XtOffsetOf(AppData, useRemoteCursor), XtRImmediate, (XtPointer) True},
...@@ -1500,6 +1508,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1500,6 +1508,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ {"recvText", "RecvText", XtRString, sizeof(String), + {"recvText", "RecvText", XtRString, sizeof(String),
+ XtOffsetOf(AppData, recvText), XtRImmediate, (XtPointer) 0}, + XtOffsetOf(AppData, recvText), XtRImmediate, (XtPointer) 0},
+ +
+ {"appShare", "AppShare", XtRBool, sizeof(Bool),
+ XtOffsetOf(AppData, appShare), XtRImmediate, (XtPointer) False},
+
+ {"escapeKeys", "EscapeKeys", XtRString, sizeof(String), + {"escapeKeys", "EscapeKeys", XtRString, sizeof(String),
+ XtOffsetOf(AppData, escapeKeys), XtRImmediate, (XtPointer) 0}, + XtOffsetOf(AppData, escapeKeys), XtRImmediate, (XtPointer) 0},
+ +
...@@ -1510,7 +1521,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1510,7 +1521,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
}; };
@@ -242,8 +920,29 @@ @@ -242,8 +931,29 @@
{"-noraiseonbeep", "*raiseOnBeep", XrmoptionNoArg, "False"}, {"-noraiseonbeep", "*raiseOnBeep", XrmoptionNoArg, "False"},
{"-passwd", "*passwordFile", XrmoptionSepArg, 0}, {"-passwd", "*passwordFile", XrmoptionSepArg, 0},
{"-user", "*userLogin", XrmoptionSepArg, 0}, {"-user", "*userLogin", XrmoptionSepArg, 0},
...@@ -1541,7 +1552,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1541,7 +1552,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"-owncmap", "*forceOwnCmap", XrmoptionNoArg, "True"}, {"-owncmap", "*forceOwnCmap", XrmoptionNoArg, "True"},
{"-truecolor", "*forceTrueColour", XrmoptionNoArg, "True"}, {"-truecolor", "*forceTrueColour", XrmoptionNoArg, "True"},
{"-truecolour", "*forceTrueColour", XrmoptionNoArg, "True"}, {"-truecolour", "*forceTrueColour", XrmoptionNoArg, "True"},
@@ -253,8 +952,27 @@ @@ -253,8 +963,28 @@
{"-nojpeg", "*enableJPEG", XrmoptionNoArg, "False"}, {"-nojpeg", "*enableJPEG", XrmoptionNoArg, "False"},
{"-nocursorshape", "*useRemoteCursor", XrmoptionNoArg, "False"}, {"-nocursorshape", "*useRemoteCursor", XrmoptionNoArg, "False"},
{"-x11cursor", "*useX11Cursor", XrmoptionNoArg, "True"}, {"-x11cursor", "*useX11Cursor", XrmoptionNoArg, "True"},
...@@ -1562,6 +1573,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1562,6 +1573,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ {"-termchat", "*termChat", XrmoptionNoArg, "True"}, + {"-termchat", "*termChat", XrmoptionNoArg, "True"},
+ {"-chatonly", "*chatOnly", XrmoptionNoArg, "True"}, + {"-chatonly", "*chatOnly", XrmoptionNoArg, "True"},
+ {"-scale", "*scale", XrmoptionSepArg, 0}, + {"-scale", "*scale", XrmoptionSepArg, 0},
+ {"-appshare", "*appShare", XrmoptionNoArg, "True"},
+ {"-escape", "*escapeKeys", XrmoptionSepArg, 0}, + {"-escape", "*escapeKeys", XrmoptionSepArg, 0},
+ {"-sendclipboard", "*sendClipboard", XrmoptionNoArg, "True"}, + {"-sendclipboard", "*sendClipboard", XrmoptionNoArg, "True"},
+ {"-sendalways", "*sendAlways", XrmoptionNoArg, "True"}, + {"-sendalways", "*sendAlways", XrmoptionNoArg, "True"},
...@@ -1571,7 +1583,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1571,7 +1583,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
}; };
int numCmdLineOptions = XtNumber(cmdLineOptions); int numCmdLineOptions = XtNumber(cmdLineOptions);
@@ -267,16 +985,100 @@ @@ -267,16 +997,100 @@
static XtActionsRec actions[] = { static XtActionsRec actions[] = {
{"SendRFBEvent", SendRFBEvent}, {"SendRFBEvent", SendRFBEvent},
{"ShowPopup", ShowPopup}, {"ShowPopup", ShowPopup},
...@@ -1672,7 +1684,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1672,7 +1684,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
}; };
@@ -302,11 +1104,14 @@ @@ -302,11 +1116,14 @@
void void
usage(void) usage(void)
{ {
...@@ -1689,7 +1701,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1689,7 +1701,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
" %s [<OPTIONS>] -listen [<DISPLAY#>]\n" " %s [<OPTIONS>] -listen [<DISPLAY#>]\n"
" %s -help\n" " %s -help\n"
"\n" "\n"
@@ -319,7 +1124,7 @@ @@ -319,7 +1136,7 @@
" -noraiseonbeep\n" " -noraiseonbeep\n"
" -passwd <PASSWD-FILENAME> (standard VNC authentication)\n" " -passwd <PASSWD-FILENAME> (standard VNC authentication)\n"
" -user <USERNAME> (Unix login authentication)\n" " -user <USERNAME> (Unix login authentication)\n"
...@@ -1698,7 +1710,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1698,7 +1710,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
" -bgr233\n" " -bgr233\n"
" -owncmap\n" " -owncmap\n"
" -truecolour\n" " -truecolour\n"
@@ -332,10 +1137,374 @@ @@ -332,10 +1149,386 @@
" -autopass\n" " -autopass\n"
"\n" "\n"
"Option names may be abbreviated, e.g. -bgr instead of -bgr233.\n" "Option names may be abbreviated, e.g. -bgr instead of -bgr233.\n"
...@@ -1966,6 +1978,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -1966,6 +1978,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ " framebuffer update coming in. Helps 'pipeline' the updates.\n" + " framebuffer update coming in. Helps 'pipeline' the updates.\n"
+ " This is currently the default, use -nopipeline to disable.\n" + " This is currently the default, use -nopipeline to disable.\n"
+ "\n" + "\n"
+ " -appshare Enable features for use with x11vnc's -appshare mode where\n"
+ " instead of sharing the full desktop only the application's\n"
+ " windows are shared. Viewer multilisten mode is used to\n"
+ " create the multiple windows: -multilisten is implied.\n"
+ " See 'x11vnc -appshare -help' more information on the mode.\n"
+ "\n"
+ " Features enabled in the viewer under -appshare are:\n"
+ " Minimum extra text in the title, auto -ycrop is disabled,\n"
+ " x11vnc -remote_prefix X11VNC_APPSHARE_CMD: message channel,\n"
+ " x11vnc initial window position hints. See also Escape Keys\n"
+ " below for additional key and mouse bindings.\n"
+ "\n"
+ " -escape str This sets the 'Escape Keys' modifier sequence and enables\n" + " -escape str This sets the 'Escape Keys' modifier sequence and enables\n"
+ " escape keys mode. When the modifier keys escape sequence\n" + " escape keys mode. When the modifier keys escape sequence\n"
+ " is held down, the next keystroke is interpreted locally\n" + " is held down, the next keystroke is interpreted locally\n"
...@@ -2075,7 +2099,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -2075,7 +2099,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/* /*
@@ -347,73 +1516,223 @@ @@ -343,77 +1536,234 @@
* not already processed by XtVaAppInitialize(). It sets vncServerHost and
* vncServerPort and all the fields in appData.
*/
+extern int saw_appshare;
void void
GetArgsAndResources(int argc, char **argv) GetArgsAndResources(int argc, char **argv)
{ {
...@@ -2163,6 +2192,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -2163,6 +2192,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ appData.escapeKeys = strdup(getenv("VNCVIEWER_ESCAPE")); + appData.escapeKeys = strdup(getenv("VNCVIEWER_ESCAPE"));
+ } + }
+ } + }
+ if (saw_appshare) {
+ appData.appShare = True;
+ }
+ if (appData.appShare && appData.escapeKeys == NULL) {
+ appData.escapeKeys = strdup("default");
+ }
+ if (appData.escapeKeys != NULL) { + if (appData.escapeKeys != NULL) {
+ appData.escapeActive = True; + appData.escapeActive = True;
+ } + }
...@@ -2356,7 +2391,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v ...@@ -2356,7 +2391,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
} }
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewer/colour.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewer/colour.c
--- vnc_unixsrc.orig/vncviewer/colour.c 2002-04-30 09:07:31.000000000 -0400 --- vnc_unixsrc.orig/vncviewer/colour.c 2002-04-30 09:07:31.000000000 -0400
+++ vnc_unixsrc/vncviewer/colour.c 2007-03-22 21:36:12.000000000 -0400 +++ vnc_unixsrc/vncviewer/colour.c 2009-11-29 22:31:14.000000000 -0500
@@ -31,9 +31,12 @@ @@ -31,9 +31,12 @@
#define BGR233_SIZE 256 #define BGR233_SIZE 256
unsigned long BGR233ToPixel[BGR233_SIZE]; unsigned long BGR233ToPixel[BGR233_SIZE];
...@@ -2375,7 +2410,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2375,7 +2410,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
static void AllocateExactBGR233Colours(); static void AllocateExactBGR233Colours();
static Bool AllocateBGR233Colour(int r, int g, int b); static Bool AllocateBGR233Colour(int r, int g, int b);
+static void SetupBGR565Map(); +static void SetupBGR565Map(unsigned long red_mask, unsigned long green_mask, unsigned long blue_mask);
+ +
/* /*
...@@ -2417,7 +2452,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2417,7 +2452,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
+ fprintf(stderr, "Using default colormap and translating from BGR565 (65536 colors). Pixel format:\n"); + fprintf(stderr, "Using default colormap and translating from BGR565 (65536 colors). Pixel format:\n");
+ PrintPixelFormat(&myFormat); + PrintPixelFormat(&myFormat);
+ +
+ SetupBGR565Map(); + SetupBGR565Map(vis->red_mask, vis->green_mask, vis->blue_mask);
+ return; + return;
+ } + }
+ } + }
...@@ -2547,12 +2582,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2547,12 +2582,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
if (shared[nearestPixel] && !usedAsNearest[nearestPixel]) if (shared[nearestPixel] && !usedAsNearest[nearestPixel])
nSharedUsed++; nSharedUsed++;
usedAsNearest[nearestPixel] = True; usedAsNearest[nearestPixel] = True;
@@ -433,6 +528,53 @@ @@ -433,6 +528,57 @@
} }
} }
+static void +static void
+SetupBGR565Map() +SetupBGR565Map(unsigned long red_mask, unsigned long green_mask, unsigned long blue_mask)
+{ +{
+ int r, g, b; + int r, g, b;
+ int r2, g2, b2; + int r2, g2, b2;
...@@ -2588,7 +2623,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2588,7 +2623,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
+ pixel = (r2 << 16) | (g2 << 8) | (b2 << 0); + pixel = (r2 << 16) | (g2 << 8) | (b2 << 0);
+ } + }
+ +
+ idx = (b<<bs) | (g<<gs) | (r<<rs); + if (red_mask == 0xff) {
+ idx = (r<<bs) | (g<<gs) | (b<<rs);
+ } else {
+ idx = (b<<bs) | (g<<gs) | (r<<rs);
+ }
+ if (0) fprintf(stderr, "cnt: %5d idx: %5d pixel: 0x%08x\n", cnt, idx, pixel); + if (0) fprintf(stderr, "cnt: %5d idx: %5d pixel: 0x%08x\n", cnt, idx, pixel);
+ BGR565ToPixel[idx] = pixel; + BGR565ToPixel[idx] = pixel;
+ cnt++; + cnt++;
...@@ -2601,7 +2640,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2601,7 +2640,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
/* /*
* AllocateExactBGR233Colours() attempts to allocate each of the colours in the * AllocateExactBGR233Colours() attempts to allocate each of the colours in the
@@ -484,8 +626,13 @@ @@ -484,8 +630,13 @@
ri = rn; ri = rn;
for (gi = 0; gi < gn; gi++) { for (gi = 0; gi < gn; gi++) {
for (bi = 0; bi < bn; bi++) { for (bi = 0; bi < bn; bi++) {
...@@ -2617,7 +2656,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2617,7 +2656,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
} }
} }
rn++; rn++;
@@ -496,8 +643,13 @@ @@ -496,8 +647,13 @@
gi = gn; gi = gn;
for (ri = 0; ri < rn; ri++) { for (ri = 0; ri < rn; ri++) {
for (bi = 0; bi < bn; bi++) { for (bi = 0; bi < bn; bi++) {
...@@ -2633,7 +2672,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2633,7 +2672,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
} }
} }
gn++; gn++;
@@ -507,8 +659,13 @@ @@ -507,8 +663,13 @@
bi = bn; bi = bn;
for (ri = 0; ri < rn; ri++) { for (ri = 0; ri < rn; ri++) {
for (gi = 0; gi < gn; gi++) { for (gi = 0; gi < gn; gi++) {
...@@ -2649,7 +2688,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe ...@@ -2649,7 +2688,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/colour.c vnc_unixsrc/vncviewe
} }
} }
bn++; bn++;
@@ -529,18 +686,36 @@ @@ -529,18 +690,36 @@
AllocateBGR233Colour(int r, int g, int b) AllocateBGR233Colour(int r, int g, int b)
{ {
XColor c; XColor c;
...@@ -3687,8 +3726,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe ...@@ -3687,8 +3726,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
- -
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncviewer/desktop.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncviewer/desktop.c
--- vnc_unixsrc.orig/vncviewer/desktop.c 2004-05-28 13:29:29.000000000 -0400 --- vnc_unixsrc.orig/vncviewer/desktop.c 2004-05-28 13:29:29.000000000 -0400
+++ vnc_unixsrc/vncviewer/desktop.c 2009-10-16 22:04:39.000000000 -0400 +++ vnc_unixsrc/vncviewer/desktop.c 2009-11-29 22:05:55.000000000 -0500
@@ -28,28 +28,487 @@ @@ -28,28 +28,498 @@
#include <X11/extensions/XShm.h> #include <X11/extensions/XShm.h>
#endif #endif
...@@ -3704,6 +3743,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -3704,6 +3743,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+Cursor waitCursor = None; +Cursor waitCursor = None;
Widget form, viewport, desktop; Widget form, viewport, desktop;
+int appshare_0_hint = -10000;
+int appshare_x_hint = -10000;
+int appshare_y_hint = -10000;
+
static Bool modifierPressed[256]; static Bool modifierPressed[256];
-static XImage *image = NULL; -static XImage *image = NULL;
...@@ -3914,10 +3957,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -3914,10 +3957,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ /* now destroy image */ + /* now destroy image */
+ if (image && image->data) { + if (image && image->data) {
+ if (UsingShm()) { + if (UsingShm()) {
+ ShmCleanup(); + ShmDetach();
+ } + }
+ XDestroyImage(image); + XDestroyImage(image);
+ fprintf(stderr, "rescale_image: destroyed 'image'\n"); + fprintf(stderr, "rescale_image: destroyed 'image'\n");
+ if (UsingShm()) {
+ ShmCleanup();
+ }
+ image = NULL; + image = NULL;
+ } + }
+ if (image_ycrop && image_ycrop->data) { + if (image_ycrop && image_ycrop->data) {
...@@ -4056,6 +4102,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4056,6 +4102,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ fprintf(stderr, "try_create_image: created *non-shm* image: %dx%d\n", image->width, image->height); + fprintf(stderr, "try_create_image: created *non-shm* image: %dx%d\n", image->width, image->height);
+ } + }
+ } + }
+ fprintf(stderr, "try_create_image: image->bytes_per_line: %d\n", image->bytes_per_line);
+} +}
+ +
+void create_image() { +void create_image() {
...@@ -4167,6 +4214,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4167,6 +4214,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+} +}
+ +
+void check_tall(void) { +void check_tall(void) {
+ if (appData.appShare) {
+ return;
+ }
+ if (! appData.yCrop) { + if (! appData.yCrop) {
+ int w = si.framebufferWidth; + int w = si.framebufferWidth;
+ int h = si.framebufferHeight; + int h = si.framebufferHeight;
...@@ -4180,7 +4230,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4180,7 +4230,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
/* /*
* DesktopInitBeforeRealization creates the "desktop" widget and the viewport * DesktopInitBeforeRealization creates the "desktop" widget and the viewport
@@ -59,91 +518,1016 @@ @@ -59,92 +529,1017 @@
void void
DesktopInitBeforeRealization() DesktopInitBeforeRealization()
{ {
...@@ -4300,8 +4350,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4300,8 +4350,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ float t = 0.0; + float t = 0.0;
+ XtVaSetValues(w, XtNtopOfThumb, &t, NULL); + XtVaSetValues(w, XtNtopOfThumb, &t, NULL);
+ } + }
+} }
+
+static XtCallbackProc Jumped(Widget w, XtPointer closure, XtPointer call_data) { +static XtCallbackProc Jumped(Widget w, XtPointer closure, XtPointer call_data) {
+ float top = *((float *) call_data); + float top = *((float *) call_data);
+ Position x, y; + Position x, y;
...@@ -4319,8 +4369,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4319,8 +4369,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ XtVaSetValues(w, XtNtopOfThumb, *(XtArgVal*)&t, XtNshown, *(XtArgVal*)&s, NULL); + XtVaSetValues(w, XtNtopOfThumb, *(XtArgVal*)&t, XtNshown, *(XtArgVal*)&s, NULL);
+ } + }
+ } + }
} +}
+
+extern double dnow(void); +extern double dnow(void);
+ +
+void check_things() { +void check_things() {
...@@ -4512,7 +4562,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4512,7 +4562,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ appData.useXserverBackingStore = False; + appData.useXserverBackingStore = False;
+ } + }
+ } + }
+
- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+ if (appData.useXserverBackingStore) { + if (appData.useXserverBackingStore) {
+ XtVaGetApplicationResources(desktop, (XtPointer)&attr.backing_store, + XtVaGetApplicationResources(desktop, (XtPointer)&attr.backing_store,
+ desktopBackingStoreResources, 1, NULL); + desktopBackingStoreResources, 1, NULL);
...@@ -4564,9 +4615,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4564,9 +4615,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } + }
+ FreeX11Cursor(); + FreeX11Cursor();
+ FreeSoftCursor(); + FreeSoftCursor();
+} }
+
+
+#define CEIL(x) ( (double) ((int) (x)) == (x) ? \ +#define CEIL(x) ( (double) ((int) (x)) == (x) ? \
+ (double) ((int) (x)) : (double) ((int) (x) + 1) ) + (double) ((int) (x)) : (double) ((int) (x) + 1) )
+#define FLOOR(x) ( (double) ((int) (x)) ) +#define FLOOR(x) ( (double) ((int) (x)) )
...@@ -4586,15 +4637,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -4586,15 +4637,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ +
+int scale_round(int len, double fac) { +int scale_round(int len, double fac) {
+ double eps = 0.000001; + double eps = 0.000001;
+
- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+ len = (int) (len * fac + eps); + len = (int) (len * fac + eps);
+ if (len < 1) { + if (len < 1) {
+ len = 1; + len = 1;
+ } + }
+ return len; + return len;
} +}
+
+static void scale_rect(double factor_x, double factor_y, int blend, int interpolate, +static void scale_rect(double factor_x, double factor_y, int blend, int interpolate,
+ int *px, int *py, int *pw, int *ph, int solid) { + int *px, int *py, int *pw, int *ph, int solid) {
+ +
...@@ -5256,10 +5306,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5256,10 +5306,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+} +}
+ +
+#define PR_EXPOSE fprintf(stderr, "Expose: %04dx%04d+%04d+%04d %04d/%04d/%04d now: %8.4f rescale: %8.4f fullscreen: %8.4f\n", width, height, x, y, si.framebufferWidth, appData.yCrop, si.framebufferHeight, now - start_time, now - last_rescale, now - last_fullscreen); +#define PR_EXPOSE fprintf(stderr, "Expose: %04dx%04d+%04d+%04d %04d/%04d/%04d now: %8.4f rescale: %8.4f fullscreen: %8.4f\n", width, height, x, y, si.framebufferWidth, appData.yCrop, si.framebufferHeight, now - start_time, now - last_rescale, now - last_fullscreen);
+
/* /*
* HandleBasicDesktopEvent - deal with expose and leave events. * HandleBasicDesktopEvent - deal with expose and leave events.
@@ -152,41 +1536,404 @@ */
@@ -152,42 +1547,528 @@
static void static void
HandleBasicDesktopEvent(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont) HandleBasicDesktopEvent(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont)
{ {
...@@ -5301,13 +5352,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5301,13 +5352,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (y + height < si.framebufferHeight) height++; + if (y + height < si.framebufferHeight) height++;
+ } + }
+ } + }
+
+ if (x + width > si.framebufferWidth) {
+ width = si.framebufferWidth - x;
+ if (width <= 0) {
+ break;
+ }
+ }
- if (ev->xexpose.x + ev->xexpose.width > si.framebufferWidth) { - if (ev->xexpose.x + ev->xexpose.width > si.framebufferWidth) {
- ev->xexpose.width = si.framebufferWidth - ev->xexpose.x; - ev->xexpose.width = si.framebufferWidth - ev->xexpose.x;
...@@ -5322,6 +5366,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5322,6 +5366,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
- SendFramebufferUpdateRequest(ev->xexpose.x, ev->xexpose.y, - SendFramebufferUpdateRequest(ev->xexpose.x, ev->xexpose.y,
- ev->xexpose.width, ev->xexpose.height, False); - ev->xexpose.width, ev->xexpose.height, False);
- break; - break;
+ if (x + width > si.framebufferWidth) {
+ width = si.framebufferWidth - x;
+ if (width <= 0) {
+ break;
+ }
+ }
+
+ if (y + height > si.framebufferHeight) { + if (y + height > si.framebufferHeight) {
+ height = si.framebufferHeight - y; + height = si.framebufferHeight - y;
+ if (height <= 0) { + if (height <= 0) {
...@@ -5405,6 +5456,79 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5405,6 +5456,79 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+extern Position desktopX, desktopY; +extern Position desktopX, desktopY;
+ +
+void x11vnc_appshare(char *cmd) {
+ char send[200], str[100];
+ char *id = "cmd=id_cmd";
+ int m_big = 80, m_fine = 15;
+ int resize = 100, db = 0;
+
+ if (getenv("X11VNC_APPSHARE_DEBUG")) {
+ db = atoi(getenv("X11VNC_APPSHARE_DEBUG"));
+ }
+
+ if (db) fprintf(stderr, "x11vnc_appshare: cmd=%s\n", cmd);
+
+ str[0] = '\0';
+
+ if (!strcmp(cmd, "left")) {
+ sprintf(str, "%s:move:-%d+0", id, m_big);
+ } else if (!strcmp(cmd, "right")) {
+ sprintf(str, "%s:move:+%d+0", id, m_big);
+ } else if (!strcmp(cmd, "up")) {
+ sprintf(str, "%s:move:+0-%d", id, m_big);
+ } else if (!strcmp(cmd, "down")) {
+ sprintf(str, "%s:move:+0+%d", id, m_big);
+ } else if (!strcmp(cmd, "left-fine")) {
+ sprintf(str, "%s:move:-%d+0", id, m_fine);
+ } else if (!strcmp(cmd, "right-fine")) {
+ sprintf(str, "%s:move:+%d+0", id, m_fine);
+ } else if (!strcmp(cmd, "up-fine")) {
+ sprintf(str, "%s:move:+0-%d", id, m_fine);
+ } else if (!strcmp(cmd, "down-fine")) {
+ sprintf(str, "%s:move:+0+%d", id, m_fine);
+ } else if (!strcmp(cmd, "taller")) {
+ sprintf(str, "%s:resize:+0+%d", id, resize);
+ } else if (!strcmp(cmd, "shorter")) {
+ sprintf(str, "%s:resize:+0-%d", id, resize);
+ } else if (!strcmp(cmd, "wider")) {
+ sprintf(str, "%s:resize:+%d+0", id, resize);
+ } else if (!strcmp(cmd, "narrower")) {
+ sprintf(str, "%s:resize:-%d+0", id, resize);
+ } else if (!strcmp(cmd, "lower")) {
+ sprintf(str, "%s:lower", id);
+ } else if (!strcmp(cmd, "raise")) {
+ sprintf(str, "%s:raise", id);
+ } else if (!strcmp(cmd, "delete")) {
+ sprintf(str, "%s:wm_delete", id);
+ } else if (!strcmp(cmd, "position")) {
+ Position x, y;
+ int xi, yi;
+
+ XtVaGetValues(toplevel, XtNx, &x, XtNy, &y, NULL);
+ xi = (int) x;
+ yi = (int) y;
+ if (appData.scale) {
+ double fx = 1.0, fy = 1.0;
+ get_scale_values(&fx, &fy);
+ if (fx > 0.0 && fy > 0.0) {
+ xi /= fx;
+ yi /= fx;
+ }
+ }
+ sprintf(str, "%s:geom:0x0+%d+%d", id, xi, yi);
+ fprintf(stderr, "str=%s\n", str);
+ }
+ if (strcmp(str, "")) {
+ Bool vo = appData.viewOnly;
+ strcpy(send, "X11VNC_APPSHARE_CMD:");
+ strcat(send, str);
+ if (db) fprintf(stderr, "x11vnc_appshare: send=%s\n", send);
+ if (vo) appData.viewOnly = False;
+ SendClientCutText(send, strlen(send));
+ if (vo) appData.viewOnly = True;
+ }
+}
+
+void scroll_desktop(int horiz, int vert, double amount) { +void scroll_desktop(int horiz, int vert, double amount) {
+ Dimension h, w; + Dimension h, w;
+ Position x, y; + Position x, y;
...@@ -5424,7 +5548,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5424,7 +5548,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ +
+ x2 = -x; + x2 = -x;
+ y2 = -y; + y2 = -y;
+
+ if (amount == -1.0) { + if (amount == -1.0) {
+ int dx = horiz; + int dx = horiz;
+ int dy = vert; + int dy = vert;
...@@ -5591,6 +5715,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5591,6 +5715,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ p = strtok(s, ",+ "); + p = strtok(s, ",+ ");
+ while (p) { + while (p) {
+ ks = XStringToKeysym(p); + ks = XStringToKeysym(p);
+ if (ks == XK_Shift_L || ks == XK_Shift_R) {
+ putenv("NO_X11VNC_APPSHARE=1");
+ }
+ if (k >= 8) { + if (k >= 8) {
+ fprintf(stderr, "EscapeKeys: more than 8 modifier keys.\n"); + fprintf(stderr, "EscapeKeys: more than 8 modifier keys.\n");
+ failed = 1; + failed = 1;
...@@ -5683,10 +5810,58 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5683,10 +5810,58 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ +
+ return pressed; + return pressed;
+} +}
+
+static int shift_is_down(void) {
+ int shift_down = 0;
+ KeyCode kc;
+
+ if (appData.viewOnly) {
+ int i, k;
+ char keys[32];
+ int keystate[256];
+
+ XQueryKeymap(dpy, keys);
+ for (i=0; i<32; i++) {
+ char c = keys[i];
+
+ for (k=0; k < 8; k++) {
+ if (c & 0x1) {
+ keystate[8*i + k] = 1;
+ } else {
+ keystate[8*i + k] = 0;
+ }
+ c = c >> 1;
+ }
+ }
+
+ kc = XKeysymToKeycode(dpy, XK_Shift_L);
+ if (kc != NoSymbol && keystate[kc]) {
+ shift_down = 1;
+ } else {
+ kc = XKeysymToKeycode(dpy, XK_Shift_R);
+ if (kc != NoSymbol && keystate[kc]) {
+ shift_down = 1;
+ }
+ }
+ return shift_down;
+ } else {
+ kc = XKeysymToKeycode(dpy, XK_Shift_L);
+ if (kc != NoSymbol && modifierPressed[kc]) {
+ shift_down = 1;
+ } else {
+ kc = XKeysymToKeycode(dpy, XK_Shift_R);
+ if (kc != NoSymbol && modifierPressed[kc]) {
+ shift_down = 1;
+ }
+ }
+ return shift_down;
+ }
+}
+
/* /*
* SendRFBEvent is an action which sends an RFB event. It can be used in two * SendRFBEvent is an action which sends an RFB event. It can be used in two
@@ -201,127 +1948,324 @@ * ways. Without any parameters it simply sends an RFB event corresponding to
@@ -201,127 +2082,406 @@
* button2 down, 3 for both, etc). * button2 down, 3 for both, etc).
*/ */
...@@ -5713,6 +5888,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5713,6 +5888,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ int buttonMask, x, y; + int buttonMask, x, y;
+ int do_escape; + int do_escape;
+ static int db = -1; + static int db = -1;
+ char *ek = appData.escapeKeys;
+ +
+ if (db < 0) { + if (db < 0) {
+ if (getenv("SSVNC_DEBUG_ESCAPE_KEYS")) { + if (getenv("SSVNC_DEBUG_ESCAPE_KEYS")) {
...@@ -5749,7 +5925,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5749,7 +5925,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } + }
+ +
+ do_escape = 0; + do_escape = 0;
+ if (appData.escapeKeys != NULL && !strcasecmp(appData.escapeKeys, "never")) { + if (ek != NULL && (ek[0] == 'n' || ek[0] == 'N') && !strcasecmp(ek, "never")) {
+ ; + ;
+ } else if (appData.viewOnly) { + } else if (appData.viewOnly) {
+ do_escape = 1; + do_escape = 1;
...@@ -5783,11 +5959,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5783,11 +5959,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (!do_escape) { + if (!do_escape) {
+ escape_drag_in_progress = 0; + escape_drag_in_progress = 0;
+ } + }
+ if (db) fprintf(stderr, "do_escape: %d\n", do_escape);
- if (appData.viewOnly) return; +
+ if (do_escape) { + if (do_escape) {
+ int W = si.framebufferWidth; + int W = si.framebufferWidth;
+ int H = si.framebufferHeight; + int H = si.framebufferHeight;
+ int shift_down = 0;
+
+ if (!getenv("NO_X11VNC_APPSHARE")) {
+ shift_down = shift_is_down();
+ }
+ if (db) fprintf(stderr, "shift_down: %d\n", shift_down);
+
+ if (*num_params != 0) { + if (*num_params != 0) {
+ if (strcasecmp(params[0],"fbupdate") == 0) { + if (strcasecmp(params[0],"fbupdate") == 0) {
+ SendFramebufferUpdateRequest(0, 0, W, H, False); + SendFramebufferUpdateRequest(0, 0, W, H, False);
...@@ -5797,7 +5980,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5797,7 +5980,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ XButtonEvent *b = (XButtonEvent *) ev; + XButtonEvent *b = (XButtonEvent *) ev;
+ if (db) fprintf(stderr, "ButtonRelease: %d %d %d\n", b->x_root, b->y_root, b->state); + if (db) fprintf(stderr, "ButtonRelease: %d %d %d\n", b->x_root, b->y_root, b->state);
+ if (b->button == 3) { + if (b->button == 3) {
+ ShowPopup(w, ev, params, num_params); + if (shift_down) {
+ x11vnc_appshare("delete");
+ } else {
+ ShowPopup(w, ev, params, num_params);
+ }
+ } else if (escape_drag_in_progress && b->button == 1) { + } else if (escape_drag_in_progress && b->button == 1) {
+ escape_drag_in_progress = 0; + escape_drag_in_progress = 0;
+ } + }
...@@ -5805,9 +5992,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5805,9 +5992,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ XButtonEvent *b = (XButtonEvent *) ev; + XButtonEvent *b = (XButtonEvent *) ev;
+ if (db) fprintf(stderr, "ButtonPress: %d %d %d\n", b->x_root, b->y_root, b->state); + if (db) fprintf(stderr, "ButtonPress: %d %d %d\n", b->x_root, b->y_root, b->state);
+ if (b->button == 1) { + if (b->button == 1) {
+ escape_drag_in_progress = 1; + if (shift_down) {
+ last_x = b->x_root; + x11vnc_appshare("position");
+ last_y = b->y_root; + } else {
+ escape_drag_in_progress = 1;
+ last_x = b->x_root;
+ last_y = b->y_root;
+ }
+ } else { + } else {
+ escape_drag_in_progress = 0; + escape_drag_in_progress = 0;
+ } + }
...@@ -5821,6 +6012,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5821,6 +6012,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } + }
+ } else if (ev->type == KeyRelease) { + } else if (ev->type == KeyRelease) {
+ int did = 1; + int did = 1;
+
+ XLookupString(&ev->xkey, keyname, 256, &ks, NULL); + XLookupString(&ev->xkey, keyname, 256, &ks, NULL);
+ if (ks == XK_1 || ks == XK_KP_1) { + if (ks == XK_1 || ks == XK_KP_1) {
+ set_server_scale(1); + set_server_scale(1);
...@@ -5864,34 +6056,98 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5864,34 +6056,98 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ SetEscapeKeys(w, ev, params, num_params); + SetEscapeKeys(w, ev, params, num_params);
+ } else if (ks == XK_g || ks == XK_G) { + } else if (ks == XK_g || ks == XK_G) {
+ ToggleXGrab(w, ev, params, num_params); + ToggleXGrab(w, ev, params, num_params);
+ } else if (ks == XK_D) {
+ if (shift_down || appData.appShare) {
+ x11vnc_appshare("delete");
+ }
+ } else if (ks == XK_M) {
+ if (shift_down || appData.appShare) {
+ x11vnc_appshare("position");
+ }
+ } else if (ks == XK_Left) { + } else if (ks == XK_Left) {
+ scroll_desktop(-1, 0, 0.1); + if (shift_down) {
+ x11vnc_appshare("left");
+ } else {
+ scroll_desktop(-1, 0, 0.1);
+ }
+ } else if (ks == XK_Right) { + } else if (ks == XK_Right) {
+ scroll_desktop(+1, 0, 0.1); + if (shift_down) {
+ x11vnc_appshare("right");
+ } else {
+ scroll_desktop(+1, 0, 0.1);
+ }
+ } else if (ks == XK_Up) { + } else if (ks == XK_Up) {
+ scroll_desktop(0, +1, 0.1); + if (shift_down) {
+ x11vnc_appshare("up");
+ } else {
+ scroll_desktop(0, +1, 0.1);
+ }
+ } else if (ks == XK_Down) { + } else if (ks == XK_Down) {
+ scroll_desktop(0, -1, 0.1); + if (shift_down) {
+ x11vnc_appshare("down");
+ } else {
+ scroll_desktop(0, -1, 0.1);
+ }
+ } else if (ks == XK_KP_Left) { + } else if (ks == XK_KP_Left) {
+ scroll_desktop(-1, 0, 0.0); + if (shift_down) {
+ x11vnc_appshare("left-fine");
+ } else {
+ scroll_desktop(-1, 0, 0.0);
+ }
+ } else if (ks == XK_KP_Right) { + } else if (ks == XK_KP_Right) {
+ scroll_desktop(+1, 0, 0.0); + if (shift_down) {
+ x11vnc_appshare("right-fine");
+ } else {
+ scroll_desktop(+1, 0, 0.0);
+ }
+ } else if (ks == XK_KP_Up) { + } else if (ks == XK_KP_Up) {
+ scroll_desktop(0, +1, 0.0); + if (shift_down) {
+ x11vnc_appshare("up-fine");
+ } else {
+ scroll_desktop(0, +1, 0.0);
+ }
+ } else if (ks == XK_KP_Down) { + } else if (ks == XK_KP_Down) {
+ scroll_desktop(0, -1, 0.0); + if (shift_down) {
+ x11vnc_appshare("down-fine");
+ } else {
+ scroll_desktop(0, -1, 0.0);
+ }
+ } else if (ks == XK_Next || ks == XK_KP_Next) { + } else if (ks == XK_Next || ks == XK_KP_Next) {
+ scroll_desktop(0, -1, 1.0); + if (shift_down && ks == XK_Next) {
+ x11vnc_appshare("shorter");
+ } else {
+ scroll_desktop(0, -1, 1.0);
+ }
+ } else if (ks == XK_Prior || ks == XK_KP_Prior) { + } else if (ks == XK_Prior || ks == XK_KP_Prior) {
+ scroll_desktop(0, +1, 1.0); + if (shift_down && ks == XK_Prior) {
+ x11vnc_appshare("taller");
+ } else {
+ scroll_desktop(0, +1, 1.0);
+ }
+ } else if (ks == XK_End || ks == XK_KP_End) { + } else if (ks == XK_End || ks == XK_KP_End) {
+ scroll_desktop(+1, 0, 1.0); + if (shift_down && ks == XK_End) {
+ x11vnc_appshare("narrower");
+ } else {
+ scroll_desktop(+1, 0, 1.0);
+ }
+ } else if (ks == XK_Home || ks == XK_KP_Home) { + } else if (ks == XK_Home || ks == XK_KP_Home) {
+ scroll_desktop(-1, 0, 1.0); + if (shift_down && ks == XK_Home) {
+ x11vnc_appshare("wider");
+ } else {
+ scroll_desktop(-1, 0, 1.0);
+ }
+ } else if (ks == XK_equal || ks == XK_plus) { + } else if (ks == XK_equal || ks == XK_plus) {
+ scale_desktop(1, 0.1); + if (shift_down) {
+ x11vnc_appshare("raise");
+ } else {
+ scale_desktop(1, 0.1);
+ }
+ } else if (ks == XK_underscore || ks == XK_minus) { + } else if (ks == XK_underscore || ks == XK_minus) {
+ scale_desktop(0, 0.1); + if (shift_down) {
+ x11vnc_appshare("lower");
+ } else {
+ scale_desktop(0, 0.1);
+ }
+ } else { + } else {
+ did = 0; + did = 0;
+ } + }
...@@ -5907,7 +6163,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -5907,7 +6163,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (appData.viewOnly) { + if (appData.viewOnly) {
+ return; + return;
+ } + }
+
- if (appData.viewOnly) return;
+ if (*num_params != 0) { + if (*num_params != 0) {
+ if (strncasecmp(params[0],"key",3) == 0) { + if (strncasecmp(params[0],"key",3) == 0) {
+ if (*num_params != 2) { + if (*num_params != 2) {
...@@ -6068,10 +6325,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6068,10 +6325,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
- } - }
- return; - return;
- } - }
-
- switch (ev->type) {
+ XLookupString(&ev->xkey, keyname, 256, &ks, NULL); + XLookupString(&ev->xkey, keyname, 256, &ks, NULL);
- switch (ev->type) {
-
- case MotionNotify: - case MotionNotify:
- while (XCheckTypedWindowEvent(dpy, desktopWin, MotionNotify, ev)) - while (XCheckTypedWindowEvent(dpy, desktopWin, MotionNotify, ev))
- ; /* discard all queued motion notify events */ - ; /* discard all queued motion notify events */
...@@ -6119,7 +6376,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6119,7 +6376,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
} }
@@ -329,26 +2273,207 @@ @@ -329,26 +2489,207 @@
* CreateDotCursor. * CreateDotCursor.
*/ */
...@@ -6186,8 +6443,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6186,8 +6443,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ cursor = XCreatePixmapCursor(dpy, src, msk, &fg, &bg, 1, 1); + cursor = XCreatePixmapCursor(dpy, src, msk, &fg, &bg, 1, 1);
+ XFreePixmap(dpy, src); + XFreePixmap(dpy, src);
+ XFreePixmap(dpy, msk); + XFreePixmap(dpy, msk);
+
- return cursor;
+ return cursor; + return cursor;
+} +}
+#endif +#endif
...@@ -6254,7 +6510,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6254,7 +6510,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (appData.chatOnly) { + if (appData.chatOnly) {
+ return; + return;
+ } + }
+
- return cursor;
+ if (widthInBytes > buflen || !buf) { + if (widthInBytes > buflen || !buf) {
+ if (buf) { + if (buf) {
+ free(buf); + free(buf);
...@@ -6343,7 +6600,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6343,7 +6600,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
} }
@@ -359,38 +2484,37 @@ @@ -359,38 +2700,39 @@
void void
CopyDataToScreen(char *buf, int x, int y, int width, int height) CopyDataToScreen(char *buf, int x, int y, int width, int height)
{ {
...@@ -6389,6 +6646,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6389,6 +6646,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ int scrWidthInBytes = si.framebufferWidth * myFormat.bitsPerPixel / 8; + int scrWidthInBytes = si.framebufferWidth * myFormat.bitsPerPixel / 8;
+ XImage *im = image_scale ? image_scale : image; + XImage *im = image_scale ? image_scale : image;
+ +
+ if (scrWidthInBytes != im->bytes_per_line) scrWidthInBytes = im->bytes_per_line;
+
+ char *scr = (im->data + y * scrWidthInBytes + char *scr = (im->data + y * scrWidthInBytes
+ + x * myFormat.bitsPerPixel / 8); + + x * myFormat.bitsPerPixel / 8);
+ +
...@@ -6411,7 +6670,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6411,7 +6670,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
} }
@@ -401,62 +2525,297 @@ @@ -401,62 +2743,339 @@
static void static void
CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width, int height) CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width, int height)
{ {
...@@ -6424,16 +6683,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6424,16 +6683,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
- CARD8 *scr8 = ((CARD8 *)image->data) + y * si.framebufferWidth + x; - CARD8 *scr8 = ((CARD8 *)image->data) + y * si.framebufferWidth + x;
- CARD16 *scr16 = ((CARD16 *)image->data) + y * si.framebufferWidth + x; - CARD16 *scr16 = ((CARD16 *)image->data) + y * si.framebufferWidth + x;
- CARD32 *scr32 = ((CARD32 *)image->data) + y * si.framebufferWidth + x; - CARD32 *scr32 = ((CARD32 *)image->data) + y * si.framebufferWidth + x;
+ XImage *im = image_scale ? image_scale : image;
+ int p, q; + int p, q;
+ int xoff = 7 - (x & 7); + int xoff = 7 - (x & 7);
+ int xcur; + int xcur;
+ int fbwb = si.framebufferWidth / 8; + int fbwb = si.framebufferWidth / 8;
+ XImage *im = image_scale ? image_scale : image; + int src_width8 = im->bytes_per_line/1;
+ CARD8 *scr1 = ((CARD8 *)im->data) + y * fbwb + x / 8; + int src_width16 = im->bytes_per_line/2;
+ CARD8 *scrt; + int src_width32 = im->bytes_per_line/4;
+ CARD8 *scr8 = ( (CARD8 *)im->data) + y * si.framebufferWidth + x; + CARD8 *src1 = ((CARD8 *)im->data) + y * fbwb + x / 8;
+ CARD16 *scr16 = ((CARD16 *)im->data) + y * si.framebufferWidth + x; + CARD8 *srct;
+ CARD32 *scr32 = ((CARD32 *)im->data) + y * si.framebufferWidth + x; + CARD8 *src8 = ( (CARD8 *)im->data) + y * src_width8 + x;
+ CARD16 *src16 = ((CARD16 *)im->data) + y * src_width16 + x;
+ CARD32 *src32 = ((CARD32 *)im->data) + y * src_width32 + x;
+ int b0, b1, b2; + int b0, b1, b2;
- switch (visbpp) { - switch (visbpp) {
...@@ -6488,35 +6750,35 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6488,35 +6750,35 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ case 1: + case 1:
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ xcur = xoff; + xcur = xoff;
+ scrt = scr1; + srct = src1;
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ *scrt = ((*scrt & ~(1 << xcur)) + *srct = ((*srct & ~(1 << xcur))
+ | (BGR233ToPixel[*(buf++)] << xcur)); + | (BGR233ToPixel[*(buf++)] << xcur));
+ +
+ if (xcur-- == 0) { + if (xcur-- == 0) {
+ xcur = 7; + xcur = 7;
+ scrt++; + srct++;
+ } + }
+ } + }
+ scr1 += fbwb; + src1 += fbwb;
+ } + }
+ break; + break;
+ +
+ case 8: + case 8:
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ *(scr8++) = BGR233ToPixel[*(buf++)]; + *(src8++) = BGR233ToPixel[*(buf++)];
+ } + }
+ scr8 += si.framebufferWidth - width; + src8 += src_width8 - width;
+ } + }
+ break; + break;
+ +
+ case 16: + case 16:
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ *(scr16++) = BGR233ToPixel[*(buf++)]; + *(src16++) = BGR233ToPixel[*(buf++)];
+ } + }
+ scr16 += si.framebufferWidth - width; + src16 += src_width16 - width;
+ } + }
+ break; + break;
+ +
...@@ -6526,25 +6788,25 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6526,25 +6788,25 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } else { + } else {
+ b0 = 2; b1 = 1; b2 = 0; + b0 = 2; b1 = 1; b2 = 0;
+ } + }
+ scr8 = ((CARD8 *)im->data) + (y * si.framebufferWidth + x) * 3; + src8 = ((CARD8 *)im->data) + (y * si.framebufferWidth + x) * 3;
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ CARD32 v = BGR233ToPixel[*(buf++)]; + CARD32 v = BGR233ToPixel[*(buf++)];
+ *(scr8 + b0) = (unsigned char) ((v & 0x0000ff) >> 0); + *(src8 + b0) = (unsigned char) ((v & 0x0000ff) >> 0);
+ *(scr8 + b1) = (unsigned char) ((v & 0x00ff00) >> 8); + *(src8 + b1) = (unsigned char) ((v & 0x00ff00) >> 8);
+ *(scr8 + b2) = (unsigned char) ((v & 0xff0000) >> 16); + *(src8 + b2) = (unsigned char) ((v & 0xff0000) >> 16);
+ scr8 += 3; + src8 += 3;
+ } + }
+ scr8 += (si.framebufferWidth - width) * 3; + src8 += (si.framebufferWidth - width) * 3;
+ } + }
+ break; + break;
+ +
+ case 32: + case 32:
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ *(scr32++) = BGR233ToPixel[*(buf++)]; + *(src32++) = BGR233ToPixel[*(buf++)];
+ } + }
+ scr32 += si.framebufferWidth - width; + src32 += src_width32 - width;
+ } + }
+ break; + break;
+ } + }
...@@ -6556,7 +6818,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6556,7 +6818,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ int p, q; + int p, q;
+ int b0, b1, b2; + int b0, b1, b2;
+ XImage *im = image_scale ? image_scale : image; + XImage *im = image_scale ? image_scale : image;
+ unsigned char *scr= (unsigned char *)im->data + (y * si.framebufferWidth + x) * 3; + unsigned char *src= (unsigned char *)im->data + (y * si.framebufferWidth + x) * 3;
+ +
+ if (isLSB) { + if (isLSB) {
+ b0 = 0; b1 = 1; b2 = 2; + b0 = 0; b1 = 1; b2 = 2;
...@@ -6568,12 +6830,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6568,12 +6830,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ CARD32 v = BGR565ToPixel[*(buf++)]; + CARD32 v = BGR565ToPixel[*(buf++)];
+ *(scr + b0) = (unsigned char) ((v & 0x0000ff) >> 0); + *(src + b0) = (unsigned char) ((v & 0x0000ff) >> 0);
+ *(scr + b1) = (unsigned char) ((v & 0x00ff00) >> 8); + *(src + b1) = (unsigned char) ((v & 0x00ff00) >> 8);
+ *(scr + b2) = (unsigned char) ((v & 0xff0000) >> 16); + *(src + b2) = (unsigned char) ((v & 0xff0000) >> 16);
+ scr += 3; + src += 3;
+ } + }
+ scr += (si.framebufferWidth - width) * 3; + src += (si.framebufferWidth - width) * 3;
+ } + }
+} +}
+ +
...@@ -6582,7 +6844,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6582,7 +6844,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+{ +{
+ int p, q; + int p, q;
+ XImage *im = image_scale ? image_scale : image; + XImage *im = image_scale ? image_scale : image;
+ CARD32 *scr32 = ((CARD32 *)im->data) + y * si.framebufferWidth + x; + int src_width32 = im->bytes_per_line/4;
+ CARD32 *src32 = ((CARD32 *)im->data) + y * src_width32 + x;
+ +
+ if (visbpp == 24) { + if (visbpp == 24) {
+ BGR565_24bpp(buf, x, y, width, height); + BGR565_24bpp(buf, x, y, width, height);
...@@ -6592,15 +6855,15 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6592,15 +6855,15 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ /* case 32: */ + /* case 32: */
+ for (q = 0; q < height; q++) { + for (q = 0; q < height; q++) {
+ for (p = 0; p < width; p++) { + for (p = 0; p < width; p++) {
+ *(scr32++) = BGR565ToPixel[*(buf++)]; + *(src32++) = BGR565ToPixel[*(buf++)];
+ } + }
+ scr32 += si.framebufferWidth - width; + src32 += src_width32 - width;
+ } + }
+} +}
+ +
+static void reset_image(void) { +static void reset_image(void) {
+ if (UsingShm()) { + if (UsingShm()) {
+ ShmCleanup(); + ShmDetach();
+ } + }
+ if (image && image->data) { + if (image && image->data) {
+ XDestroyImage(image); + XDestroyImage(image);
...@@ -6618,6 +6881,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6618,6 +6881,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } + }
+ image_scale = NULL; + image_scale = NULL;
+ +
+ if (UsingShm()) {
+ ShmCleanup();
+ }
+ create_image(); + create_image();
+ XFlush(dpy); + XFlush(dpy);
+} +}
...@@ -6626,6 +6892,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6626,6 +6892,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ int w, w0, h, h0, x, y, dw, dh; + int w, w0, h, h0, x, y, dw, dh;
+ int fs = 0; + int fs = 0;
+ int autoscale = 0; + int autoscale = 0;
+ Position x_orig, y_orig;
+ Dimension w_orig, h_orig;
+ +
+ if (!appData.fullScreen && appData.scale != NULL && !strcmp(appData.scale, "auto")) { + if (!appData.fullScreen && appData.scale != NULL && !strcmp(appData.scale, "auto")) {
+ autoscale = 1; + autoscale = 1;
...@@ -6633,6 +6901,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6633,6 +6901,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ +
+ fprintf(stderr, "ReDoDesktop: ycrop: %d\n", appData.yCrop); + fprintf(stderr, "ReDoDesktop: ycrop: %d\n", appData.yCrop);
+ +
+ XtVaGetValues(toplevel, XtNx, &x_orig, XtNy, &y_orig, NULL);
+ XtVaGetValues(toplevel, XtNheight, &h_orig, XtNwidth, &w_orig, NULL);
+
+ check_tall(); + check_tall();
+ +
+ if (appData.yCrop) { + if (appData.yCrop) {
...@@ -6739,9 +7010,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6739,9 +7010,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ +
+ XtVaSetValues(desktop, XtNwidth, w0, XtNheight, h0, NULL); + XtVaSetValues(desktop, XtNwidth, w0, XtNheight, h0, NULL);
+ +
+ x = (dpyWidth - w - dw)/2;
+ y = (dpyHeight - h - dh)/2;
+
+ XtResizeWidget(desktop, w0, h0, 0); + XtResizeWidget(desktop, w0, h0, 0);
+ +
+ if (appData.yCrop > 0) { + if (appData.yCrop > 0) {
...@@ -6753,7 +7021,40 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview ...@@ -6753,7 +7021,40 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ XtVaSetValues(form, XtNmaxHeight, ycrop, NULL); + XtVaSetValues(form, XtNmaxHeight, ycrop, NULL);
+ } + }
+ +
+ x = (dpyWidth - w - dw)/2;
+ y = (dpyHeight - h - dh)/2;
+
+ if (!autoscale) { + if (!autoscale) {
+
+ if (!getenv("VNCVIEWER_ALWAYS_RECENTER")) {
+ int x_cm_old, y_cm_old;
+ int x_cm_new, y_cm_new;
+ int x_try, y_try;
+
+ x_cm_old = (int) x_orig + ((int) w_orig)/2;
+ y_cm_old = (int) y_orig + ((int) h_orig)/2;
+
+ x_cm_new = dpyWidth/2;
+ y_cm_new = dpyHeight/2;
+
+ x_try = x + (x_cm_old - x_cm_new);
+ y_try = y + (y_cm_old - y_cm_new);
+ if (x_try < 0) {
+ x_try = 0;
+ }
+ if (y_try < 0) {
+ y_try = 0;
+ }
+ if (x_try + w + dw > dpyWidth) {
+ x_try = dpyWidth - w - dw;
+ }
+ if (y_try + h + dh > dpyHeight) {
+ y_try = dpyHeight - h - dh;
+ }
+ x = x_try;
+ y = y_try;
+ }
+
+ XtConfigureWidget(toplevel, x + dw, y + dh, w, h, 0); + XtConfigureWidget(toplevel, x + dw, y + dh, w, h, 0);
+ } + }
+ +
...@@ -8557,7 +8858,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/hextile.c vnc_unixsrc/vncview ...@@ -8557,7 +8858,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/hextile.c vnc_unixsrc/vncview
+#undef FillRectangle +#undef FillRectangle
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewer/listen.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewer/listen.c
--- vnc_unixsrc.orig/vncviewer/listen.c 2001-01-16 03:07:57.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/listen.c 2001-01-16 03:07:57.000000000 -0500
+++ vnc_unixsrc/vncviewer/listen.c 2009-10-23 11:48:38.000000000 -0400 +++ vnc_unixsrc/vncviewer/listen.c 2009-11-24 18:26:13.000000000 -0500
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
#define FLASHDELAY 1 /* seconds */ #define FLASHDELAY 1 /* seconds */
...@@ -8878,7 +9179,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe ...@@ -8878,7 +9179,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe
/* /*
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/misc.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/misc.c
--- vnc_unixsrc.orig/vncviewer/misc.c 2003-01-15 02:58:32.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/misc.c 2003-01-15 02:58:32.000000000 -0500
+++ vnc_unixsrc/vncviewer/misc.c 2009-07-25 19:39:44.000000000 -0400 +++ vnc_unixsrc/vncviewer/misc.c 2009-11-28 00:44:24.000000000 -0500
@@ -33,12 +33,14 @@ @@ -33,12 +33,14 @@
Dimension dpyWidth, dpyHeight; Dimension dpyWidth, dpyHeight;
...@@ -8894,7 +9195,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -8894,7 +9195,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
/* /*
* ToplevelInitBeforeRealization sets the title, geometry and other resources * ToplevelInitBeforeRealization sets the title, geometry and other resources
@@ -48,87 +50,103 @@ @@ -48,87 +50,122 @@
void void
ToplevelInitBeforeRealization() ToplevelInitBeforeRealization()
{ {
...@@ -9018,6 +9319,25 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9018,6 +9319,25 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
+ toplevelX = (dpyWidth - toplevelWidth - appData.wmDecorationWidth) / 2; + toplevelX = (dpyWidth - toplevelWidth - appData.wmDecorationWidth) / 2;
+ toplevelY = (dpyHeight - toplevelHeight - appData.wmDecorationHeight) /2; + toplevelY = (dpyHeight - toplevelHeight - appData.wmDecorationHeight) /2;
+ +
+ if (appData.appShare) {
+ int X = appshare_x_hint;
+ int Y = appshare_y_hint;
+ if (appData.scale) {
+ double fx = 1.0, fy = 1.0;
+ get_scale_values(&fx, &fy);
+ if (fx > 0.0 && fy > 0.0) {
+ X *= fx;
+ Y *= fy;
+ }
+ }
+ if (appshare_x_hint != appshare_0_hint) {
+ toplevelX = X;
+ }
+ if (appshare_y_hint != appshare_0_hint) {
+ toplevelY = Y;
+ }
+ }
+
+ /* set position via "geometry" so that window manager thinks it's a + /* set position via "geometry" so that window manager thinks it's a
+ user-specified position and therefore honours it */ + user-specified position and therefore honours it */
+ +
...@@ -9075,7 +9395,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9075,7 +9395,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
} }
@@ -141,14 +159,22 @@ @@ -141,14 +178,22 @@
void void
ToplevelInitAfterRealization() ToplevelInitAfterRealization()
{ {
...@@ -9106,7 +9426,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9106,7 +9426,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
} }
@@ -157,9 +183,7 @@ @@ -157,9 +202,7 @@
* CurrentTime if the event has no time field. * CurrentTime if the event has no time field.
*/ */
...@@ -9117,7 +9437,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9117,7 +9437,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
switch (ev->type) { switch (ev->type) {
case KeyPress: case KeyPress:
case KeyRelease: case KeyRelease:
@@ -192,18 +216,15 @@ @@ -192,18 +235,15 @@
* generated by SendRFBEvent. * generated by SendRFBEvent.
*/ */
...@@ -9144,7 +9464,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9144,7 +9464,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
} }
@@ -264,11 +285,9 @@ @@ -264,11 +304,9 @@
* Quit action - called when we get a "delete window" message. * Quit action - called when we get a "delete window" message.
*/ */
...@@ -9159,7 +9479,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9159,7 +9479,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
} }
@@ -276,49 +295,90 @@ @@ -276,49 +314,93 @@
* Cleanup - perform any cleanup operations prior to exiting. * Cleanup - perform any cleanup operations prior to exiting.
*/ */
...@@ -9187,6 +9507,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ ...@@ -9187,6 +9507,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
- if (appData.useShm) - if (appData.useShm)
- ShmCleanup(); - ShmCleanup();
+ if (appData.useShm) { + if (appData.useShm) {
+ if (UsingShm()) {
+ ShmDetach();
+ }
+ ShmCleanup(); + ShmCleanup();
+ } + }
#endif #endif
...@@ -10170,7 +10493,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe ...@@ -10170,7 +10493,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe
+} +}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncviewer/rfbproto.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncviewer/rfbproto.c
--- vnc_unixsrc.orig/vncviewer/rfbproto.c 2008-09-05 19:51:24.000000000 -0400 --- vnc_unixsrc.orig/vncviewer/rfbproto.c 2008-09-05 19:51:24.000000000 -0400
+++ vnc_unixsrc/vncviewer/rfbproto.c 2009-11-02 10:02:00.000000000 -0500 +++ vnc_unixsrc/vncviewer/rfbproto.c 2009-11-27 11:50:35.000000000 -0500
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
* rfbproto.c - functions to deal with client side of RFB protocol. * rfbproto.c - functions to deal with client side of RFB protocol.
*/ */
...@@ -10340,7 +10663,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -10340,7 +10663,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ pid_t pid; + pid_t pid;
+ +
+ q = strstr(cmd2, "pw="); + q = strstr(cmd2, "pw=");
+ if (q) { + if (q && !getenv("SSVNC_SHOW_ULTRAVNC_DSM_PASSWORD")) {
+ q += strlen("pw="); + q += strlen("pw=");
+ while (*q != '\0' && !isspace(*q)) { + while (*q != '\0' && !isspace(*q)) {
+ *q = '*'; + *q = '*';
...@@ -10479,7 +10802,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -10479,7 +10802,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/* /*
* InitialiseRFBConnection. * InitialiseRFBConnection.
*/ */
@@ -212,211 +439,620 @@ @@ -212,211 +439,649 @@
Bool Bool
InitialiseRFBConnection(void) InitialiseRFBConnection(void)
{ {
...@@ -10791,7 +11114,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -10791,7 +11114,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ sprintf(pv, rfbProtocolVersionFormat, viewer_major, viewer_minor); + sprintf(pv, rfbProtocolVersionFormat, viewer_major, viewer_minor);
- fprintf(stderr,"Desktop name \"%s\"\n",desktopName); - fprintf(stderr,"Desktop name \"%s\"\n",desktopName);
+ usleep(100*1000); + if (!appData.appShare) {
+ usleep(100*1000);
+ }
+ dt = dnow(); + dt = dnow();
+ if (!WriteExact(rfbsock, pv, sz_rfbProtocolVersionMsg)) { + if (!WriteExact(rfbsock, pv, sz_rfbProtocolVersionMsg)) {
+ return False; + return False;
...@@ -11049,6 +11374,33 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11049,6 +11374,33 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ +
+ desktopName[si.nameLength] = 0; + desktopName[si.nameLength] = 0;
+ +
+ if (appData.appShare) {
+ int x_hint, y_hint;
+ char *p, *q = NULL;
+ p = desktopName;
+ while (*p != '\0') {
+ char *t = strstr(p, " XY=");
+ if (t) q = t;
+ p++;
+ }
+ if (q) {
+ int ok = 1;
+ p = q + strlen(" XY=");
+ while (*p != '\0') {
+ if (!strpbrk(p, "0123456789,+-")) {
+ ok = 0;
+ }
+ p++;
+ }
+ if (ok && sscanf(q+1, "XY=%d,%d", &x_hint, &y_hint) == 2) {
+ fprintf(stderr,"Using x11vnc appshare position: %s\n\n", q);
+ *q = '\0';
+ appshare_x_hint = x_hint;
+ appshare_y_hint = y_hint;
+ }
+ }
+ }
+
+ fprintf(stderr,"Desktop name \"%s\"\n\n", desktopName); + fprintf(stderr,"Desktop name \"%s\"\n\n", desktopName);
+ +
+ fprintf(stderr,"VNC server default format:\n"); + fprintf(stderr,"VNC server default format:\n");
...@@ -11223,8 +11575,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11223,8 +11575,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ return rfbSecTypeTight; + return rfbSecTypeTight;
+ } + }
+ } + }
+
- return (int)secType;
+ /* Find first supported security type */ + /* Find first supported security type */
+ for (j = 0; j < (int)nSecTypes; j++) { + for (j = 0; j < (int)nSecTypes; j++) {
+ for (i = 0; i < nKnownSecTypes; i++) { + for (i = 0; i < nKnownSecTypes; i++) {
...@@ -11250,12 +11601,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11250,12 +11601,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ } + }
+ +
+ free(secTypes); + free(secTypes);
+
- return (int)secType;
+ return (int)secType; + return (int)secType;
} }
@@ -451,6 +1087,9 @@ @@ -451,6 +1116,9 @@
return True; return True;
} }
...@@ -11265,7 +11617,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11265,7 +11617,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/* /*
* Negotiate authentication scheme (protocol version 3.7t) * Negotiate authentication scheme (protocol version 3.7t)
@@ -459,58 +1098,388 @@ @@ -459,58 +1127,388 @@
static Bool static Bool
PerformAuthenticationTight(void) PerformAuthenticationTight(void)
{ {
...@@ -11430,7 +11782,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11430,7 +11782,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ } + }
+} +}
+#endif +#endif
+
- fprintf(stderr, "No suitable authentication schemes offered by server\n");
- return False;
+static void hexprint(char *label, char *data, int len) { +static void hexprint(char *label, char *data, int len) {
+ int i; + int i;
+ fprintf(stderr, "%s: ", label); + fprintf(stderr, "%s: ", label);
...@@ -11450,16 +11804,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11450,16 +11804,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+static unsigned long long bytes_to_uint64(char *bytes) { +static unsigned long long bytes_to_uint64(char *bytes) {
+ unsigned long long result = 0; + unsigned long long result = 0;
+ int i; + int i;
+
- fprintf(stderr, "No suitable authentication schemes offered by server\n");
- return False;
+ for (i=0; i < 8; i++) { + for (i=0; i < 8; i++) {
+ result <<= 8; + result <<= 8;
+ result += (unsigned char) bytes[i]; + result += (unsigned char) bytes[i];
+ } + }
+ return result; + return result;
} +}
+
+static void uint64_to_bytes(unsigned long long n, char *bytes) { +static void uint64_to_bytes(unsigned long long n, char *bytes) {
+ int i; + int i;
+ +
...@@ -11485,8 +11837,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11485,8 +11837,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ } + }
+ } + }
+ return result; + return result;
+} }
+
+/* +/*
+ * UltraVNC MS-Logon authentication (for v1.0.5 and later.) + * UltraVNC MS-Logon authentication (for v1.0.5 and later.)
+ */ + */
...@@ -11696,7 +12048,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11696,7 +12048,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/* /*
* Standard VNC authentication. * Standard VNC authentication.
@@ -519,80 +1488,115 @@ @@ -519,80 +1517,115 @@
static Bool static Bool
AuthenticateVNC(void) AuthenticateVNC(void)
{ {
...@@ -11875,7 +12227,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -11875,7 +12227,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
/* /*
@@ -602,68 +1606,75 @@ @@ -602,68 +1635,75 @@
static Bool static Bool
AuthenticateUnixLogin(void) AuthenticateUnixLogin(void)
{ {
...@@ -12003,7 +12355,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12003,7 +12355,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -675,19 +1686,20 @@ @@ -675,19 +1715,20 @@
static Bool static Bool
ReadInteractionCaps(void) ReadInteractionCaps(void)
{ {
...@@ -12036,7 +12388,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12036,7 +12388,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -700,19 +1712,67 @@ @@ -700,19 +1741,67 @@
static Bool static Bool
ReadCapabilityList(CapsContainer *caps, int count) ReadCapabilityList(CapsContainer *caps, int count)
{ {
...@@ -12113,7 +12465,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12113,7 +12465,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/* /*
* SetFormatAndEncodings. * SetFormatAndEncodings.
@@ -729,6 +1789,17 @@ @@ -729,6 +1818,17 @@
Bool requestCompressLevel = False; Bool requestCompressLevel = False;
Bool requestQualityLevel = False; Bool requestQualityLevel = False;
Bool requestLastRectEncoding = False; Bool requestLastRectEncoding = False;
...@@ -12131,7 +12483,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12131,7 +12483,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
spf.type = rfbSetPixelFormat; spf.type = rfbSetPixelFormat;
spf.format = myFormat; spf.format = myFormat;
@@ -736,15 +1807,32 @@ @@ -736,15 +1836,32 @@
spf.format.greenMax = Swap16IfLE(spf.format.greenMax); spf.format.greenMax = Swap16IfLE(spf.format.greenMax);
spf.format.blueMax = Swap16IfLE(spf.format.blueMax); spf.format.blueMax = Swap16IfLE(spf.format.blueMax);
...@@ -12164,7 +12516,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12164,7 +12516,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
do { do {
char *nextEncStr = strchr(encStr, ' '); char *nextEncStr = strchr(encStr, ' ');
if (nextEncStr) { if (nextEncStr) {
@@ -754,50 +1842,102 @@ @@ -754,50 +1871,102 @@
encStrLen = strlen(encStr); encStrLen = strlen(encStr);
} }
...@@ -12283,7 +12635,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12283,7 +12635,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRichCursor); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRichCursor);
if (se->nEncodings < MAX_ENCODINGS) if (se->nEncodings < MAX_ENCODINGS)
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingPointerPos); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingPointerPos);
@@ -806,10 +1946,16 @@ @@ -806,10 +1975,16 @@
if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) { if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) {
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect);
} }
...@@ -12303,7 +12655,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12303,7 +12655,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
fprintf(stderr,"Same machine: preferring raw encoding\n"); fprintf(stderr,"Same machine: preferring raw encoding\n");
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRaw); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRaw);
} else { } else {
@@ -818,44 +1964,84 @@ @@ -818,44 +1993,84 @@
} }
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingCopyRect); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingCopyRect);
...@@ -12410,7 +12762,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12410,7 +12762,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
return True; return True;
} }
@@ -868,31 +2054,86 @@ @@ -868,31 +2083,86 @@
Bool Bool
SendIncrementalFramebufferUpdateRequest() SendIncrementalFramebufferUpdateRequest()
{ {
...@@ -12510,7 +12862,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12510,7 +12862,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -903,19 +2144,36 @@ @@ -903,19 +2173,36 @@
Bool Bool
SendPointerEvent(int x, int y, int buttonMask) SendPointerEvent(int x, int y, int buttonMask)
{ {
...@@ -12559,7 +12911,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12559,7 +12911,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -926,12 +2184,20 @@ @@ -926,12 +2213,20 @@
Bool Bool
SendKeyEvent(CARD32 key, Bool down) SendKeyEvent(CARD32 key, Bool down)
{ {
...@@ -12585,7 +12937,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -12585,7 +12937,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -942,281 +2208,1024 @@ @@ -942,281 +2237,1024 @@
Bool Bool
SendClientCutText(char *str, int len) SendClientCutText(char *str, int len)
{ {
...@@ -13832,7 +14184,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -13832,7 +14184,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
#ifdef MITSHM #ifdef MITSHM
/* if using shared memory PutImage, make sure that the X server has /* if using shared memory PutImage, make sure that the X server has
@@ -1224,59 +3233,168 @@ @@ -1224,59 +3262,168 @@
mainly to avoid copyrect using invalid screen contents - not sure mainly to avoid copyrect using invalid screen contents - not sure
if we'd need it otherwise. */ if we'd need it otherwise. */
...@@ -14034,7 +14386,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -14034,7 +14386,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
@@ -1296,26 +3414,93 @@ @@ -1296,26 +3443,93 @@
#define CONCAT2(a,b) a##b #define CONCAT2(a,b) a##b
#define CONCAT2E(a,b) CONCAT2(a,b) #define CONCAT2E(a,b) CONCAT2(a,b)
...@@ -14128,7 +14480,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -14128,7 +14480,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
#undef BPP #undef BPP
/* /*
@@ -1325,23 +3510,27 @@ @@ -1325,23 +3539,27 @@
static void static void
ReadConnFailedReason(void) ReadConnFailedReason(void)
{ {
...@@ -14170,7 +14522,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -14170,7 +14522,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
} }
/* /*
@@ -1358,9 +3547,9 @@ @@ -1358,9 +3576,9 @@
" %s significant bit in each byte is leftmost on the screen.\n", " %s significant bit in each byte is leftmost on the screen.\n",
(format->bigEndian ? "Most" : "Least")); (format->bigEndian ? "Most" : "Least"));
} else { } else {
...@@ -14182,7 +14534,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie ...@@ -14182,7 +14534,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
(format->bigEndian ? "Most" : "Least")); (format->bigEndian ? "Most" : "Least"));
} }
if (format->trueColour) { if (format->trueColour) {
@@ -1462,4 +3651,3 @@ @@ -1462,4 +3680,3 @@
cinfo->src = &jpegSrcManager; cinfo->src = &jpegSrcManager;
} }
...@@ -14255,7 +14607,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rre.c vnc_unixsrc/vncviewer/r ...@@ -14255,7 +14607,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rre.c vnc_unixsrc/vncviewer/r
+#undef FillRectangle +#undef FillRectangle
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncviewer/selection.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncviewer/selection.c
--- vnc_unixsrc.orig/vncviewer/selection.c 2004-03-03 04:11:52.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/selection.c 2004-03-03 04:11:52.000000000 -0500
+++ vnc_unixsrc/vncviewer/selection.c 2009-05-31 18:35:25.000000000 -0400 +++ vnc_unixsrc/vncviewer/selection.c 2009-11-24 13:34:03.000000000 -0500
@@ -43,13 +43,16 @@ @@ -43,13 +43,16 @@
unsigned long* length, int* format); unsigned long* length, int* format);
static void LoseSelection(Widget w, Atom *selection); static void LoseSelection(Widget w, Atom *selection);
...@@ -14485,7 +14837,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi ...@@ -14485,7 +14837,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi
} }
@@ -249,36 +264,61 @@ @@ -249,36 +264,68 @@
void void
SelectionFromVNC(Widget w, XEvent *event, String *params, Cardinal *num_params) SelectionFromVNC(Widget w, XEvent *event, String *params, Cardinal *num_params)
{ {
...@@ -14549,6 +14901,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi ...@@ -14549,6 +14901,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi
+ +
+ newServerCutText = False; + newServerCutText = False;
+ +
+ if (appData.appShare) {
+ if (strstr(serverCutText, "X11VNC_APPSHARE_CMD:") == serverCutText) {
+ /* do something with it? */
+ return;
+ }
+ }
+
+ XStoreBytes(dpy, serverCutText, strlen(serverCutText)); + XStoreBytes(dpy, serverCutText, strlen(serverCutText));
+ +
+ if (appData.recvText == NULL) { + if (appData.recvText == NULL) {
...@@ -14577,7 +14936,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi ...@@ -14577,7 +14936,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi
} }
@@ -293,37 +333,36 @@ @@ -293,37 +340,36 @@
XtPointer* value, unsigned long* length, int* format) XtPointer* value, unsigned long* length, int* format)
{ {
...@@ -14643,7 +15002,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi ...@@ -14643,7 +15002,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi
} }
@@ -332,7 +371,12 @@ @@ -332,7 +378,12 @@
*/ */
static void static void
...@@ -14661,46 +15020,43 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi ...@@ -14661,46 +15020,43 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/selection.c vnc_unixsrc/vncvi
} }
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/shm.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/shm.c
--- vnc_unixsrc.orig/vncviewer/shm.c 2000-06-11 08:00:53.000000000 -0400 --- vnc_unixsrc.orig/vncviewer/shm.c 2000-06-11 08:00:53.000000000 -0400
+++ vnc_unixsrc/vncviewer/shm.c 2008-10-10 12:26:07.000000000 -0400 +++ vnc_unixsrc/vncviewer/shm.c 2009-11-28 02:25:03.000000000 -0500
@@ -33,68 +33,97 @@ @@ -30,71 +30,108 @@
void static Bool caughtShmError = False;
ShmCleanup() static Bool needShmCleanup = False;
{
-void
-ShmCleanup()
-{
- fprintf(stderr,"ShmCleanup called\n"); - fprintf(stderr,"ShmCleanup called\n");
- if (needShmCleanup) { - if (needShmCleanup) {
- shmdt(shminfo.shmaddr); - shmdt(shminfo.shmaddr);
- shmctl(shminfo.shmid, IPC_RMID, 0); - shmctl(shminfo.shmid, IPC_RMID, 0);
- needShmCleanup = False; - needShmCleanup = False;
- } - }
+ fprintf(stderr,"ShmCleanup called\n"); +static int ShmCreationXErrorHandler(Display *dpy, XErrorEvent *error) {
+ if (needShmCleanup) { + caughtShmError = True;
+ shmdt(shminfo.shmaddr); + return 0;
+ shmctl(shminfo.shmid, IPC_RMID, 0);
+ needShmCleanup = False;
+ }
+}
+
+Bool UsingShm() {
+ return needShmCleanup;
} }
static int -static int
ShmCreationXErrorHandler(Display *dpy, XErrorEvent *error) -ShmCreationXErrorHandler(Display *dpy, XErrorEvent *error)
{ -{
- caughtShmError = True; - caughtShmError = True;
- return 0; - return 0;
+ caughtShmError = True; +void ShmDetach() {
+ return 0; + if (needShmCleanup) {
+ XErrorHandler oldXErrorHandler = XSetErrorHandler(ShmCreationXErrorHandler);
+ fprintf(stderr,"ShmDetach called.\n");
+ XShmDetach(dpy, &shminfo);
+ XSync(dpy, False);
+ XSetErrorHandler(oldXErrorHandler);
+ }
} }
+int scale_round(int len, double fac); -XImage *
+extern int scale_x, scale_y;
+extern double scale_factor_x, scale_factor_y;
+
XImage *
-CreateShmImage() -CreateShmImage()
+CreateShmImage(int do_ycrop) -{
{
- XImage *image; - XImage *image;
- XErrorHandler oldXErrorHandler; - XErrorHandler oldXErrorHandler;
- -
...@@ -14714,7 +15070,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/s ...@@ -14714,7 +15070,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/s
- shminfo.shmid = shmget(IPC_PRIVATE, - shminfo.shmid = shmget(IPC_PRIVATE,
- image->bytes_per_line * image->height, - image->bytes_per_line * image->height,
- IPC_CREAT|0777); - IPC_CREAT|0777);
- +void ShmCleanup() {
+ if (needShmCleanup) {
+ fprintf(stderr,"ShmCleanup called.\n");
+ XSync(dpy, False);
+ shmdt(shminfo.shmaddr);
+ shmctl(shminfo.shmid, IPC_RMID, 0);
- if (shminfo.shmid == -1) { - if (shminfo.shmid == -1) {
- XDestroyImage(image); - XDestroyImage(image);
- return NULL; - return NULL;
...@@ -14727,20 +15089,32 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/s ...@@ -14727,20 +15089,32 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/shm.c vnc_unixsrc/vncviewer/s
- shmctl(shminfo.shmid, IPC_RMID, 0); - shmctl(shminfo.shmid, IPC_RMID, 0);
- return NULL; - return NULL;
- } - }
- + needShmCleanup = False;
+ }
+}
- shminfo.readOnly = True; - shminfo.readOnly = True;
- +Bool UsingShm() {
+ return needShmCleanup;
+}
- oldXErrorHandler = XSetErrorHandler(ShmCreationXErrorHandler); - oldXErrorHandler = XSetErrorHandler(ShmCreationXErrorHandler);
- XShmAttach(dpy, &shminfo); - XShmAttach(dpy, &shminfo);
- XSync(dpy, False); - XSync(dpy, False);
- XSetErrorHandler(oldXErrorHandler); - XSetErrorHandler(oldXErrorHandler);
- +int scale_round(int len, double fac);
+extern int scale_x, scale_y;
+extern double scale_factor_x, scale_factor_y;
- if (caughtShmError) { - if (caughtShmError) {
- XDestroyImage(image); - XDestroyImage(image);
- shmdt(shminfo.shmaddr); - shmdt(shminfo.shmaddr);
- shmctl(shminfo.shmid, IPC_RMID, 0); - shmctl(shminfo.shmid, IPC_RMID, 0);
- return NULL; - return NULL;
- } - }
+XImage *
+CreateShmImage(int do_ycrop)
+{
+ XImage *image; + XImage *image;
+ XErrorHandler oldXErrorHandler; + XErrorHandler oldXErrorHandler;
+ int ymax = si.framebufferHeight; + int ymax = si.framebufferHeight;
...@@ -14829,7 +15203,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/smake vnc_unixsrc/vncviewer/s ...@@ -14829,7 +15203,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/smake vnc_unixsrc/vncviewer/s
+fi +fi
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncviewer/sockets.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncviewer/sockets.c
--- vnc_unixsrc.orig/vncviewer/sockets.c 2001-01-14 22:54:18.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/sockets.c 2001-01-14 22:54:18.000000000 -0500
+++ vnc_unixsrc/vncviewer/sockets.c 2009-08-01 19:05:47.000000000 -0400 +++ vnc_unixsrc/vncviewer/sockets.c 2009-11-27 13:55:46.000000000 -0500
@@ -27,11 +27,17 @@ @@ -27,11 +27,17 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
...@@ -15435,6 +15809,15 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview ...@@ -15435,6 +15809,15 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview
sock = socket(AF_INET, SOCK_STREAM, 0); sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) { if (sock < 0) {
fprintf(stderr,programName); fprintf(stderr,programName);
@@ -305,7 +731,7 @@
return -1;
}
- if (listen(sock, 5) < 0) {
+ if (listen(sock, 32) < 0) {
fprintf(stderr,programName);
perror(": ListenAtTcpPort: listen");
close(sock);
@@ -392,6 +818,42 @@ @@ -392,6 +818,42 @@
return False; return False;
} }
...@@ -16406,8 +16789,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/turbovnc/turbojpeg.h vnc_unix ...@@ -16406,8 +16789,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/turbovnc/turbojpeg.h vnc_unix
+#endif +#endif
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vncviewer/vncviewer._man diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vncviewer/vncviewer._man
--- vnc_unixsrc.orig/vncviewer/vncviewer._man 1969-12-31 19:00:00.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/vncviewer._man 1969-12-31 19:00:00.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer._man 2009-10-23 12:24:51.000000000 -0400 +++ vnc_unixsrc/vncviewer/vncviewer._man 2009-11-25 00:03:28.000000000 -0500
@@ -0,0 +1,799 @@ @@ -0,0 +1,823 @@
+'\" t +'\" t
+.\" ** The above line should force tbl to be a preprocessor ** +.\" ** The above line should force tbl to be a preprocessor **
+.\" Man page for X vncviewer +.\" Man page for X vncviewer
...@@ -16875,6 +17258,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn ...@@ -16875,6 +17258,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+framebuffer update coming in. Helps 'pipeline' the updates. +framebuffer update coming in. Helps 'pipeline' the updates.
+This is currently the default, use \fB-nopipeline\fR to disable. +This is currently the default, use \fB-nopipeline\fR to disable.
+.TP +.TP
+\fB\-appshare\fR
+Enable features for use with x11vnc's \fB\-appshare\fR mode where
+instead of sharing the full desktop only the application's
+windows are shared. Viewer multilisten mode is used to
+create the multiple windows: \fB\-multilisten\fR is implied.
+See 'x11vnc \fB\-appshare\fR \fB\-help\fR' more information on the mode.
+Features enabled in the viewer under \fB\-appshare\fR are:
+Minimum extra text in the title, auto \fB\-ycrop\fR is disabled,
+x11vnc \fB\-remote_prefix\fR X11VNC_APPSHARE_CMD: message channel,
+x11vnc initial window position hints. See also Escape Keys
+below for additional key and mouse bindings.
+.TP
+\fB\-escape \fR\fIstr\fR +\fB\-escape \fR\fIstr\fR
+This sets the 'Escape Keys' modifier sequence and enables +This sets the 'Escape Keys' modifier sequence and enables
+escape keys mode. When the modifier keys escape sequence +escape keys mode. When the modifier keys escape sequence
...@@ -16921,6 +17316,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn ...@@ -16921,6 +17316,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+The above mappings are \fBalways\fR active in ViewOnly mode, unless you set +The above mappings are \fBalways\fR active in ViewOnly mode, unless you set
+the Escape Keys value to 'never'. +the Escape Keys value to 'never'.
+ +
+x11vnc -appshare hot-keys: x11vnc has a simple application sharing mode
+that enables the viewer-side to move, resize, or raise the remote toplevel
+windows. To enable it, hold down Shift + the Escape Keys and press these:
+
+Arrow keys: move the remote window around in its desktop.
+
+PageUp/PageDn/Home/End: resize the remote window.
+
++/-: raise or lower the remote window.
+
+M or Button1 move win to local position; D or Button3: delete remote win.
+
+If the Escape Keys value below is set to 'default' then a default list of +If the Escape Keys value below is set to 'default' then a default list of
+of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it +of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it
+is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag +is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag
...@@ -17209,7 +17616,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn ...@@ -17209,7 +17616,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+Karl J. Runge <runge@karlrunge.com> +Karl J. Runge <runge@karlrunge.com>
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncviewer/vncviewer.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncviewer/vncviewer.c
--- vnc_unixsrc.orig/vncviewer/vncviewer.c 2004-01-13 09:22:05.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/vncviewer.c 2004-01-13 09:22:05.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.c 2009-10-23 11:53:44.000000000 -0400 +++ vnc_unixsrc/vncviewer/vncviewer.c 2009-11-24 19:41:33.000000000 -0500
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
*/ */
...@@ -17218,7 +17625,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17218,7 +17625,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
char *programName; char *programName;
XtAppContext appContext; XtAppContext appContext;
@@ -29,11 +30,241 @@ @@ -29,11 +30,258 @@
Widget toplevel; Widget toplevel;
...@@ -17260,6 +17667,21 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17260,6 +17667,21 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ } + }
+} +}
+ +
+void min_title(void) {
+ char *q, *p;
+ int i, k, N = 4;
+ int db = 0;
+
+ k = 0;
+ while (fallback_resources[k] != NULL) {
+ q = strstr(fallback_resources[k], "Ssvnc.title: ");
+ if (q) {
+ fallback_resources[k] = strdup("Ssvnc.title: %s");
+ }
+ k++;
+ }
+}
+
+#include <sys/types.h> +#include <sys/types.h>
+#include <sys/stat.h> +#include <sys/stat.h>
+#include <unistd.h> +#include <unistd.h>
...@@ -17439,18 +17861,20 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17439,18 +17861,20 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ } + }
+ } + }
+} +}
+
+int saw_appshare = 0;
+ +
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
- int i; - int i;
- programName = argv[0]; - programName = argv[0];
+ int i, save_sbw; + int i, save_sbw, saw_listen = 0;
+ char *pw_loc = NULL; + char *pw_loc = NULL;
+ programName = argv[0]; + programName = argv[0];
+ +
+ for (i = 1; i < argc; i++) { + for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-env") == 0) { + if (!strcmp(argv[i], "-env")) {
+ if (i+1 < argc) { + if (i+1 < argc) {
+ char *estr = argv[i+1]; + char *estr = argv[i+1];
+ if (strchr(estr, '=')) { + if (strchr(estr, '=')) {
...@@ -17462,7 +17886,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17462,7 +17886,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
/* The -listen option is used to make us a daemon process which listens for /* The -listen option is used to make us a daemon process which listens for
incoming connections from servers, rather than actively connecting to a incoming connections from servers, rather than actively connecting to a
@@ -45,89 +276,1647 @@ @@ -45,89 +293,1667 @@
listenForIncomingConnections() returns, setting the listenSpecified listenForIncomingConnections() returns, setting the listenSpecified
flag. */ flag. */
...@@ -17478,36 +17902,49 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17478,36 +17902,49 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
- } - }
- } - }
+ for (i = 1; i < argc; i++) { + for (i = 1; i < argc; i++) {
+ if (!strcmp(argv[i], "-appshare")) {
+ putenv("SSVNC_MULTIPLE_LISTEN=1");
+ fprintf(stderr, "Enabling -multilisten mode for 'x11vnc -appshare' usage.\n\n");
+ saw_appshare = 1;
+ }
+ if (!strcmp(argv[i], "-multilisten")) {
+ putenv("SSVNC_MULTIPLE_LISTEN=1");
+ saw_listen = 2;
+ }
+ if (!strcmp(argv[i], "-listen")) {
+ saw_listen = 1;
+ }
+ if (!strcmp(argv[i], "-acceptpopup")) {
+ putenv("SSVNC_ACCEPT_POPUP=1");
+ }
+ if (!strcmp(argv[i], "-acceptpopupsc")) {
+ putenv("SSVNC_ACCEPT_POPUP_SC=1");
+ }
+ if (strstr(argv[i], " pw=") != NULL) { + if (strstr(argv[i], " pw=") != NULL) {
+ pw_loc = strstr(argv[i], " pw=") + 1; + pw_loc = strstr(argv[i], " pw=") + 1;
+ } + }
+ } + }
+ +
+ for (i = 1; i < argc; i++) { + for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-acceptpopup") == 0) { + if (!strcmp(argv[i], "-appshare") && !saw_listen) {
+ putenv("SSVNC_ACCEPT_POPUP=1"); + listenForIncomingConnections(&argc, argv, i);
+ continue; + break;
+ }
+ if (strcmp(argv[i], "-acceptpopupsc") == 0) {
+ putenv("SSVNC_ACCEPT_POPUP_SC=1");
+ continue;
+ } + }
+ if (strcmp(argv[i], "-listen") == 0) { + if (!strcmp(argv[i], "-multilisten")) {
+ listenForIncomingConnections(&argc, argv, i); + listenForIncomingConnections(&argc, argv, i);
+ break; + break;
+ } + }
+ if (strcmp(argv[i], "-multilisten") == 0) { + if (!strcmp(argv[i], "-listen")) {
+ putenv("SSVNC_MULTIPLE_LISTEN=1");
+ listenForIncomingConnections(&argc, argv, i); + listenForIncomingConnections(&argc, argv, i);
+ break; + break;
+ } + }
+ if (strcmp(argv[i], "-tunnel") == 0 || strcmp(argv[i], "-via") == 0) { + if (!strcmp(argv[i], "-tunnel") || !strcmp(argv[i], "-via")) {
+ if (!createTunnel(&argc, argv, i)) { + if (!createTunnel(&argc, argv, i)) {
+ exit(1); + exit(1);
+ } + }
+ break; + break;
+ } + }
+ if (strcmp(argv[i], "-printres") == 0 || strcmp(argv[i], "-res") == 0) { + if (!strcmp(argv[i], "-printres") || !strcmp(argv[i], "-res")) {
+ int j = 0; + int j = 0;
+ fprintf(stdout, "\n! Ssvnc fallback X resources:\n\n"); + fprintf(stdout, "\n! Ssvnc fallback X resources:\n\n");
+ while (1) { + while (1) {
...@@ -17541,6 +17978,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17541,6 +17978,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
- cmdLineOptions, numCmdLineOptions, - cmdLineOptions, numCmdLineOptions,
- &argc, argv, fallback_resources, - &argc, argv, fallback_resources,
- XtNborderWidth, 0, NULL); - XtNborderWidth, 0, NULL);
+ if (saw_appshare || getenv("VNCVIEWER_MIN_TITLE")) {
+ min_title();
+ }
+ appData.sbWidth = 0; + appData.sbWidth = 0;
+ if (getenv("VNCVIEWER_SBWIDTH")) { + if (getenv("VNCVIEWER_SBWIDTH")) {
+ int sbw = atoi(getenv("VNCVIEWER_SBWIDTH")); + int sbw = atoi(getenv("VNCVIEWER_SBWIDTH"));
...@@ -17581,6 +18021,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -17581,6 +18021,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
- GetArgsAndResources(argc, argv); - GetArgsAndResources(argc, argv);
+ GetArgsAndResources(argc, argv); + GetArgsAndResources(argc, argv);
+ +
+ if (saw_appshare) {
+ appData.appShare = True;
+ }
+
+ if (save_sbw) { + if (save_sbw) {
+ appData.sbWidth = save_sbw; + appData.sbWidth = save_sbw;
+ } + }
...@@ -18379,8 +18823,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -18379,8 +18823,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ schedule_fb_update(); + schedule_fb_update();
+ } + }
+} +}
+
- Cleanup();
+void +void
+DoServerScale(Widget w, XEvent *ev, String *params, Cardinal *num_params) +DoServerScale(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{ +{
...@@ -18470,8 +18913,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -18470,8 +18913,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ set_server_compress(n); + set_server_compress(n);
+ } + }
+} +}
+
- return 0;
+extern void rescale_image(void); +extern void rescale_image(void);
+ +
+void +void
...@@ -18537,7 +18979,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -18537,7 +18979,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ schedule_fb_update(); + schedule_fb_update();
+ } + }
+} +}
+
- Cleanup();
+void +void
+SetYCrop(Widget w, XEvent *ev, String *params, Cardinal *num_params) +SetYCrop(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{ +{
...@@ -18674,7 +19117,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -18674,7 +19117,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ appData.compressLevel = 0; + appData.compressLevel = 0;
+ UpdateQual(); + UpdateQual();
+} +}
+
- return 0;
+static void QualLosslessWAN(void) { +static void QualLosslessWAN(void) {
+ appData.encodingsString = "tight copyrect"; + appData.encodingsString = "tight copyrect";
+ appData.enableJPEG = False; + appData.enableJPEG = False;
...@@ -19148,7 +19592,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi ...@@ -19148,7 +19592,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
} }
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncviewer/vncviewer.h diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncviewer/vncviewer.h
--- vnc_unixsrc.orig/vncviewer/vncviewer.h 2004-03-11 13:14:40.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/vncviewer.h 2004-03-11 13:14:40.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.h 2009-10-23 11:27:05.000000000 -0400 +++ vnc_unixsrc/vncviewer/vncviewer.h 2009-11-28 00:45:15.000000000 -0500
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
#include <string.h> #include <string.h>
#include <sys/time.h> #include <sys/time.h>
...@@ -19172,7 +19616,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19172,7 +19616,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
#define FLASH_PORT_OFFSET 5400 #define FLASH_PORT_OFFSET 5400
#define LISTEN_PORT_OFFSET 5500 #define LISTEN_PORT_OFFSET 5500
@@ -64,60 +71,125 @@ @@ -64,60 +71,126 @@
#define DEFAULT_VIA_CMD \ #define DEFAULT_VIA_CMD \
(DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20") (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
...@@ -19313,6 +19757,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19313,6 +19757,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+ +
+ char *scale; + char *scale;
+ char *escapeKeys; + char *escapeKeys;
+ Bool appShare;
+ Bool escapeActive; + Bool escapeActive;
+ Bool pipelineUpdates; + Bool pipelineUpdates;
+ +
...@@ -19338,7 +19783,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19338,7 +19783,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern int listenPort, flashPort; extern int listenPort, flashPort;
extern XrmOptionDescRec cmdLineOptions[]; extern XrmOptionDescRec cmdLineOptions[];
@@ -130,10 +202,11 @@ @@ -130,10 +203,11 @@
/* colour.c */ /* colour.c */
extern unsigned long BGR233ToPixel[]; extern unsigned long BGR233ToPixel[];
...@@ -19351,8 +19796,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19351,8 +19796,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern void SetVisualAndCmap(); extern void SetVisualAndCmap();
@@ -157,13 +230,54 @@ @@ -155,15 +229,60 @@
extern GC srcGC, dstGC;
extern Dimension dpyWidth, dpyHeight;
+extern int appshare_0_hint;
+extern int appshare_x_hint;
+extern int appshare_y_hint;
+
extern void DesktopInitBeforeRealization(); extern void DesktopInitBeforeRealization();
extern void DesktopInitAfterRealization(); extern void DesktopInitAfterRealization();
+extern void Xcursors(int set); +extern void Xcursors(int set);
...@@ -19406,7 +19857,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19406,7 +19857,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern void ServerDialogDone(Widget w, XEvent *event, String *params, extern void ServerDialogDone(Widget w, XEvent *event, String *params,
Cardinal *num_params); Cardinal *num_params);
extern char *DoServerDialog(); extern char *DoServerDialog();
@@ -171,6 +285,10 @@ @@ -171,6 +290,10 @@
Cardinal *num_params); Cardinal *num_params);
extern char *DoPasswordDialog(); extern char *DoPasswordDialog();
...@@ -19417,7 +19868,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19417,7 +19868,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* fullscreen.c */ /* fullscreen.c */
extern void ToggleFullScreen(Widget w, XEvent *event, String *params, extern void ToggleFullScreen(Widget w, XEvent *event, String *params,
@@ -181,6 +299,13 @@ @@ -181,6 +304,13 @@
extern void FullScreenOn(); extern void FullScreenOn();
extern void FullScreenOff(); extern void FullScreenOff();
...@@ -19431,7 +19882,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19431,7 +19882,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* listen.c */ /* listen.c */
extern void listenForIncomingConnections(); extern void listenForIncomingConnections();
@@ -196,6 +321,8 @@ @@ -196,6 +326,8 @@
Cardinal *num_params); Cardinal *num_params);
extern void Quit(Widget w, XEvent *event, String *params, extern void Quit(Widget w, XEvent *event, String *params,
Cardinal *num_params); Cardinal *num_params);
...@@ -19440,7 +19891,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19440,7 +19891,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern void Cleanup(); extern void Cleanup();
/* popup.c */ /* popup.c */
@@ -207,6 +334,29 @@ @@ -207,6 +339,29 @@
Cardinal *num_params); Cardinal *num_params);
extern void CreatePopup(); extern void CreatePopup();
...@@ -19470,7 +19921,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19470,7 +19921,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* rfbproto.c */ /* rfbproto.c */
extern int rfbsock; extern int rfbsock;
@@ -229,8 +379,19 @@ @@ -229,8 +384,19 @@
extern Bool SendClientCutText(char *str, int len); extern Bool SendClientCutText(char *str, int len);
extern Bool HandleRFBServerMessage(); extern Bool HandleRFBServerMessage();
...@@ -19490,18 +19941,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19490,18 +19941,19 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* selection.c */ /* selection.c */
extern void InitialiseSelection(); extern void InitialiseSelection();
@@ -241,8 +402,9 @@ @@ -241,8 +407,10 @@
/* shm.c */ /* shm.c */
-extern XImage *CreateShmImage(); -extern XImage *CreateShmImage();
+extern XImage *CreateShmImage(int do_ycrop); +extern XImage *CreateShmImage(int do_ycrop);
extern void ShmCleanup(); extern void ShmCleanup();
+extern void ShmDetach();
+extern Bool UsingShm(); +extern Bool UsingShm();
/* sockets.c */ /* sockets.c */
@@ -253,10 +415,15 @@ @@ -253,10 +421,15 @@
extern int FindFreeTcpPort(void); extern int FindFreeTcpPort(void);
extern int ListenAtTcpPort(int port); extern int ListenAtTcpPort(int port);
extern int ConnectToTcpAddr(unsigned int host, int port); extern int ConnectToTcpAddr(unsigned int host, int port);
...@@ -19517,7 +19969,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19517,7 +19969,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern Bool SameMachine(int sock); extern Bool SameMachine(int sock);
/* tunnel.c */ /* tunnel.c */
@@ -271,3 +438,82 @@ @@ -271,3 +444,82 @@
extern XtAppContext appContext; extern XtAppContext appContext;
extern Display* dpy; extern Display* dpy;
extern Widget toplevel; extern Widget toplevel;
...@@ -19602,7 +20054,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi ...@@ -19602,7 +20054,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+extern void SetEscapeKeysState(Widget w, XEvent *ev, String *params, Cardinal *num_params); +extern void SetEscapeKeysState(Widget w, XEvent *ev, String *params, Cardinal *num_params);
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vncviewer/vncviewer.man diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vncviewer/vncviewer.man
--- vnc_unixsrc.orig/vncviewer/vncviewer.man 2004-03-11 13:14:40.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/vncviewer.man 2004-03-11 13:14:40.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.man 2009-10-23 12:24:51.000000000 -0400 +++ vnc_unixsrc/vncviewer/vncviewer.man 2009-11-25 00:03:28.000000000 -0500
@@ -5,38 +5,55 @@ @@ -5,38 +5,55 @@
.\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de .\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de
.\" Copyright (C) 2000,2001 Red Hat, Inc. .\" Copyright (C) 2000,2001 Red Hat, Inc.
...@@ -19688,7 +20140,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -19688,7 +20140,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.TP .TP
\fB\-bgr233\fR \fB\-bgr233\fR
Always use the BGR233 format to encode pixel data. This reduces Always use the BGR233 format to encode pixel data. This reduces
@@ -168,6 +185,394 @@ @@ -168,6 +185,418 @@
\fB\-autopass\fR \fB\-autopass\fR
Read a plain-text password from stdin. This option affects only the Read a plain-text password from stdin. This option affects only the
standard VNC authentication. standard VNC authentication.
...@@ -19972,6 +20424,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -19972,6 +20424,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+framebuffer update coming in. Helps 'pipeline' the updates. +framebuffer update coming in. Helps 'pipeline' the updates.
+This is currently the default, use \fB-nopipeline\fR to disable. +This is currently the default, use \fB-nopipeline\fR to disable.
+.TP +.TP
+\fB\-appshare\fR
+Enable features for use with x11vnc's \fB\-appshare\fR mode where
+instead of sharing the full desktop only the application's
+windows are shared. Viewer multilisten mode is used to
+create the multiple windows: \fB\-multilisten\fR is implied.
+See 'x11vnc \fB\-appshare\fR \fB\-help\fR' more information on the mode.
+Features enabled in the viewer under \fB\-appshare\fR are:
+Minimum extra text in the title, auto \fB\-ycrop\fR is disabled,
+x11vnc \fB\-remote_prefix\fR X11VNC_APPSHARE_CMD: message channel,
+x11vnc initial window position hints. See also Escape Keys
+below for additional key and mouse bindings.
+.TP
+\fB\-escape \fR\fIstr\fR +\fB\-escape \fR\fIstr\fR
+This sets the 'Escape Keys' modifier sequence and enables +This sets the 'Escape Keys' modifier sequence and enables
+escape keys mode. When the modifier keys escape sequence +escape keys mode. When the modifier keys escape sequence
...@@ -20018,6 +20482,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -20018,6 +20482,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+The above mappings are \fBalways\fR active in ViewOnly mode, unless you set +The above mappings are \fBalways\fR active in ViewOnly mode, unless you set
+the Escape Keys value to 'never'. +the Escape Keys value to 'never'.
+ +
+x11vnc -appshare hot-keys: x11vnc has a simple application sharing mode
+that enables the viewer-side to move, resize, or raise the remote toplevel
+windows. To enable it, hold down Shift + the Escape Keys and press these:
+
+Arrow keys: move the remote window around in its desktop.
+
+PageUp/PageDn/Home/End: resize the remote window.
+
++/-: raise or lower the remote window.
+
+M or Button1 move win to local position; D or Button3: delete remote win.
+
+If the Escape Keys value below is set to 'default' then a default list of +If the Escape Keys value below is set to 'default' then a default list of
+of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it +of modifier keys is used. For Unix it is: Alt_L,Super_L and for MacOSX it
+is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag +is Control_L,Meta_L. Note: the Super_L key usually has a Windows(TM) Flag
...@@ -20083,7 +20559,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -20083,7 +20559,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.SH ENCODINGS .SH ENCODINGS
The server supplies information in whatever format is desired by the The server supplies information in whatever format is desired by the
client, in order to make the client as easy as possible to implement. client, in order to make the client as easy as possible to implement.
@@ -238,6 +643,15 @@ @@ -238,6 +667,15 @@
\-quality and \-nojpeg options above). Tight encoding is usually the \-quality and \-nojpeg options above). Tight encoding is usually the
best choice for low\-bandwidth network environments (e.g. slow modem best choice for low\-bandwidth network environments (e.g. slow modem
connections). connections).
...@@ -20099,7 +20575,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -20099,7 +20575,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.SH RESOURCES .SH RESOURCES
X resources that \fBvncviewer\fR knows about, aside from the X resources that \fBvncviewer\fR knows about, aside from the
normal Xt resources, are as follows: normal Xt resources, are as follows:
@@ -364,12 +778,13 @@ @@ -364,12 +802,13 @@
.B %R .B %R
remote TCP port number. remote TCP port number.
.SH SEE ALSO .SH SEE ALSO
...@@ -20116,7 +20592,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -20116,7 +20592,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
\fBMan page authors:\fR \fBMan page authors:\fR
.br .br
@@ -380,3 +795,5 @@ @@ -380,3 +819,5 @@
Tim Waugh <twaugh@redhat.com>, Tim Waugh <twaugh@redhat.com>,
.br .br
Constantin Kaplinsky <const@ce.cctpu.edu.ru> Constantin Kaplinsky <const@ce.cctpu.edu.ru>
...@@ -20124,8 +20600,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc ...@@ -20124,8 +20600,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+Karl J. Runge <runge@karlrunge.com> +Karl J. Runge <runge@karlrunge.com>
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/zrle.c diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/zrle.c
--- vnc_unixsrc.orig/vncviewer/zrle.c 2007-02-04 18:59:50.000000000 -0500 --- vnc_unixsrc.orig/vncviewer/zrle.c 2007-02-04 18:59:50.000000000 -0500
+++ vnc_unixsrc/vncviewer/zrle.c 2008-10-08 00:04:43.000000000 -0400 +++ vnc_unixsrc/vncviewer/zrle.c 2009-11-19 23:34:28.000000000 -0500
@@ -0,0 +1,618 @@ @@ -0,0 +1,620 @@
+/* +/*
+ * Copyright (C) 2005 Johannes E. Schindelin. All Rights Reserved. + * Copyright (C) 2005 Johannes E. Schindelin. All Rights Reserved.
+ * + *
...@@ -20657,6 +21133,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/ ...@@ -20657,6 +21133,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/
+ // make this CopyDataFromScreen() or something. + // make this CopyDataFromScreen() or something.
+ if (!appData.useBGR565) { + if (!appData.useBGR565) {
+ scrWidthInBytes = si.framebufferWidth * myFormat.bitsPerPixel / 8; + scrWidthInBytes = si.framebufferWidth * myFormat.bitsPerPixel / 8;
+ if (scrWidthInBytes != im->bytes_per_line) scrWidthInBytes = im->bytes_per_line;
+ scr = im->data + y * scrWidthInBytes + x * myFormat.bitsPerPixel / 8; + scr = im->data + y * scrWidthInBytes + x * myFormat.bitsPerPixel / 8;
+ buf = (char *) ptmp; + buf = (char *) ptmp;
+ +
...@@ -20667,6 +21144,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/ ...@@ -20667,6 +21144,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/
+ } + }
+ } else { + } else {
+ scrWidthInBytes = si.framebufferWidth * 4; + scrWidthInBytes = si.framebufferWidth * 4;
+ if (scrWidthInBytes != im->bytes_per_line) scrWidthInBytes = im->bytes_per_line;
+ scr = im->data + y * scrWidthInBytes + x * 4; + scr = im->data + y * scrWidthInBytes + x * 4;
+ buf = (char *) ptmp; + buf = (char *) ptmp;
+ +
......
...@@ -5920,7 +5920,9 @@ char *process_remote_cmd(char *cmd, int stringonly) { ...@@ -5920,7 +5920,9 @@ char *process_remote_cmd(char *cmd, int stringonly) {
grab_state(&ptr_grabbed, &kbd_grabbed); grab_state(&ptr_grabbed, &kbd_grabbed);
snprintf(buf, bufn, "aro=%s:%d,%d", p, ptr_grabbed, kbd_grabbed); snprintf(buf, bufn, "aro=%s:%d,%d", p, ptr_grabbed, kbd_grabbed);
rfbLog("remote_cmd: ptr,kbd: %s\n", buf); if (dpy) {
rfbLog("remote_cmd: ptr,kbd: %s\n", buf);
}
goto qry; goto qry;
} }
......
...@@ -561,6 +561,9 @@ char *dbus_session(void) { ...@@ -561,6 +561,9 @@ char *dbus_session(void) {
if (dbus_env != NULL && strlen(dbus_env) > 0) { if (dbus_env != NULL && strlen(dbus_env) > 0) {
return ""; return "";
} }
if (!dpy) {
return "";
}
#if NO_X11 #if NO_X11
return ""; return "";
#else #else
......
...@@ -2532,7 +2532,7 @@ proc see_if_ok {query item expected} { ...@@ -2532,7 +2532,7 @@ proc see_if_ok {query item expected} {
} }
proc get_default_vars {} { proc get_default_vars {} {
global default_var global default_var env
set qry [all_query_vars] set qry [all_query_vars]
...@@ -2550,6 +2550,11 @@ proc get_default_vars {} { ...@@ -2550,6 +2550,11 @@ proc get_default_vars {} {
if {$i > 50} { if {$i > 50} {
set qargs [list "-QD" $q] set qargs [list "-QD" $q]
set a [run_remote_cmd $qargs] set a [run_remote_cmd $qargs]
if [info exists env(TKX11VNC_PRINT_ALL_QD)] {
puts $q
puts $a
puts "---------------"
}
if {$all != ""} { if {$all != ""} {
append all "," append all ","
} }
...@@ -2561,6 +2566,11 @@ proc get_default_vars {} { ...@@ -2561,6 +2566,11 @@ proc get_default_vars {} {
if {$q != ""} { if {$q != ""} {
set qargs [list "-QD" $q] set qargs [list "-QD" $q]
set a [run_remote_cmd $qargs] set a [run_remote_cmd $qargs]
if [info exists env(TKX11VNC_PRINT_ALL_QD)] {
puts $q
puts $a
puts "---------------"
}
if {$all != ""} { if {$all != ""} {
append all "," append all ","
} }
...@@ -5982,6 +5992,8 @@ proc get_settings_rcfile {} { ...@@ -5982,6 +5992,8 @@ proc get_settings_rcfile {} {
set qst $hmm set qst $hmm
} elseif {$item == "nevershared"} { } elseif {$item == "nevershared"} {
set qst $hmm set qst $hmm
} elseif {$item == "gui"} {
set qst $hmm
} }
if {![info exists menu_var($item)]} { if {![info exists menu_var($item)]} {
...@@ -6956,15 +6968,19 @@ if {$tk_version < 8.4} { ...@@ -6956,15 +6968,19 @@ if {$tk_version < 8.4} {
set screen_height [winfo screenheight .] set screen_height [winfo screenheight .]
set screen_width [winfo screenwidth .] set screen_width [winfo screenwidth .]
if {$screen_height < 500} { if {$screen_height < 700} {
# short screen, PDA? # short screen, netbook?
set max_text_height 22 set max_text_height 30
set text_height 13 if {$screen_height < 500} {
if {$screen_height <= 360} { # short screen, PDA?
# very short. set max_text_height 22
set max_text_height 16 set text_height 13
set max_text_width 60 if {$screen_height <= 360} {
set text_height 11 # very short.
set max_text_height 16
set max_text_width 60
set text_height 11
}
} }
} }
if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} { if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {
......
...@@ -2543,7 +2543,7 @@ char gui_code[] = ""; ...@@ -2543,7 +2543,7 @@ char gui_code[] = "";
"}\n" "}\n"
"\n" "\n"
"proc get_default_vars {} {\n" "proc get_default_vars {} {\n"
" global default_var\n" " global default_var env\n"
"\n" "\n"
" set qry [all_query_vars]\n" " set qry [all_query_vars]\n"
"\n" "\n"
...@@ -2561,6 +2561,11 @@ char gui_code[] = ""; ...@@ -2561,6 +2561,11 @@ char gui_code[] = "";
" if {$i > 50} {\n" " if {$i > 50} {\n"
" set qargs [list \"-QD\" $q]\n" " set qargs [list \"-QD\" $q]\n"
" set a [run_remote_cmd $qargs]\n" " set a [run_remote_cmd $qargs]\n"
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
" puts $q\n"
" puts $a\n"
" puts \"---------------\"\n"
" }\n"
" if {$all != \"\"} {\n" " if {$all != \"\"} {\n"
" append all \",\"\n" " append all \",\"\n"
" }\n" " }\n"
...@@ -2572,6 +2577,11 @@ char gui_code[] = ""; ...@@ -2572,6 +2577,11 @@ char gui_code[] = "";
" if {$q != \"\"} {\n" " if {$q != \"\"} {\n"
" set qargs [list \"-QD\" $q]\n" " set qargs [list \"-QD\" $q]\n"
" set a [run_remote_cmd $qargs]\n" " set a [run_remote_cmd $qargs]\n"
" if [info exists env(TKX11VNC_PRINT_ALL_QD)] {\n"
" puts $q\n"
" puts $a\n"
" puts \"---------------\"\n"
" }\n"
" if {$all != \"\"} {\n" " if {$all != \"\"} {\n"
" append all \",\"\n" " append all \",\"\n"
" }\n" " }\n"
...@@ -5993,6 +6003,8 @@ char gui_code[] = ""; ...@@ -5993,6 +6003,8 @@ char gui_code[] = "";
" set qst $hmm\n" " set qst $hmm\n"
" } elseif {$item == \"nevershared\"} {\n" " } elseif {$item == \"nevershared\"} {\n"
" set qst $hmm\n" " set qst $hmm\n"
" } elseif {$item == \"gui\"} {\n"
" set qst $hmm\n"
" }\n" " }\n"
"\n" "\n"
" if {![info exists menu_var($item)]} {\n" " if {![info exists menu_var($item)]} {\n"
...@@ -6967,15 +6979,19 @@ char gui_code[] = ""; ...@@ -6967,15 +6979,19 @@ char gui_code[] = "";
"\n" "\n"
"set screen_height [winfo screenheight .]\n" "set screen_height [winfo screenheight .]\n"
"set screen_width [winfo screenwidth .]\n" "set screen_width [winfo screenwidth .]\n"
"if {$screen_height < 500} {\n" "if {$screen_height < 700} {\n"
" # short screen, PDA?\n" " # short screen, netbook?\n"
" set max_text_height 22\n" " set max_text_height 30\n"
" set text_height 13\n" " if {$screen_height < 500} {\n"
" if {$screen_height <= 360} {\n" " # short screen, PDA?\n"
" # very short.\n" " set max_text_height 22\n"
" set max_text_height 16\n" " set text_height 13\n"
" set max_text_width 60\n" " if {$screen_height <= 360} {\n"
" set text_height 11\n" " # very short.\n"
" set max_text_height 16\n"
" set max_text_width 60\n"
" set text_height 11\n"
" }\n"
" }\n" " }\n"
"}\n" "}\n"
"if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {\n" "if {[info exists env(X11VNC_GUI_TEXT_HEIGHT)]} {\n"
......
...@@ -444,6 +444,9 @@ void unixpw_screen(int init) { ...@@ -444,6 +444,9 @@ void unixpw_screen(int init) {
x = nfix(dpy_x / 2 - strlen(log) * char_w, dpy_x); x = nfix(dpy_x / 2 - strlen(log) * char_w, dpy_x);
y = (int) (dpy_y / 3.5); y = (int) (dpy_y / 3.5);
if (unixpw_system_greeter) {
y = (int) (dpy_y / 3);
}
if (scaling) { if (scaling) {
x = (int) (x * scale_fac_x); x = (int) (x * scale_fac_x);
...@@ -461,7 +464,7 @@ void unixpw_screen(int init) { ...@@ -461,7 +464,7 @@ void unixpw_screen(int init) {
pscreen = screen; pscreen = screen;
} }
if (pscreen && pscreen->width >= 640) { if (pscreen && pscreen->width >= 640 && pscreen->height >= 480) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*13, "F1-Help:", white_pixel()); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*13, "F1-Help:", white_pixel());
} }
f1_help = 0; f1_help = 0;
...@@ -473,8 +476,8 @@ void unixpw_screen(int init) { ...@@ -473,8 +476,8 @@ void unixpw_screen(int init) {
char moo[] = "Press 'Escape' for System Greeter"; char moo[] = "Press 'Escape' for System Greeter";
rfbDrawString(pscreen, &default8x16Font, x-90, y-30, moo, white_pixel()); rfbDrawString(pscreen, &default8x16Font, x-90, y-30, moo, white_pixel());
} else { } else {
char moo1[] = "Press 'Escape' for New Session via System Greeter,"; char moo1[] = "Press 'Escape' for a New Session via System Greeter, or";
char moo2[] = "or otherwise login here for Existing Session: "; char moo2[] = "otherwise login here to connect to an Existing Session:";
rfbDrawString(pscreen, &default6x13Font, x-110, y-38, moo1, white_pixel()); rfbDrawString(pscreen, &default6x13Font, x-110, y-38, moo1, white_pixel());
rfbDrawString(pscreen, &default6x13Font, x-110, y-25, moo2, white_pixel()); rfbDrawString(pscreen, &default6x13Font, x-110, y-25, moo2, white_pixel());
} }
...@@ -1210,7 +1213,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int ...@@ -1210,7 +1213,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int
* auth sufficient pam_self.so * auth sufficient pam_self.so
* it may be commented out without problem. * it may be commented out without problem.
*/ */
for (i=0; i<sizeof(instr); i++) { for (i=0; i< (int) sizeof(instr); i++) {
instr[i] = '\0'; instr[i] = '\0';
} }
...@@ -1253,7 +1256,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int ...@@ -1253,7 +1256,7 @@ int su_verify(char *user, char *pass, char *cmd, char *rbuf, int *rbuf_size, int
if (i < -1) i = -1; if (i < -1) i = -1;
continue; continue;
} }
if (j >= sizeof(instr)-1) { if (j >= (int) sizeof(instr)-1) {
rfbLog("su_verify: problem finding Password:\n"); rfbLog("su_verify: problem finding Password:\n");
fflush(stderr); fflush(stderr);
return 0; return 0;
...@@ -1700,14 +1703,20 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { ...@@ -1700,14 +1703,20 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) {
} else if (! down) { } else if (! down) {
return; return;
} }
if (keysym == XK_F1 && pscreen && pscreen->width >= 640) { if (keysym == XK_F1) {
char h1[] = "F1-Help: For 'login:' type in the username and press Enter, then for 'Password:' type in the password."; char h1[] = "F1-Help: For 'login:' type in the username and press Enter, then for 'Password:' enter the password.";
char hf[] = " Once logged in, username's X session will be searched for and if found then attached to.";
char hc[] = " Once logged in, username's X session is sought and attached to, otherwise a new session is created.";
char hx[] = " Once logged in, username's X session is sought and attached to, otherwise a login greeter is presented.";
char h2[] = " Specify options after a ':' like this: username:opt,opt=val,... Where an opt may be any of:"; char h2[] = " Specify options after a ':' like this: username:opt,opt=val,... Where an opt may be any of:";
char h3[] = " scale=... (n/m); scale_cursor=... (sc=); solid (so); id=; repeat; clear_mods (cm); clear_keys (ck);"; char h3[] = " scale=... (n/m); scale_cursor=... (sc=); solid (so); id=; repeat; clear_mods (cm); clear_keys (ck);";
char h4[] = " clear_all (ca); speeds=... (sp=); readtimeout=... (rd=) rotate=... (ro=); noncache (nc) (nc=n);"; char h4[] = " clear_all (ca); speeds=... (sp=); readtimeout=... (rd=) rotate=... (ro=); noncache (nc) (nc=n);";
char h5[] = " geom=WxHxD (ge=); nodisplay=... (nd=); viewonly (vo); tag=...; gnome kde twm fvwm mwm dtwm wmaker"; char h5[] = " geom=WxHxD (ge=); nodisplay=... (nd=); viewonly (vo); tag=...; gnome kde twm fvwm mwm dtwm wmaker";
char h6[] = " xfce lxde enlightenment Xsession failsafe. Examples: fred:3/4,so,cm wilma:geom=1024x768x16,kde"; char h6[] = " xfce lxde enlightenment Xsession failsafe. Examples: fred:3/4,so,cm wilma:geom=1024x768x16,kde";
int ch = 13, p; int ch = 13, p;
if (!pscreen || pscreen->width < 640 || pscreen->height < 480) {
return;
}
if (f1_help) { if (f1_help) {
p = black_pixel(); p = black_pixel();
f1_help = 0; f1_help = 0;
...@@ -1717,13 +1726,24 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { ...@@ -1717,13 +1726,24 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) {
unixpw_last_try_time = time(NULL) + 45; unixpw_last_try_time = time(NULL) + 45;
} }
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, h1, p); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, h1, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, h2, p); if (use_dpy == NULL) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+3*ch, h3, p); ;
rfbDrawString(pscreen, &default6x13Font, 8, 2+4*ch, h4, p); } else if (strstr(use_dpy, "cmd=FINDDISPLAY")) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+5*ch, h5, p); rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hf, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+6*ch, h6, p); } else if (strstr(use_dpy, "cmd=FINDCREATEDISPLAY")) {
if (strstr(use_dpy, "xdmcp")) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hx, p);
} else {
rfbDrawString(pscreen, &default6x13Font, 8, 2+2*ch, hc, p);
}
}
rfbDrawString(pscreen, &default6x13Font, 8, 2+3*ch, h2, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+4*ch, h3, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+5*ch, h4, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+6*ch, h5, p);
rfbDrawString(pscreen, &default6x13Font, 8, 2+7*ch, h6, p);
if (!f1_help) { if (!f1_help) {
rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, "F1-Help:", white_pixel()); rfbDrawString(pscreen, &default6x13Font, 8, 2+1*ch, "F1-Help:", white_pixel());
} }
unixpw_mark(); unixpw_mark();
return; return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.TH X11VNC "1" "December 2009" "x11vnc " "User Commands" .TH X11VNC "1" "December 2009" "x11vnc " "User Commands"
.SH NAME .SH NAME
x11vnc - allow VNC connections to real X11 displays x11vnc - allow VNC connections to real X11 displays
version: 0.9.10, lastmod: 2009-12-24 version: 0.9.10, lastmod: 2009-12-27
.SH SYNOPSIS .SH SYNOPSIS
.B x11vnc .B x11vnc
[OPTION]... [OPTION]...
......
...@@ -5018,6 +5018,7 @@ int main(int argc, char* argv[]) { ...@@ -5018,6 +5018,7 @@ int main(int argc, char* argv[]) {
} }
if (dpy && !xrandr && !got_noxrandr) { if (dpy && !xrandr && !got_noxrandr) {
#if !NO_X11
Atom trap_xrandr = XInternAtom(dpy, "X11VNC_TRAP_XRANDR", True); Atom trap_xrandr = XInternAtom(dpy, "X11VNC_TRAP_XRANDR", True);
if (trap_xrandr != None) { if (trap_xrandr != None) {
if (! quiet) { if (! quiet) {
...@@ -5025,6 +5026,7 @@ int main(int argc, char* argv[]) { ...@@ -5025,6 +5026,7 @@ int main(int argc, char* argv[]) {
} }
xrandr = 1; xrandr = 1;
} }
#endif
} }
#ifdef MACOSX #ifdef MACOSX
......
...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0; ...@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0; int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */ /* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.10 lastmod: 2009-12-24"; char lastmod[] = "0.9.10 lastmod: 2009-12-27";
/* X display info */ /* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment