The Linux world is slowly but surely moving towards Wayland as a replacement for X11. At some point we need to be able to natively support this brave new world. It does have legacy support for X11 applications though, so we are not completely excluded from that world.
Note that Wayland explicitly hides global coordinates from windows. This can cause problems coordinating monitor placement between tlclient and vncviewer. See bug 7793 for some details.
It seems possible to get native Wayland support with Qt. We have a prototype implementation that works well regarding keyboard grab (or "inhibit shortcuts" as it's called in Wayland-land). However, full screen on multiple monitors is still an issue that needs more investigation on Wayland.
The attempt at making vncviewer work on native Wayland using Qt6 can be found here: https://git.cendio.se/cendio/qt-tigervnc/-/tree/qt-wayland2 Some notes: * This branch of qt-tigervnc should be built using Qt6. This is because the qApp->nativeInterface() function (which is only available in Qt6) was needed: https://doc.qt.io/qt-6/qguiapplication.html#nativeInterface * To build with Qt6, instead of the default Qt5, remove "Qt5" from the find_package command at vncviewer/CMakeLists.txt:2 > diff --git vncviewer/CMakeLists.txt vncviewer/CMakeLists.txt > index 993d7e81..f9b10f1f 100644 > --- vncviewer/CMakeLists.txt > +++ vncviewer/CMakeLists.txt > @@ -1,5 +1,5 @@ > #list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/Static/6.2.4/gcc_64s") > -find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Network Widgets REQUIRED) > +find_package(QT NAMES Qt6 COMPONENTS Core Network Widgets REQUIRED) > find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network Widgets REQUIRED) > if(QT_VERSION_MAJOR LESS_EQUAL 5 AND BUILD_STATIC) > find_package(QT NAMES Qt6 Qt5 COMPONENTS * To build this branch of qt-tigervnc (can't be built in cenbuild yet) the following packages are needed: libxkbcommon-devel qt6-qtbase-devel qt6-qtbase-private-devel * The reason we need the Qt private API is that we need access to the Wayland surface. There are two pull requests opened that aim to add this to the public API: https://codereview.qt-project.org/c/qt/qtbase/+/571272 https://codereview.qt-project.org/c/qt/qtwayland/+/571271 * Regarding full screen on multiple monitors together with Wayland, it is currently disabled in this branch. The area is problematic, for reference, here is a issue on the topic for Remmina: https://gitlab.com/Remmina/Remmina/-/issues/2644
Some further notes regarding https://git.cendio.se/cendio/qt-tigervnc/-/tree/qt-wayland2: * When exiting fullscreen, it crashes with: > 'vncviewer/vncviewer' terminated by signal SIGSEGV (Address boundary error) It happens both when disabling fullscreen from the F8 menu, and when switching to Windowed from the options. Tested on Fedora 40 with GNOME on Wayland. * When using vncviewer to connect in windowed mode, the mouse doesn't focus the remote session. This means I have to click in the session before being able to interact with the remote apps. It also means F8 doesn't work until after I have clicked in the session. * When switching to fullscreen if "send system keys" are enabled, or if enabling "send system keys" GNOME shows a pop-up that asks to "Allow inhibiting shortcuts" every time. It seems remmina only shows it once. Here's their source code, perhaps we can use the same methods they use: https://gitlab.com/Remmina/Remmina/-/blob/master/src/rcw.c#L2303 https://gitlab.com/Remmina/Remmina/-/blob/master/src/rcw.c#L547 https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/gdkseat.c#L270 https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkseat-wayland.c#L4234 https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkseat-wayland.c#L3985 https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdktoplevel-wayland.c#L1752
Created attachment 1209 [details] Screenshot of Gnome Wayland's keyboard grab permission popup
(In reply to Samuel Mannehed from comment #3) > > * Regarding full screen on multiple monitors together with Wayland, it is > currently disabled in this branch. The area is problematic, for reference, > here is a issue on the topic for Remmina: > > https://gitlab.com/Remmina/Remmina/-/issues/2644 Discussion with the Wayland people: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/99