]> source.dussan.org Git - tigervnc.git/log
tigervnc.git
3 months agoMake sure we use C++ 11
Pierre Ossman [Tue, 2 Apr 2024 14:06:10 +0000 (16:06 +0200)]
Make sure we use C++ 11

It's rare we use a compiler that has anything older as a default, but it
does happen sometimes. So make sure to guarantee this so we can start
using more modern constructs.

3 months agoFix Windows installer dependencies
Pierre Ossman [Sun, 21 Apr 2024 00:21:42 +0000 (02:21 +0200)]
Fix Windows installer dependencies

Make sure the dependencies point to the correct files, even if an out of
tree build is used.

3 months agoUpdate Swedish translation
Luna Jernberg [Sun, 23 Jun 2024 06:49:00 +0000 (08:49 +0200)]
Update Swedish translation

3 months agoUpdate Finnish translation
Lauri Nurmi [Sat, 22 Jun 2024 18:10:00 +0000 (21:10 +0300)]
Update Finnish translation

3 months agoUpdate Czech translation
Petr Pisar [Fri, 21 Jun 2024 18:34:00 +0000 (20:34 +0200)]
Update Czech translation

3 months agoUpdate Indonesian translation
Andika Triwidada [Fri, 21 Jun 2024 04:05:00 +0000 (11:05 +0700)]
Update Indonesian translation

3 months agoUpdate Bulgarian translation
Alexander Shopov [Fri, 21 Jun 2024 08:55:00 +0000 (10:55 +0200)]
Update Bulgarian translation

3 months agoUpdate Swedish translation
Luna Jernberg [Fri, 21 Jun 2024 08:03:00 +0000 (10:03 +0200)]
Update Swedish translation

3 months agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 21 Jun 2024 07:14:00 +0000 (10:14 +0300)]
Update Hebrew translation

3 months agoUpdate Romanian translation
Remus-Gabriel Chelu [Thu, 20 Jun 2024 23:03:00 +0000 (01:03 +0200)]
Update Romanian translation

3 months agoUpdate Spanish translation
Cristian Othón Martínez Vera [Thu, 20 Jun 2024 20:49:00 +0000 (14:49 -0600)]
Update Spanish translation

3 months agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 20 Jun 2024 16:02:00 +0000 (19:02 +0300)]
Update Ukrainian translation

3 months agoChange development version to 1.14.80
Pierre Ossman [Thu, 20 Jun 2024 13:07:30 +0000 (15:07 +0200)]
Change development version to 1.14.80

3 months agoUpdate translation template file
Pierre Ossman [Thu, 20 Jun 2024 13:06:09 +0000 (15:06 +0200)]
Update translation template file

3 months agoMerge branch 'dri3' of github.com:CendioOssman/tigervnc
Pierre Ossman [Thu, 20 Jun 2024 12:42:42 +0000 (14:42 +0200)]
Merge branch 'dri3' of github.com:CendioOssman/tigervnc

3 months agoAutomatically pick a suitable DRI3 render node 1771/head
Pierre Ossman [Thu, 6 Jun 2024 12:51:52 +0000 (14:51 +0200)]
Automatically pick a suitable DRI3 render node

Lay the groundwork for a more intelligent selection of GPU in systems
that have multiple cards. This initial implementation simply picks the
first GPU that we have permission to open.

3 months agoAdd option to specify used DRI3 render node
Pierre Ossman [Thu, 6 Jun 2024 12:24:41 +0000 (14:24 +0200)]
Add option to specify used DRI3 render node

Allows users to use a secondary GPU, or to disable DRI3 in case of
issues.

3 months agoHide from GNOME to enable animations
Pierre Ossman [Sat, 24 Feb 2024 13:02:02 +0000 (14:02 +0100)]
Hide from GNOME to enable animations

One GNOME developer had a bad experience with VNC one time, and
therefore all VNC must forever be punished.

Avoid detection by GNOME so that animations aren't forcefully disabled
without any option for the user to re-enable them.

3 months agoAdd basic DRI3 support
Pierre Ossman [Wed, 21 Feb 2024 16:07:36 +0000 (17:07 +0100)]
Add basic DRI3 support

This provides buffer sync with the primary render node of the system (if
available). By doing so, OpenGL and Vulkan can use the render node for
acceleration.

This first implementation is extremely pessimistic and synchronises
buffers whenever there's even a slight chance they will be used.

3 months agoFix includes for Xorg dri3 module
Pierre Ossman [Thu, 6 Jun 2024 11:29:29 +0000 (13:29 +0200)]
Fix includes for Xorg dri3 module

It was incorrectly designed to only build properly if built as part of
the "Xorg" server and could fail to build when just "Xvnc" was built.

Backport of upstream commits 0ce93e5 and acc581c.

3 months agoAvoid VNC updates for offscreen windows
Pierre Ossman [Tue, 18 Jun 2024 14:01:55 +0000 (16:01 +0200)]
Avoid VNC updates for offscreen windows

Windows aren't always directly shown, e.g. when the desktop is
composited. We should not be sending screen updates for these as the
framebuffer didn't actually change.

In the case of CopyWindow, we're even sending the wrong screen data,
which is how this bug was discovered.

3 months agoMerge pull request #1767 from bphinz/ubuntu-noble
Brian Hinz [Wed, 19 Jun 2024 15:31:58 +0000 (11:31 -0400)]
Merge pull request #1767 from bphinz/ubuntu-noble

Updates for package builds

3 months agoRemove support for EoL operating systems 1767/head
Brian P. Hinz [Wed, 19 Jun 2024 15:18:09 +0000 (11:18 -0400)]
Remove support for EoL operating systems

3 months agoMerge branch 'xserver-cleanup' of github.com:CendioOssman/tigervnc
Pierre Ossman [Wed, 19 Jun 2024 14:58:47 +0000 (16:58 +0200)]
Merge branch 'xserver-cleanup' of github.com:CendioOssman/tigervnc

3 months agoRemove old Xorg configure arguments 1770/head
Pierre Ossman [Fri, 22 Mar 2024 12:07:26 +0000 (13:07 +0100)]
Remove old Xorg configure arguments

These are no longer used in the versions of Xorg currently in use.

3 months agoRaise Xorg requirement to 1.20+
Pierre Ossman [Thu, 21 Mar 2024 15:18:46 +0000 (16:18 +0100)]
Raise Xorg requirement to 1.20+

No current distribution uses anything older, so let's make things easier
for us to maintain.

3 months agoRemove Ubuntu 18.04 packaging
Pierre Ossman [Fri, 22 Mar 2024 08:37:43 +0000 (09:37 +0100)]
Remove Ubuntu 18.04 packaging

Ubuntu 18.04 has been EOL for almost a year, so remove those packages so
we can ease our maintenance burden.

3 months agoAvoid patching miinitext.c for Xvnc
Pierre Ossman [Tue, 20 Feb 2024 16:23:56 +0000 (17:23 +0100)]
Avoid patching miinitext.c for Xvnc

Things do not need to be this complicated. We can make sure the VNC
extension is always included in a much cleaner way, at least since Xorg
1.16.

3 months agoMerge branch 'present' of github.com:CendioOssman/tigervnc
Pierre Ossman [Wed, 19 Jun 2024 14:45:12 +0000 (16:45 +0200)]
Merge branch 'present' of github.com:CendioOssman/tigervnc

3 months agoStop explicitly including fbcmap_mi.c
Pierre Ossman [Tue, 20 Feb 2024 16:03:07 +0000 (17:03 +0100)]
Stop explicitly including fbcmap_mi.c

This hasn't been needed since Xorg 1.16.

3 months agoSlow down fake clock when no clients 1769/head
Pierre Ossman [Mon, 19 Feb 2024 14:28:12 +0000 (15:28 +0100)]
Slow down fake clock when no clients

Run the frame clock at a slow 1 Hz if there are no clients connected.
This is similar to what a normal X server does when the screen is
blanked, and should keep applications waiting for the frame tick happy.

Note that we still only keep the frame clock running if there is any
application that are interested in it. Otherwise we still stop it
completely.

3 months agoStop linking to libX11
Pierre Ossman [Tue, 20 Feb 2024 16:00:20 +0000 (17:00 +0100)]
Stop linking to libX11

Unclear why this was ever needed. libX11 is for X11 clients, and we're
building a server.

3 months agoKeep frame clock running if waiting for frame tick
Pierre Ossman [Wed, 28 Feb 2024 13:20:54 +0000 (14:20 +0100)]
Keep frame clock running if waiting for frame tick

If there is something interested in synchronizing to a frame tick, then
keep the frame clock running, even if there are no updates.

This is need mainly when something starts rendering, but also when
something renders much slower than the frame clock (so it is essentially
constantly "starting"). Such an application will not draw anything until
it gets a new frame tick, which it won't get as the frame clock is
waiting for something to start drawing.

3 months agoClean up CPPFLAGS handling in xserver
Pierre Ossman [Tue, 20 Feb 2024 16:00:05 +0000 (17:00 +0100)]
Clean up CPPFLAGS handling in xserver

Make things a bit easier to maintain. This style is also more in line
with what is being done for other DDX.

3 months agoRestart the frame timer immediately
Pierre Ossman [Thu, 29 Feb 2024 16:33:43 +0000 (17:33 +0100)]
Restart the frame timer immediately

This marks the timer as started again, before we call out to various
external places that might be confused by the frame timer reporting that
it is stopped.

3 months agoRemove unused NO_MODULE_EXTS define
Pierre Ossman [Tue, 20 Feb 2024 12:09:08 +0000 (13:09 +0100)]
Remove unused NO_MODULE_EXTS define

This has never actually been used, as far as I can tell.

3 months agoAdd support for X Present extension
Pierre Ossman [Fri, 16 Feb 2024 13:31:54 +0000 (14:31 +0100)]
Add support for X Present extension

This makes it possible for applications to synchronize their updates to
the updates sent out to clients. This avoids tearing, and could in the
future also help with rate limiting applications to what the client can
actually show.

3 months agoActually use config.h in Xvnc/libvnc.so
Pierre Ossman [Tue, 20 Feb 2024 12:03:55 +0000 (13:03 +0100)]
Actually use config.h in Xvnc/libvnc.so

Rather than disabling this, make sure the build can find the relevant
file.

3 months agoAdd missing ErrorF() newlines
Pierre Ossman [Fri, 16 Feb 2024 13:31:29 +0000 (14:31 +0100)]
Add missing ErrorF() newlines

3 months agoSimplify Xorg version handling
Pierre Ossman [Tue, 20 Feb 2024 11:59:25 +0000 (12:59 +0100)]
Simplify Xorg version handling

VENDOR_RELEASE has been available as a #define since Xorg 1.7, so let's
use that and remove all of our custom magic.

3 months agoMake SDesktop::start()/stop() optional
Pierre Ossman [Wed, 28 Feb 2024 13:02:20 +0000 (14:02 +0100)]
Make SDesktop::start()/stop() optional

Let's avoid requring these as a desktop implementation can now set up
everything in the init() method.

3 months agoMaintain a constant VNCServer/SDesktop connection
Pierre Ossman [Wed, 28 Feb 2024 12:54:23 +0000 (13:54 +0100)]
Maintain a constant VNCServer/SDesktop connection

The desktop isn't completely paused just because there are no clients,
so it might still need some support from the server object.

This is primarily an issue for headless servers, where they need to
continue emulating things even without clients. A scraping server can
generally go completely passive if there are no clients.

3 months agoMake it easier to change timer interval
Pierre Ossman [Thu, 29 Feb 2024 15:01:48 +0000 (16:01 +0100)]
Make it easier to change timer interval

3 months agoExplicitly request timer repetition
Pierre Ossman [Fri, 18 Nov 2022 15:31:41 +0000 (16:31 +0100)]
Explicitly request timer repetition

One-shot timers are more common, so let's change the API a bit to make
that use case simpler. This API also makes it more clear what is
happening.

3 months agoFix up Timer comments
Pierre Ossman [Fri, 18 Nov 2022 10:20:57 +0000 (11:20 +0100)]
Fix up Timer comments

They were badly formatted, way longer than the normal 72 columns.

3 months agoAdd safety check to getNextTimeout()
Pierre Ossman [Tue, 3 Jan 2023 08:27:46 +0000 (09:27 +0100)]
Add safety check to getNextTimeout()

It currently won't ever be called with an empty list of timers, but it
is a public function so that might happen in the future. Make sure this
case is handled without crashes.

3 months agoStop treating "0" as "no timeouts"
Pierre Ossman [Tue, 3 Jan 2023 08:24:51 +0000 (09:24 +0100)]
Stop treating "0" as "no timeouts"

It is much more sane to treat "0" as "a timer is ready NOW", so let's
change to using -1 as the invalid timeout value.

3 months agoRemove unneeded iteration
Pierre Ossman [Tue, 3 Jan 2023 08:20:45 +0000 (09:20 +0100)]
Remove unneeded iteration

This should have been done in a4308c9.

3 months agoDetect conflicting timer rescheduling
Pierre Ossman [Thu, 29 Feb 2024 08:23:01 +0000 (09:23 +0100)]
Detect conflicting timer rescheduling

Repeating a timer can be done in two ways:

 * Returning true from the handler
 * Calling start() again in the handler

The latter is useful if you want to change the timer interval.

If both are used, then it becomes ambiguous when the timer should fire
again.

Detect this case and warn about it. Current implementation will respect
the new interval given to start(), rather than the interval set before
running the handler.

3 months agoUbuntu packaging updates
Brian P. Hinz [Wed, 19 Jun 2024 00:09:19 +0000 (20:09 -0400)]
Ubuntu packaging updates

4 months agoAdd support for PKCS11 jar signing
Brian P. Hinz [Sat, 15 Jun 2024 20:55:27 +0000 (16:55 -0400)]
Add support for PKCS11 jar signing

4 months agoMerge branch 'pam_env' of github.com:CendioOssman/tigervnc
Pierre Ossman [Thu, 30 May 2024 14:41:29 +0000 (16:41 +0200)]
Merge branch 'pam_env' of github.com:CendioOssman/tigervnc

4 months agoCreate common recursive mkdir() 1760/head
Pierre Ossman [Thu, 30 May 2024 14:05:35 +0000 (16:05 +0200)]
Create common recursive mkdir()

Avoid duplicating this complexity in too many places.

At the same time make the interface more identical to regular mkdir(),
for familiarity.

4 months agoUse $XDG_STATE_HOME for known hosts storage
Pierre Ossman [Thu, 30 May 2024 13:37:27 +0000 (15:37 +0200)]
Use $XDG_STATE_HOME for known hosts storage

This is an often changed database, so it is better suited for
$XDG_STATE_HOME rather than the more static $XDG_DATA_HOME.

4 months agoOnly do restorecon() for legacy directory
Pierre Ossman [Thu, 30 May 2024 13:31:50 +0000 (15:31 +0200)]
Only do restorecon() for legacy directory

This is only needed because of an historical type change of the legacy
directory, so avoid doing it anywhere else.

4 months agoFix late vncsession logging
Pierre Ossman [Wed, 22 May 2024 09:44:41 +0000 (11:44 +0200)]
Fix late vncsession logging

The syslog file descriptor will be closed when we are cleaning up in
preparation for running the vncserver script, so we need to explicitly
reopen things in case we need to log errors.

At the same time, try to be polite and explicitly close the log when
appropriate.

4 months agoRespect PAM modules for $XDG_STATE_HOME
Pierre Ossman [Mon, 20 May 2024 15:34:51 +0000 (17:34 +0200)]
Respect PAM modules for $XDG_STATE_HOME

E.g. pam_env.so might modify this variable, so we should see what we get
out of PAM when building a log file path.

4 months agoAdd comment that PAM configuration is an example
Pierre Ossman [Mon, 20 May 2024 15:32:57 +0000 (17:32 +0200)]
Add comment that PAM configuration is an example

There is too much variation between distributions for us to have a good
PAM configuration that works everywhere. Try to make this more obvious
by having a comment at the top of the file.

4 months agoMerge branch 'casantos-rhbz_2180903' of https://github.com/casantos/tigervnc
Pierre Ossman [Mon, 20 May 2024 14:12:12 +0000 (16:12 +0200)]
Merge branch 'casantos-rhbz_2180903' of https://github.com/casantos/tigervnc

4 months agoDon't check pointers for zero length buffers
Pierre Ossman [Mon, 20 May 2024 08:44:41 +0000 (10:44 +0200)]
Don't check pointers for zero length buffers

It's perfectly fine to give a NULL pointer if the length has explicitly
been specified as zero.

5 months agoMerge pull request #1737 from 62832/fix-1195
Samuel Mannehed (ThinLinc team) [Tue, 7 May 2024 13:00:43 +0000 (15:00 +0200)]
Merge pull request #1737 from 62832/fix-1195

Allow for alternative user config locations, deprecate `~/.vnc` in favour of XDG Base Directory Specification paths

5 months agoImplement XDG Base Directory paths, deprecate ~/.vnc 1737/head
90 [Fri, 26 Apr 2024 15:22:03 +0000 (16:22 +0100)]
Implement XDG Base Directory paths, deprecate ~/.vnc

5 months agovncconfig: add option to force view-only remote client connections 1670/head
Carlos Santos [Wed, 29 Nov 2023 21:52:52 +0000 (18:52 -0300)]
vncconfig: add option to force view-only remote client connections

Specifies that the server must ignore all keyboard or mouse events sent
by the client.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180903
Signed-off-by: Carlos Santos <casantos@redhat.com>
5 months agoRemove the network::SocketServer interface.
Carlos Santos [Tue, 9 Jan 2024 13:32:20 +0000 (10:32 -0300)]
Remove the network::SocketServer interface.

Move these RFB specific things to rfb::VNCServer, for clarity.

Signed-off-by: Pierre Ossman <ossman@cendio.se>
Signed-off-by: Carlos Santos <casantos@redhat.com>
5 months agoAdd .gitignore for SELinux files
Pierre Ossman [Fri, 26 Apr 2024 12:53:00 +0000 (14:53 +0200)]
Add .gitignore for SELinux files

5 months agoDon't trigger build from install target
Pierre Ossman [Fri, 26 Apr 2024 12:52:11 +0000 (14:52 +0200)]
Don't trigger build from install target

The norm is that the install target is read only from the point of view
of the source and build directory, so avoid accidentally triggering any
build.

5 months agoClean up temporary SELinux directory
Pierre Ossman [Fri, 26 Apr 2024 12:51:46 +0000 (14:51 +0200)]
Clean up temporary SELinux directory

5 months agoOverwrite vncsession.pp.bz2 each time
Pierre Ossman [Fri, 26 Apr 2024 12:51:06 +0000 (14:51 +0200)]
Overwrite vncsession.pp.bz2 each time

Make it easier to work iteratively by not having to remove the output
file each time.

5 months agoMove the AccessRights type and constants to the rfb namespace
Carlos Santos [Tue, 28 Nov 2023 21:11:13 +0000 (18:11 -0300)]
Move the AccessRights type and constants to the rfb namespace

They must belong to the rfb namespace, not to the SConnection class.

Also add an AccessNone constant, since it's better to use a mnemonic
symbol rather than zero to initialize the accessRights members.

Signed-off-by: Carlos Santos <casantos@redhat.com>
6 months agoUse XQueryPointer() instead to detect zaphod
Pierre Ossman [Wed, 10 Apr 2024 10:37:45 +0000 (12:37 +0200)]
Use XQueryPointer() instead to detect zaphod

FLTK can send events with fl_xevent pointing to random memory, which
means that we cannot trust that structure. XQueryPointer() can give us
what we need, at the cost of an extra round trip.

6 months agoCorrectly set socket write notification
Pierre Ossman [Tue, 9 Apr 2024 10:54:22 +0000 (12:54 +0200)]
Correctly set socket write notification

That extra add_fd() only set the read notification, overwriting any
write notification set up in the lines just above.

6 months agoUpdate github actions to latest versions
Pierre Ossman [Tue, 2 Apr 2024 12:13:46 +0000 (14:13 +0200)]
Update github actions to latest versions

Primarily to avoid the versions that are now deprecated.

6 months agoMerge pull request #1742 from TigerVNC/issue843
Brian Hinz [Sat, 30 Mar 2024 20:06:04 +0000 (16:06 -0400)]
Merge pull request #1742 from TigerVNC/issue843

Fix for issue 843

6 months agoFix for issue 843 1742/head
Brian P. Hinz [Sat, 30 Mar 2024 19:51:34 +0000 (15:51 -0400)]
Fix for issue 843

7 months agoBegin work on XDGBDS compliance and overrideable configs
90 [Fri, 15 Mar 2024 22:00:17 +0000 (22:00 +0000)]
Begin work on XDGBDS compliance and overrideable configs

7 months agoDon't link gcrypt for static GnuTLS
Pierre Ossman [Fri, 15 Mar 2024 11:47:34 +0000 (12:47 +0100)]
Don't link gcrypt for static GnuTLS

GnuTLS seems to have dropped grypt support ages ago, so let's not
confuse things by assuming it might be needed when linking GnuTLS
statically.

7 months agoProperly propagate CursorWarpedTo()
Pierre Ossman [Sat, 24 Feb 2024 13:09:14 +0000 (14:09 +0100)]
Properly propagate CursorWarpedTo()

Although unlikely, there might be other parts of the X server that are
also interested in this call. Make sure we propagate things on properly.

8 months agoClarify AcceptPointerEvents setting
Pierre Ossman [Tue, 6 Feb 2024 15:53:36 +0000 (16:53 +0100)]
Clarify AcceptPointerEvents setting

It doesn't just control button events, but all types of pointer events,
including movement.

8 months agoFix shared memory leak 1722/head
Adam Halim [Mon, 12 Jun 2023 08:44:43 +0000 (10:44 +0200)]
Fix shared memory leak

The MIT-SHM documentation:
  https://www.x.org/releases/X11R7.7/doc/xextproto/shm.html
says to run XShmDetach() first, and then to destroy the segment.

(cherry picked from commit 585ee24d4cd81759ca7206d5d5181a491c2e8898)

8 months agoIncrease time required to override pointerClient
Samuel Mannehed [Fri, 26 Jan 2024 12:49:04 +0000 (13:49 +0100)]
Increase time required to override pointerClient

Mouse events in shared connections are locked to one viewer at a time.
If the a mouse drag is happening in the first viewer, the second viewer
can't interfere unless the first viewer has been inactive for a set
amount of time. This timeout was put in place in
71c83b479335337b25dc331d3fb4a6e29382ceb5 to handle the case where the
first viewer disconnects while the mouse drag is happening. Prior to the
timeout, this resulted in all input being blocked.

This commit increases this timeout from 3 seconds to 10 seconds. This is
to minimize the risk of this happening during "normal" use. With this
change, the first viewer has to be inactive for 10 seconds before the
second viewer can take control again.

In the case where the first viewer disconnects, a waiting time of 10
seconds for the second viewer seems very reasonable.

8 months agoBreak long lines in new pointerEvent logic
Samuel Mannehed [Fri, 26 Jan 2024 12:19:31 +0000 (13:19 +0100)]
Break long lines in new pointerEvent logic

8 months agoFix bad variable reference in file logger
Pierre Ossman [Thu, 25 Jan 2024 15:18:43 +0000 (16:18 +0100)]
Fix bad variable reference in file logger

8 months agoMerge pull request #1718 from MikeLooijmans/server-mousebuttonowner-timeout
linma (ThinLinc team) [Thu, 25 Jan 2024 13:29:00 +0000 (14:29 +0100)]
Merge pull request #1718 from MikeLooijmans/server-mousebuttonowner-timeout

VNCServerST: Add a timeout to pointer button ownership

8 months agoSet all HAVE_ macros on the top level
Pierre Ossman [Wed, 24 Jan 2024 10:10:58 +0000 (11:10 +0100)]
Set all HAVE_ macros on the top level

This keep everything consistent.

8 months agoRemove superfluous X11_FOUND check
Pierre Ossman [Wed, 24 Jan 2024 10:10:07 +0000 (11:10 +0100)]
Remove superfluous X11_FOUND check

It is REQUIRED in this context, so we can assume X11 has been found.

8 months agoMerge branch 'systemd' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Wed, 24 Jan 2024 09:27:50 +0000 (10:27 +0100)]
Merge branch 'systemd' of https://github.com/CendioOssman/tigervnc

8 months agoDocument optional libsystemd requirement
Pierre Ossman [Wed, 24 Jan 2024 09:21:18 +0000 (10:21 +0100)]
Document optional libsystemd requirement

8 months agoAllow combining socket activation and extra ports
Pierre Ossman [Wed, 24 Jan 2024 08:43:02 +0000 (09:43 +0100)]
Allow combining socket activation and extra ports

The common use case is probably to only listem to the systemd provided
socket when using socket activation, but it might not be the only use
case. Make sure things can be combined if explicitly requested.

8 months agoLog when sd_listen_fds() fails
Pierre Ossman [Wed, 24 Jan 2024 08:41:32 +0000 (09:41 +0100)]
Log when sd_listen_fds() fails

8 months agoUse SD_LISTEN_FDS_START constant
Pierre Ossman [Wed, 24 Jan 2024 08:25:35 +0000 (09:25 +0100)]
Use SD_LISTEN_FDS_START constant

Avoid magical numbers as it makes it hard to understand the code.

8 months agoMake systemd detection more robust
Pierre Ossman [Wed, 24 Jan 2024 08:07:57 +0000 (09:07 +0100)]
Make systemd detection more robust

We don't need to look for this on Windows or macOS, and we need to be
able to gracefully handle systems without pkg-config.

8 months agoVNCServerST: Add a timeout to pointer button ownership 1718/head
Mike Looijmans [Tue, 16 Jan 2024 15:27:43 +0000 (16:27 +0100)]
VNCServerST: Add a timeout to pointer button ownership

When one clients holds down a button on the pointer device (probably
dragging something), other clients' attempts at pointer operations
are denied. This yields a sane user experience, but with limits.

When one clients starts dragging, and then his network connection fails,
other clients are denied access to the pointer until the VNC server
finally discovers that the connection is dead and closes it. This can
take about 15 minutes.

Add a timeout to this policy: If we don't hear from the client for 3
seconds, other clients are allowed to control the pointer once more.

This solves the problem that one failing network could make the server
completely deaf to other clients for a long time.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
9 months agoVNCSConnectionST: Release mouse button(s) on close 1717/head
Mike Looijmans [Thu, 11 Jan 2024 10:16:27 +0000 (11:16 +0100)]
VNCSConnectionST: Release mouse button(s) on close

When the connection is severed, release all mouse buttons.

This fixes an issue with x0vncserver where the local display
would stop responding to mouse events if the connection closes
while the remote user was holding down a mouse button.

To reproduce, start a VNC client, press and hold a mouse button
and then kill the connection (e.g. close client, kill server,
yank network cable). This caused the local screen to no longer
respond to any mouse-down events until a VNC client reconnects
and clicks anywhere.

This may inject a "mouse release" event while closing, however,
if you click on your screen and then yank the mouse cable, a mouse
release event also would not come unexpectedly, so the cure's
side effects aren't as bad as the disease.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
9 months agox0vncserver: Add support for systemd socket activation 1716/head
Mike Looijmans [Fri, 12 Jan 2024 08:24:48 +0000 (09:24 +0100)]
x0vncserver: Add support for systemd socket activation

systemd can pass in sockets as file descriptors 3 and beyond. Allows
the server to use socket activation.

When triggered by systemd, no other listening sockets (e.g. rfbport) will
be activated.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
9 months agoSet Pixmap depths after creating visuals
Pierre Ossman [Wed, 10 Jan 2024 15:47:56 +0000 (16:47 +0100)]
Set Pixmap depths after creating visuals

This affects the ordering of visuals, which breaks some buggy
applications that assume the first visual is the root window visual.

9 months agoUpdate copyright year to 2024
Samuel Mannehed [Tue, 9 Jan 2024 13:27:51 +0000 (14:27 +0100)]
Update copyright year to 2024

9 months agoXvnc: do not use dup2() to create a file descriptor for -inetd option 1714/head
Jan Grulich [Mon, 8 Jan 2024 12:19:01 +0000 (13:19 +0100)]
Xvnc: do not use dup2() to create a file descriptor for -inetd option

Use dup() instead to get an available file descriptor to avoid hijacking
already existing descriptor.

Fixes #1709

9 months agoMerge branch 'master' of https://github.com/zmudc/tigervnc
Pierre Ossman [Thu, 28 Dec 2023 16:02:07 +0000 (17:02 +0100)]
Merge branch 'master' of https://github.com/zmudc/tigervnc

9 months agoMerge branch 'master' of https://github.com/LMattsson/tigervnc
Pierre Ossman [Thu, 28 Dec 2023 15:56:04 +0000 (16:56 +0100)]
Merge branch 'master' of https://github.com/LMattsson/tigervnc

9 months agoPrevent incorrect cmake usage
Pierre Ossman [Thu, 28 Dec 2023 08:39:08 +0000 (09:39 +0100)]
Prevent incorrect cmake usage

It's a reoccurring issue that users try to build individual components
by pointing cmake at a specific subdirectory, e.g. 'cmake vncviewer'.
CMake, unfortunately, has insufficient protection against this so we'll
need to add a manual check.

This commit only adds it to the most likely places for misuse so we
don't have to pollute every CMakeLists.txt.