Pierre Ossman [Mon, 10 Oct 2016 14:05:46 +0000 (16:05 +0200)]
Fix busy loop in FdOutStream::flush()
This bug was introduced in c6df31db. A non-blocking socket that did
not have any more space would busy loop until the write succeeded.
Instead now it returns without any action, just as it did before
the bug was introduced.
Koichiro IWAO [Tue, 4 Oct 2016 08:17:06 +0000 (17:17 +0900)]
Do not depends on mcookie command
for operating systems other than GNU/Linux.
mcookie is a part of util-linux. Usually only GNU/Linux systems have it.
Do not die even if mcookie is not found. Use the previous pure perl code
to generate cookie as fallback.
Jeff Blaine [Sat, 6 Aug 2016 20:22:18 +0000 (16:22 -0400)]
Support both defaults and mandatory system config files
This commit introduces support for optional basic system-wide
configuration of vncserver.
The format and syntax of /etc/tigervnc/vncserver* match
that of $HOME/.vnc/config exactly.
Allows /etc/tigervnc/vncserver-config-defaults as well as
/etc/tigervnc/vncserver-config-mandatory. The former is optional
and sets user-overrideable vncserver settings. The latter is
optional, but if it exists takes precedence over all user
$HOME/.vnc/config settings of the same setting name. In the
case where /etc/tigervnc/vncserver-config-mandatory overrides
a setting in $HOME/.vnc/config, the user will be warned that
it has happened.
WARNING: Settings in /etc/tigervnc/vncserver-config-mandatory
are easily subverted by passing args to vncserver on the CLI.
The man page indicates this warning.
This commit also introduces (should have been separate) examination
of all config file settings (not just @ARGV!) when determining
whether or not $HOME/.vnc/passwd needs to be created. That is,
if /etc/tigervnc/vncserver* or $HOME/.vnc/config indicate that
we are NOT using VNC-native authentication, then we don't need
a $HOME/.vnc/passwd created.
Code cleanup:
$xstartup was renamed $xstartupFile for consistency with other
"file" variable names.
For VNC-auth checking, to determine if $HOME/.vnc/passwd needed
creation, the 3-string check against lc($arg2) was in 2 places
and was changed to a simple grep against the new @vncAuthStrings
Pierre Ossman [Thu, 18 Aug 2016 14:16:45 +0000 (16:16 +0200)]
Adjust client pointer coordinates to absolute
The client is not aware of where the screen is placed so it will give
us screen relative coordinates. Convert to and from these and absolute
coordinates before interacting with the input layer.
Pierre Ossman [Thu, 18 Aug 2016 14:14:55 +0000 (16:14 +0200)]
Convert pointer coordinates to absolute
It is possible to set pointer coordinate using absolute numbers, but
getting them back will always give us screen relative ones. Do the
necessary calculations manually so we return sane values to the caller.
Jeff Blaine [Tue, 24 May 2016 01:43:59 +0000 (21:43 -0400)]
Properly name filehandle based on context of code
Old harmless copy/paste from code above left code confusing as it was reusing the filehandle "XSTARTUP" to write out $vncUserDir/config. This new small change uses a more topical filehandle name for the task at hand.
Pierre Ossman [Fri, 13 May 2016 14:11:34 +0000 (16:11 +0200)]
Avoid symbol clash for Xregion functions
We might be linking our Xregion and libX11 into the same binary,
causing a clash between the symbols. In theory they should be
compatible, but that's not guaranteed. Avoid the issue by adding
a "vnc" prefix to our version.
Brian P. Hinz [Thu, 12 May 2016 01:55:56 +0000 (21:55 -0400)]
Fix to workaround non-default libtool on debian
Debian patches libtool so that the default value of
link_all_deplibs is set to 'no' rather than 'unknown',
causing transitive dependencies in shared objects to
be lost.
Pierre Ossman [Wed, 4 May 2016 15:51:19 +0000 (17:51 +0200)]
Be more paranoid about ShmCompletion events
Unfortunately HP ships a buggy X server on their thin clients
that send out extra, bogus ShmCompletion events. This screws up our
logic so we need to filter them out. Fortunately they are sent with
an invalid drawable id, so simply verify that.
Pierre Ossman [Fri, 29 Apr 2016 13:35:56 +0000 (15:35 +0200)]
Asynchronously retry update on congestion
We now get notifications when the output buffer empties, and we
already caught incoming RTT pongs, meaning we can now react at the
proper time to retry a congested update rather than use a timer.
contrib: Add ubuntu-xenial debian source package to build on xenial.
The package is based on the contrib ubuntu-trusty debian package. The
following modifications have been made:
The current tigervnc sources can be used unmodified as the .orig
tarball for the debian package, so get-orig-source.sh is gone.
The ubuntu xorg-server-sources package provides the xorg sources used
to build tigervnc. The two small patches which where in the trusty
quilt series are now applied to the xorg sources after they have been
extracted. There is no quilt series anymore at this point.
Fltk 1.3.3 is available in the xenial repositories and it is used to build
xtigervncviewer. No need to get the fltk sources. patch_fltk.sh is gone.
Fixed some dependencies to reflect changes between trusty and xenial.
Removed configure options not recognized by configure.
The install target is not called a second time for the viewer package,
but the viewer files are moved from the server installation. (Eliminate
file conflicts during binary package installation.)
Note: Some dependencies (including libfltk1.3 and xorg-server-source) are
found in the xenial universe repository only.
Brian P. Hinz [Thu, 31 Mar 2016 03:25:46 +0000 (23:25 -0400)]
Overhaul of SSH tunneling features in Java viewer
Fixes numerous problems with the SSH tunneling implementation
on the java viewer and adds many significant new SSH-related
features. SSH tunneling is now highly configurable via the
both the command line and GUI. The embedded client can parse
openssh config files. An external client may be specified,
along with a custom arguments template.
Pierre Ossman [Tue, 29 Mar 2016 12:15:38 +0000 (14:15 +0200)]
Add option to set primary selection for cut text
Previously the incoming clipboard was unconditionally set to both
the PRIMARY and CLIPBOARD selection. This isn't always what the
user want, so make it configurable.
Scott Roland [Thu, 31 Dec 2015 15:15:57 +0000 (15:15 +0000)]
Split out setPrimaryCB option in UNIX vncconfig
This is the simplest approach, with setPrimaryCB having the same
relationship to acceptClipboard as sendPrimaryCB has to
sendClipboard. This does not change vncviewer, which should probably
have something similar on UNIX platforms only.
Pierre Ossman [Tue, 29 Mar 2016 11:32:22 +0000 (13:32 +0200)]
Silence CMake link interface warning
We don't modify the link interface directly so these warnings are
just useless noise. We could in theory use the new naming instead,
but at least CMake 2.8.12 is buggy and screws up the link when that
policy is active.