aboutsummaryrefslogtreecommitdiffstats
path: root/unix
Commit message (Collapse)AuthorAgeFilesLines
* vncsession: use /bin/sh if the user shell is not setCarlos Santos2024-07-261-1/+1
| | | | | | | | | | 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>
* Generate better (fake) modelinesPierre Ossman2024-07-234-5/+66
| | | | | This is what Xwayland does, so let's try to do the same to avoid any incompatibilites with applications.
* Fix x0vncserver handling of timersPierre Ossman2024-07-051-3/+3
| | | | Bug fix for bf28683.
* Merge branch 'c++11' of github.com:CendioOssman/tigervncPierre Ossman2024-06-2424-250/+237
|\
| * Avoid shadowing variablesPierre Ossman2024-06-243-14/+14
| | | | | | | | | | It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
| * Simplify RandR output name handlingPierre Ossman2024-06-241-36/+26
| | | | | | | | | | Store the name in a std::string to make things less complex as we don't need to be as careful about making sure the data is free():d.
| * Avoid redundant argumentsPierre Ossman2024-06-242-14/+14
| | | | | | | | | | Remove redundant arguments where the method already has access to the relevant variable as an object attribute.
| * Simplify code using range-based for loopsPierre Ossman2024-06-242-23/+11
| | | | | | | | | | | | | | | | | | These are often more readable as they avoid a lot of the boilerplate of iterating over fixed arrays or STL containers. Note that this change is very conservative to avoid noise in "git blame". Only loops where this is a clear improvement have been converted.
| * Prefer std::find() over manual searchPierre Ossman2024-06-241-6/+6
| | | | | | | | | | Let's avoid reimplementing something basic that's available in the standard library. It also makes the code easier to read.
| * Mark overridden virtual functionsPierre Ossman2024-06-2411-48/+48
| | | | | | | | | | Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
| * Use nullptr in all C++ codePierre Ossman2024-06-2417-109/+116
| | | | | | | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
| * Make sure we use C++ 11Pierre Ossman2024-06-241-0/+2
| | | | | | | | | | | | 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.
* | Change development version to 1.14.80Pierre Ossman2024-06-201-1/+1
| |
* | Merge branch 'dri3' of github.com:CendioOssman/tigervncPierre Ossman2024-06-2011-87/+1623
|\ \ | |/ |/|
| * Automatically pick a suitable DRI3 render nodePierre Ossman2024-06-202-4/+37
| | | | | | | | | | | | 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.
| * Add option to specify used DRI3 render nodePierre Ossman2024-06-204-1/+31
| | | | | | | | | | Allows users to use a secondary GPU, or to disable DRI3 in case of issues.
| * Hide from GNOME to enable animationsPierre Ossman2024-06-202-2/+2
| | | | | | | | | | | | | | | | 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.
| * Add basic DRI3 supportPierre Ossman2024-06-208-76/+1465
| | | | | | | | | | | | | | | | | | 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.
| * Fix includes for Xorg dri3 modulePierre Ossman2024-06-201-0/+71
| | | | | | | | | | | | | | 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.
| * Avoid VNC updates for offscreen windowsPierre Ossman2024-06-201-28/+41
| | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'xserver-cleanup' of github.com:CendioOssman/tigervncPierre Ossman2024-06-1910-617/+31
|\|
| * Raise Xorg requirement to 1.20+Pierre Ossman2024-06-194-337/+0
| | | | | | | | | | No current distribution uses anything older, so let's make things easier for us to maintain.
| * Avoid patching miinitext.c for XvncPierre Ossman2024-06-198-150/+12
| | | | | | | | | | | | 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.
| * Stop explicitly including fbcmap_mi.cPierre Ossman2024-06-191-1/+1
| | | | | | | | This hasn't been needed since Xorg 1.16.
| * Stop linking to libX11Pierre Ossman2024-06-191-1/+1
| | | | | | | | | | Unclear why this was ever needed. libX11 is for X11 clients, and we're building a server.
| * Clean up CPPFLAGS handling in xserverPierre Ossman2024-06-197-30/+17
| | | | | | | | | | Make things a bit easier to maintain. This style is also more in line with what is being done for other DDX.
| * Remove unused NO_MODULE_EXTS definePierre Ossman2024-06-191-1/+1
| | | | | | | | This has never actually been used, as far as I can tell.
| * Actually use config.h in Xvnc/libvnc.soPierre Ossman2024-06-191-3/+6
| | | | | | | | | | Rather than disabling this, make sure the build can find the relevant file.
| * Simplify Xorg version handlingPierre Ossman2024-06-1910-111/+10
| | | | | | | | | | VENDOR_RELEASE has been available as a #define since Xorg 1.7, so let's use that and remove all of our custom magic.
* | Merge branch 'present' of github.com:CendioOssman/tigervncPierre Ossman2024-06-1914-33/+225
|\|
| * Keep frame clock running if waiting for frame tickPierre Ossman2024-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Add support for X Present extensionPierre Ossman2024-06-198-6/+200
| | | | | | | | | | | | | | 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.
| * Add missing ErrorF() newlinesPierre Ossman2024-06-191-3/+3
| |
| * Make SDesktop::start()/stop() optionalPierre Ossman2024-06-192-10/+0
| | | | | | | | | | Let's avoid requring these as a desktop implementation can now set up everything in the init() method.
| * Maintain a constant VNCServer/SDesktop connectionPierre Ossman2024-06-194-8/+15
| | | | | | | | | | | | | | | | | | 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.
| * Explicitly request timer repetitionPierre Ossman2024-06-194-8/+5
| | | | | | | | | | | | 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.
| * Stop treating "0" as "no timeouts"Pierre Ossman2024-06-193-4/+7
| | | | | | | | | | 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.
* | Create common recursive mkdir()Pierre Ossman2024-05-302-31/+31
| | | | | | | | | | | | | | Avoid duplicating this complexity in too many places. At the same time make the interface more identical to regular mkdir(), for familiarity.
* | Only do restorecon() for legacy directoryPierre Ossman2024-05-301-12/+12
| | | | | | | | | | This is only needed because of an historical type change of the legacy directory, so avoid doing it anywhere else.
* | Fix late vncsession loggingPierre Ossman2024-05-301-0/+7
| | | | | | | | | | | | | | | | | | 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.
* | Respect PAM modules for $XDG_STATE_HOMEPierre Ossman2024-05-301-3/+16
| | | | | | | | | | 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.
* | Add comment that PAM configuration is an examplePierre Ossman2024-05-201-0/+4
| | | | | | | | | | | | 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.
* | Merge branch 'casantos-rhbz_2180903' of https://github.com/casantos/tigervncPierre Ossman2024-05-2010-23/+34
|\ \
| * | vncconfig: add option to force view-only remote client connectionsCarlos Santos2024-04-269-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Remove the network::SocketServer interface.Carlos Santos2024-04-263-5/+7
| |/ | | | | | | | | | | | | 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>
* | Merge pull request #1737 from 62832/fix-1195Samuel Mannehed (ThinLinc team)2024-05-0712-64/+158
|\ \ | | | | | | Allow for alternative user config locations, deprecate `~/.vnc` in favour of XDG Base Directory Specification paths
| * | Implement XDG Base Directory paths, deprecate ~/.vnc902024-04-2612-68/+154
| | |
| * | Begin work on XDGBDS compliance and overrideable configs902024-03-152-7/+15
| |/
* | Add .gitignore for SELinux filesPierre Ossman2024-04-261-0/+2
| |
* | Don't trigger build from install targetPierre Ossman2024-04-261-1/+1
| | | | | | | | | | | | 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.