]> source.dussan.org Git - tigervnc.git/log
tigervnc.git
4 weeks agoOnly announce clipboard for plain text data
Samuel Mannehed [Tue, 1 Oct 2024 10:49:40 +0000 (12:49 +0200)]
Only announce clipboard for plain text data

FLTK has support for both image and plain text clipboard data, we don't.
This means we only send plain text clipboard from the viewer to the
server. Some applications can get confused when we announce that
clipboard is available and later don't send anything. An example of such
an application is QGIS, in the remote session it froze when an image was
copied on the client side.

This fix means we only call announceClipboard() when the clipboard
contains plain text. That means TigerVNC is now more robust and doesn't
trigger freezes in buggy applications.

(cherry picked from commit 8a80c906b9f7c08b1c664569a97d327d62c6d8ae)

4 weeks agoMore carefully release mouse buttons on close
Pierre Ossman [Tue, 24 Sep 2024 07:03:53 +0000 (09:03 +0200)]
More carefully release mouse buttons on close

Only the client that currently has buttons pressed should actually send
a release event as the client might not be currently in control of the
pointer state. This is most clearly seen in a client that hasn't event
authenticated properly yet.

Approximate this from the server by using the last known server cursor
position. It should hopefully not differ much from the last client
provided position.

Follow-up to 986280b382d57ef4f68d2d4afb13b26772e5acb0.

(cherry picked from commit 704f9724d8af58314c4fafc8930666bb2be46722)

4 weeks agoExplicitly clean up grabs on disconnect
Pierre Ossman [Mon, 23 Sep 2024 14:17:39 +0000 (16:17 +0200)]
Explicitly clean up grabs on disconnect

They are not automatically cleaned up with the window on Windows, and we
might want to reconnect so we cannot rely on the process cleanup either.

(cherry picked from commit 43ce674dfbd2576fe5b382ad9f87e5beebc72812)

4 weeks agoHandle server history with '/' in entries
Pierre Ossman [Fri, 6 Sep 2024 10:55:08 +0000 (12:55 +0200)]
Handle server history with '/' in entries

This happens if you've connected to a server using a Unix socket.

(cherry picked from commit 4236d0c644a7454ab7a955e837143a8fd0777c09)

4 weeks agoAdd missing config.h includes
Pierre Ossman [Tue, 3 Sep 2024 06:02:48 +0000 (08:02 +0200)]
Add missing config.h includes

(cherry picked from commit 1f3e77d75a912b30f554d745a56f5da1e4de966e)

4 weeks agovncviewer: add missing include for struct timeval
Thomas Klausner [Tue, 27 Aug 2024 07:31:42 +0000 (09:31 +0200)]
vncviewer: add missing include for struct timeval

(cherry picked from commit 169ffe18c141a4ca1fc2e790e927a1aa49cce30e)

4 weeks agoCorrectly handle ZRLE cursors
Pierre Ossman [Fri, 30 Aug 2024 14:15:09 +0000 (16:15 +0200)]
Correctly handle ZRLE cursors

Cursor data has a depth of 32 bits and hence cannot use CPIXELs.

This is a regression from baca73d.

(cherry picked from commit 6d9017eeb364491cf2acdf1c7e61aee8dd198527)

4 weeks agoOnly read first password from file
Pierre Ossman [Fri, 30 Aug 2024 14:09:38 +0000 (16:09 +0200)]
Only read first password from file

Read just the first password and ignore anything else in the password
file. This allows you to reuse a password file from the server that also
includes a view-only password.

This fixes a regression introduced in b99daad.

(cherry picked from commit 49a087e8f8ecafe950a86a71ae6657d6cac8ea77)

4 weeks agoHandle failure getting VNC directories
Pierre Ossman [Thu, 29 Aug 2024 15:19:40 +0000 (17:19 +0200)]
Handle failure getting VNC directories

Although rare, there are cases where we might fail to determine our base
directories. Make sure the code can handle it.

(cherry picked from commit edee4db8d1fd85495f189293041311bfff56d23c)

4 weeks agoMove base directory creation to helper function
Pierre Ossman [Thu, 29 Aug 2024 15:16:43 +0000 (17:16 +0200)]
Move base directory creation to helper function

This is non-trivial now, so let's modularize this a bit.

(cherry picked from commit 0c61c069bab38d14b93ad9d71b6509427a5611a8)

4 weeks agoH264Libav: Use nearest-neighbour sampling in scaler
Andri Yngvason [Thu, 22 Aug 2024 21:26:59 +0000 (21:26 +0000)]
H264Libav: Use nearest-neighbour sampling in scaler

sws_getCachedContext will set a default sampling method if 0 is passed
to the flags argument. This means that when it is called again, the
flags argument will not match the flags in the context, so a new one
will be allocated every time.

To get around this problem, we assign an explicit sampling method, one
that also happens to be more efficient and just as good for this
use-case as the default one, which is bicubic interpolation.

(cherry picked from commit c68714aee15f1e6c75d53c398ea9b9178f64fcfb)

4 weeks agoH264Libav: Handle colour space conversion
Andri Yngvason [Mon, 19 Aug 2024 22:34:37 +0000 (22:34 +0000)]
H264Libav: Handle colour space conversion

The scaler is now informed of the colour space encoded into the stream
so that it may do the proper conversion.

(cherry picked from commit 28cc17e309fc6117370b38ec11d803dc36e8ef01)

4 weeks agoApple only: exit FL_Window fullscreen if active in order to minimize.
Rudimar Ronsoni Jr [Mon, 19 Aug 2024 19:08:01 +0000 (21:08 +0200)]
Apple only: exit FL_Window fullscreen if active in order to minimize.

(cherry picked from commit a1bd5cf795d36dd4ce17e980b5cb0a7f200756b5)

4 weeks agoH264Libav: Clean up sws context
Andri Yngvason [Fri, 2 Aug 2024 09:20:24 +0000 (09:20 +0000)]
H264Libav: Clean up sws context

This fixes a memory leak

(cherry picked from commit 35966469bc3410ba1573126300a19bf47d370910)

4 weeks agoH264Libav: Use AVFrame for pixel format conversion buffer
Andri Yngvason [Wed, 24 Jul 2024 20:50:14 +0000 (20:50 +0000)]
H264Libav: Use AVFrame for pixel format conversion buffer

This ensures that the buffer is allocated with the correct alignment and
padding for use with sws_scale.

This fixes out-of-bounds writes which would in some cases cause
segmentation faults and/or heap corruption.

(cherry picked from commit fff17cae7738d6b3d65426a0ce7df76e8034ad1c)

4 weeks agoHandle existing config directory in vncpasswd
Pierre Ossman [Thu, 15 Aug 2024 12:24:42 +0000 (14:24 +0200)]
Handle existing config directory in vncpasswd

This fixes commit a79c33d.

(cherry picked from commit 445e0230cf4e939dcc59caf5d5f001c2f7b04da6)

4 weeks agoUse proper gnutls_free() on Windows
Pierre Ossman [Tue, 13 Aug 2024 13:53:07 +0000 (15:53 +0200)]
Use proper gnutls_free() on Windows

The underlying issue requiring this hack was fixed ages ago.
Unfortunately, the fixed GnuTLS doesn't consider static linking. So we
need to add a new hack that permits that.

(cherry picked from commit cfa4cc7dd223641176488dc3b41a53e6a81dade4)

4 weeks agoInclude key code for fake key events
Pierre Ossman [Sat, 25 Feb 2023 14:32:24 +0000 (15:32 +0100)]
Include key code for fake key events

Let's try to mimic a real event as much as possible to avoid bugs.

(cherry picked from commit 6111c0587aec6ea4700a91a460c7027572ab5011)

4 weeks agoDon't parse empty fence messages
Pierre Ossman [Thu, 23 Feb 2023 06:19:09 +0000 (07:19 +0100)]
Don't parse empty fence messages

We need to return here or we'll do an out-of-bounds access on the data
array.

(cherry picked from commit 7af69eb4a7a52d6baf4d09f79ccbec76bd1fcee1)

4 weeks agoAvoid XKeysymToString() conflict with libX11
Pierre Ossman [Tue, 6 Aug 2024 12:53:30 +0000 (14:53 +0200)]
Avoid XKeysymToString() conflict with libX11

We implement our own version of this, and because of this we carry our
lookup table generated by the same tool that libX11 uses. Unfortunately,
that table is a global symbol and as such there might be a mismatch of
which table should be used.

Make sure we get our own copy by changing the name of it. We use a
define rather than modifying ks_tables.h as that file is automatically
generated.

(cherry picked from commit 01cf61b4e0f4cd5031794f0a82fdf603d20a7852)

4 weeks agoAdd missing comma in default security type list
Pierre Ossman [Mon, 29 Jul 2024 14:16:08 +0000 (16:16 +0200)]
Add missing comma in default security type list

Otherwise it merges with the next entry, removing both of them from the
default list.

(cherry picked from commit 4f6a3521874da5a67fd746389cfa9b6199eb3582)

4 weeks agovncsession: use /bin/sh if the user shell is not set
Carlos Santos [Thu, 25 Jul 2024 21:39:59 +0000 (18:39 -0300)]
vncsession: use /bin/sh if the user shell is not set

An empty shell field in the password file is valid, although not common.
Use /bin/sh in this case, as documented in the passwd(5) man page, since
the vncserver script requires a non-empty SHELL environment variable.

Fixes issue #1786.

Signed-off-by: Carlos Santos <casantos@redhat.com>
(cherry picked from commit 4db34f73d461b973867ddaf18bf690219229cd7a)

4 weeks agoUse std::min replace min
Kang Lin [Thu, 25 Jul 2024 03:32:48 +0000 (11:32 +0800)]
Use std::min replace min

(cherry picked from commit 9aaea93b2d1012b05ea24a15f4269cb9f356c3d9)

4 weeks agoGenerate better (fake) modelines
Pierre Ossman [Tue, 23 Jul 2024 14:06:14 +0000 (16:06 +0200)]
Generate better (fake) modelines

This is what Xwayland does, so let's try to do the same to avoid any
incompatibilites with applications.

(cherry picked from commit 876cbf0800634b382b0a99e8cd086f588997f9d8)

4 weeks agoImprove unknown keysym handling
Gaurav Ujjwal [Mon, 8 Apr 2024 11:18:11 +0000 (16:48 +0530)]
Improve unknown keysym handling

Instead of giving up after all free keycodes have been used, Keycodes from previously added keysyms will be reused.

Re: #93
(cherry picked from commit f65433a113ed2cce39161139982112aaa3ddf6e0)

5 weeks agoUpdate Friulian translation
Fabio T. [Thu, 3 Oct 2024 17:59:00 +0000 (17:59 +0000)]
Update Friulian translation

(cherry picked from commit 87029b7f38455ad4ffa0573107707ce221aa3773)

5 weeks agoUpdate Chinese (simplified) translation
Mingye Wang (Artoria2e5) [Mon, 2 Sep 2024 04:19:00 +0000 (12:19 +0800)]
Update Chinese (simplified) translation

(cherry picked from commit 2e3347768d3d19852e2c575d1b9425e23d6efa87)

5 weeks agoExplicity install missing deps GitHub Actions
Pierre Ossman [Mon, 14 Oct 2024 14:12:20 +0000 (16:12 +0200)]
Explicity install missing deps GitHub Actions

We seem to have gotten this implicitly before, but now that GitHub has
switched to Ubuntu 24.04 we have to be explicit about it.

(cherry picked from commit a4c86a7f07d81450c5e0147c27ed737b7af4547c)

3 months agoTigerVNC 1.14.0 v1.14.0
Pierre Ossman [Tue, 23 Jul 2024 08:50:25 +0000 (10:50 +0200)]
TigerVNC 1.14.0

3 months agoFix overflow; "Timer: gettimeofday is broken"
Pierre Ossman [Fri, 19 Jul 2024 15:37:04 +0000 (17:37 +0200)]
Fix overflow; "Timer: gettimeofday is broken"

The rounding misbehaved when the tv_usec calculation overflows.

Fixes issue #1782.

(cherry picked from commit 422444acf3a519b75709fb14c02118b75ecbc898)

4 months agoBe more careful with ComparingUpdateTracker pointer
Pierre Ossman [Fri, 5 Jul 2024 12:05:45 +0000 (14:05 +0200)]
Be more careful with ComparingUpdateTracker pointer

As of 28c3f12, we might now be running the frame clock even without a
framebuffer present. This means we need to be more careful accessing the
ComparingUpdateTracker, as it might be NULL.

(cherry picked from commit c4075860579ad33011fafee32f34c5d3da71a910)

4 months agoRound up expiration time for timers
Pierre Ossman [Fri, 5 Jul 2024 11:48:14 +0000 (13:48 +0200)]
Round up expiration time for timers

Otherwise we won't properly guarantee that we'll wait *at least* as long
as the specified time.

(cherry picked from commit c831c9084afffdf10fa5dda865a6df5d643d83dd)

4 months agoFix x0vncserver handling of timers
Pierre Ossman [Fri, 5 Jul 2024 11:24:52 +0000 (13:24 +0200)]
Fix x0vncserver handling of timers

Bug fix for bf28683.

(cherry picked from commit 80ce950887824a120c8de07dac9191e7fff72de4)

4 months agoUpdate Slovak translation
Marián Haburaj [Tue, 25 Jun 2024 09:04:00 +0000 (11:04 +0200)]
Update Slovak translation

(cherry picked from commit 60962a99dde101099bc775dd98354a43b9b36c9a)

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

(cherry picked from commit 0e9a00e87cf12087b253e0be214c7a7a045c94de)

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

(cherry picked from commit b0c87ad5d437eb9462d5230afd1b75b7bf31db53)

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

(cherry picked from commit c4972537884a42e2171d8a1981d3c2d772f64a14)

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

(cherry picked from commit f7e4771c836e07e32680fa525c4fabab46b611f6)

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

(cherry picked from commit e8312b5fad4da00a51151c4492143cf64ea4bf34)

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

(cherry picked from commit 2095bc16fae7463f513eb747ae99ebf212741842)

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

(cherry picked from commit e725e51b11cb00ef9178b68ad14d6191f349a066)

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

(cherry picked from commit 81dd3035bf5a3eb899fb8433dc466385dd7bc616)

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

(cherry picked from commit 1ab83ee6a7deedb4fe5e3ca4cef100aed9d435c0)

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

(cherry picked from commit f3026de283d85db01e06c3086dc004068fcb38a0)

5 months agoTigerVNC 1.13.90 (1.14.0 beta) v1.13.90
Pierre Ossman [Thu, 20 Jun 2024 13:10:24 +0000 (15:10 +0200)]
TigerVNC 1.13.90 (1.14.0 beta)

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

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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

5 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

5 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

5 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.

5 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.

5 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.

5 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.

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

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

5 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.

5 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.

5 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.

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

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

5 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

5 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

5 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.

5 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.

5 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.

5 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.

5 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.

6 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.

6 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

6 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.

6 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

6 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

6 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>
6 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>
6 months agoAdd .gitignore for SELinux files
Pierre Ossman [Fri, 26 Apr 2024 12:53:00 +0000 (14:53 +0200)]
Add .gitignore for SELinux files

6 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.

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

6 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.