Pierre Ossman [Mon, 12 Dec 2022 14:25:51 +0000 (15:25 +0100)]
Don't start sessions until there are users
Delay startup of VNC sessions until user databases are up and running.
This is the same ordering that GDM imposes to make sure users can
actually log in.
Jan Grulich [Tue, 9 Aug 2022 12:31:07 +0000 (14:31 +0200)]
x0vncserver: add new keysym in case we don't find a matching keycode
We might often fail to find a matching X11 keycode when the client has
a different keyboard layout and end up with no key event. To avoid a
failure we add it as a new keysym/keycode pair so the next time a keysym
from the client that is unknown to the server is send, we will find a
match and proceed with key event. This is same behavior used in Xvnc or
x11vnc, although Xvnc has more advanced mapping from keysym to keycode.
Pierre Ossman [Mon, 7 Nov 2022 12:45:34 +0000 (13:45 +0100)]
Flush decoder errors on close()
We don't want any stray exceptions as we are cleaning up, so handle any
still pending decoder errors by just logging them. We are already
shutting down so there is no need to abort the connection here.
Pierre Ossman [Wed, 24 Aug 2022 08:31:42 +0000 (10:31 +0200)]
Use BufferedOutStream in more streams
Avoid duplicating all the memory mangement, and instead use the
BufferedOutStream as a base clase for all out streams that need an
intermediate buffer.
Jan Grulich [Thu, 11 Aug 2022 11:15:29 +0000 (13:15 +0200)]
x0vncserver: update/display cursor only on correct screen in zaphod mode
We have to check whether we update cursor position/shape only in case
the cursor is on our display, otherwise in zaphod mode, ie. when having
two instances of x0vncserver on screens :0.0 and :0.1 we would be having
the cursor duplicated and actually not funcional (aka ghost cursor) as
it would be actually not present. We also additionally watch EnterNotify
and LeaveNotify events in order to show/hide cursor accordingly.
Change made with help from Olivier Fourdan <ofourdan@redhat.com>
This commit changes the color of the edges of the dot cursor in the Java
version of vncviewer from fully transparent to white, bringing it in
line with the C++ native version.
Pierre Ossman [Mon, 4 Jul 2022 12:42:55 +0000 (14:42 +0200)]
Store artifacts from Github actions
Might be useful for testing in some cases. Note that the Windows and
Linux binaries will depend on libraries from the build environment. So
the user will need to match those manually.
Pierre Ossman [Tue, 5 Jul 2022 07:19:07 +0000 (09:19 +0200)]
Fix Xvnc dependency list (again)
The previous commit was incorrect in that it overrides automake's
dependency list, rather than adding to it. So we need to make sure
things are duplicated between Xvnc_DEPENDENCIES and Xvnc_LDADD as
appropriate.
Use the same approach as the Xorg binary to keep things familiar.
Pierre Ossman [Mon, 4 Jul 2022 11:59:42 +0000 (13:59 +0200)]
Add missing dependencies for Xvnc
These aren't crucial for a clean build, but must be set for Xvnc to be
properly rebuilt if anything in the Xorg tree changes. automake doesn't
properly deduce these automatically from Xvnc_LDADD, unfortunately.
Pierre Ossman [Tue, 28 Jun 2022 12:49:40 +0000 (14:49 +0200)]
Safely discard large (extended) clipboard contents
Avoid having to buffer everything we want to discard, and instead do it
piece by piece. This is more efficient, and avoids hitting any limits on
the buffering.
Note that this is safe here because we already know we have all the
compressed data. It would not be safe for a general input stream.
Pierre Ossman [Tue, 28 Jun 2022 12:47:39 +0000 (14:47 +0200)]
Properly restore cork state when changed
These streams both need to change the corking state temporarily, but it
is important it is restored to the previous state or things might get
messed up.
For the zlib stream it would just leave things uncorked, which still
works but is less efficient.
But for the TLS stream it might make things very unresponsive as the
corking might be left on permanently, delaying packets indefinitely.
Martins Mozeiko [Tue, 7 Jun 2022 07:37:54 +0000 (00:37 -0700)]
Workaround for MFT cropping in H264 decoding
It seems MFT h264 decoder does not support frame cropping. Which
means that if frame width or height is not multiple of 16 then
decoded output can potentially be used with wrong offset. This
code adds explicit parsing of SPS to extract cropping information
to use, and will apply cropping if reported size differs from
expected.
Pierre Ossman [Sat, 4 Jun 2022 12:19:07 +0000 (14:19 +0200)]
Add target_link_directory() compat function
We need this function to deal with pkgconfig files properly, but
unfortunately it doesn't exist until CMake 3.13, and we need to support
CMake 3.10. So add a hacky compatibility function for older systems.
Pierre Ossman [Wed, 6 Apr 2022 13:45:36 +0000 (15:45 +0200)]
Ignore socket whilst processing data
FLTK has a lot of synchronous stuff (like dialogs), which mean that the
main loop might be run recursively in some cases. If there is data
available on our socket then CConn::socketEvent() will be called
constantly in a busy loop.
Avoid this by removing socket notifications whilst we are processing
data.
Pierre Ossman [Wed, 6 Apr 2022 13:38:45 +0000 (15:38 +0200)]
Enable stream sanity checks in debug builds
Enable this automatically for developers so we increase the chance of
these problems getting caught. There is a risk of overhead though so
keep them disabled for release builds.
Pierre Ossman [Wed, 6 Apr 2022 13:23:50 +0000 (15:23 +0200)]
Don't trust GNUTLS_E_AGAIN
Unfortunately this error can be given by GnuTLS even though the
underlying stream still has data available. So stop trusting this value
and keep track of the underlying stream explicitly.
Pierre Ossman [Fri, 11 Mar 2022 07:31:25 +0000 (08:31 +0100)]
Change vncsession startup error message
We need to get to the point of starting the session script before we
consider things a success. So this can fail in many different ways, not
just the daemonization. Adjust the error message to something more
generic to reflect this.
Zdenek Pytela [Mon, 7 Feb 2022 09:45:41 +0000 (10:45 +0100)]
SELinux: use /root/.vnc in file context specification
Instead of HOME_ROOT/.vnc, /root/.vnc should be used
for user root's home to specify default file context
as HOME_ROOT actually means base for home dirs (usually /home).