[GH-ISSUE #247] Show warning for wayland linux client #201

Closed
opened 2026-05-05 05:39:51 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @Ashark on GitHub (Feb 4, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/247

Operating Systems

Server: doesn't matter
Client: linux (when using wayland session)

Currently there is no wayland support (issue #109), but we can show a warning in a barrier window if we detect wayland session and it is used as a client (so we cannot process input).
TeamViewer 14 shows such warning.

Originally created by @Ashark on GitHub (Feb 4, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/247 ### Operating Systems ### Server: doesn't matter Client: linux (when using wayland session) Currently there is no wayland support (issue #109), but we can show a warning in a barrier window if we detect wayland session and it is used as a client (so we cannot process input). TeamViewer 14 shows such warning.
gitea-mirror 2026-05-05 05:39:51 -06:00
Author
Owner

@rpatterson commented on GitHub (Feb 20, 2019):

Running a Linux Wayland barrier server with a Windows client has keyboard problems, so the warning should probably also appear on the server too.

<!-- gh-comment-id:465767113 --> @rpatterson commented on GitHub (Feb 20, 2019): Running a Linux Wayland barrier server with a Windows client has keyboard problems, so the warning should probably also appear on the server too.
Author
Owner

@electrofelix commented on GitHub (Mar 19, 2020):

I recently hit this with Ubuntu 18.04 as a server, which defaults to running on Wayland it appears, and the mouse couldn't leave to move across due to failing to detect that the mouse has reached the edge.

Discovered that if you have a fullscreen app it will detect reaching the side of the screen (debug shows " has no neighbour" or similar text. This caused a lot of confusion and it was only after searching through these issues I spotted I needed to force the system to use Xorg instead of Wayland.

Had to edit the file /etc/gdm3/custom.conf and set WaylandEnable=false.

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

Now I haven't needed to do this on another machine that is also running Ubuntu 18.04, so I'm not sure if it was just the desktop login I needed to switch to Gnome on Xorg or if this was needed as well.

However it does seem like it would be useful to alert the user that it's not going to work if it detects it is running on Wayland until supported.

<!-- gh-comment-id:601103274 --> @electrofelix commented on GitHub (Mar 19, 2020): I recently hit this with Ubuntu 18.04 as a server, which defaults to running on Wayland it appears, and the mouse couldn't leave to move across due to failing to detect that the mouse has reached the edge. Discovered that if you have a fullscreen app it will detect reaching the side of the screen (debug shows "<direction> has no neighbour" or similar text. This caused a lot of confusion and it was only after searching through these issues I spotted I needed to force the system to use Xorg instead of Wayland. Had to edit the file /etc/gdm3/custom.conf and set `WaylandEnable=false`. ``` # GDM configuration storage # # See /usr/share/gdm/gdm.schemas for a list of available options. [daemon] # Uncoment the line below to force the login screen to use Xorg WaylandEnable=false ``` Now I haven't needed to do this on another machine that is also running Ubuntu 18.04, so I'm not sure if it was just the desktop login I needed to switch to `Gnome on Xorg` or if this was needed as well. However it does seem like it would be useful to alert the user that it's not going to work if it detects it is running on Wayland until supported.
Author
Owner

@deisi commented on GitHub (May 7, 2020):

I recently hit this with Ubuntu 18.04 as a server, which defaults to running on Wayland it appears

Im 99% sure that the default for Ubuntu 18.04 is Xorg. However you can change it if you want.

<!-- gh-comment-id:625130215 --> @deisi commented on GitHub (May 7, 2020): > I recently hit this with Ubuntu 18.04 as a server, which defaults to running on Wayland it appears Im 99% sure that the default for Ubuntu 18.04 is Xorg. However you can change it if you want.
Author
Owner

@electrofelix commented on GitHub (May 14, 2020):

@deisi I've just checked, my mistake it seems it's gnome3 uses wayland for the login screen with gdm3, so it you are using the ubuntu desktop your fine, but if you switch to gnome shell from the login manager you get switched to an Wayland environment unless you tweak the settings. This machine has been upgraded through a few LTS' so it is possible things don't behave the same with a fresh install.

In any case with Ubuntu 20.04 gone to wayland by default, this seems like it's going to cause a lot of surprises for people as they upgrade.

<!-- gh-comment-id:628597100 --> @electrofelix commented on GitHub (May 14, 2020): @deisi I've just checked, my mistake it seems it's gnome3 uses wayland for the login screen with gdm3, so it you are using the ubuntu desktop your fine, but if you switch to gnome shell from the login manager you get switched to an Wayland environment unless you tweak the settings. This machine has been upgraded through a few LTS' so it is possible things don't behave the same with a fresh install. In any case with Ubuntu 20.04 gone to wayland by default, this seems like it's going to cause a lot of surprises for people as they upgrade.
Author
Owner

@GitHubGeek commented on GitHub (Feb 11, 2021):

A warning would be great. Just spent an afternoon testing different versions of Barrier on a brand new KDE Neon (testing edition) - Was wondering why the screen edges didn't work at all. Turned out Wayland is now the default

<!-- gh-comment-id:777864280 --> @GitHubGeek commented on GitHub (Feb 11, 2021): A warning would be great. Just spent an afternoon testing different versions of Barrier on a brand new KDE Neon (testing edition) - Was wondering why the screen edges didn't work at all. Turned out Wayland is now the default
Author
Owner

@GreenMan36 commented on GitHub (Sep 29, 2021):

I'd love if this would be implemented!

<!-- gh-comment-id:930053428 --> @GreenMan36 commented on GitHub (Sep 29, 2021): I'd love if this would be implemented!
Author
Owner

@Ashark commented on GitHub (Sep 30, 2021):

I have found how this is implemented in ssr.

This is platform dedection (from here):

// replacement for QX11Info::isPlatformX11()
inline bool IsPlatformX11() {
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
	if(!QX11Info::isPlatformX11())
		return false;
#endif
	char *v = getenv("XDG_SESSION_TYPE");
	if(v != NULL) {
		if(strcasecmp(v, "x11") == 0)
			return true;
		if(strcasecmp(v, "wayland") == 0 || strcasecmp(v, "mir") == 0)
			return false;
	}
	char *d = getenv("DISPLAY");
	return (d != NULL);
}

This is a warning itself (from here):

	// warning for non-X11 window systems (e.g. Wayland)
	if(!IsPlatformX11()) {
		MessageBox(QMessageBox::Warning, NULL, MainWindow::WINDOW_CAPTION,
				   MainWindow::tr("You are using a non-X11 window system (e.g. Wayland) which is currently not supported by SimpleScreenRecorder. "
								  "Several features will most likely not work properly. "
								  "In order to solve this, you should log out, choose a X11/Xorg session at the login screen, and then log back in."),
				   BUTTON_OK, BUTTON_OK);
	}
<!-- gh-comment-id:931511590 --> @Ashark commented on GitHub (Sep 30, 2021): I have found how this is implemented in ssr. This is platform dedection (from [here](https://github.com/MaartenBaert/ssr/blob/00ebba23fb6581f9d822b79b19278ed156f21d4a/src/Global.h#L110-L125)): ```c // replacement for QX11Info::isPlatformX11() inline bool IsPlatformX11() { #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) if(!QX11Info::isPlatformX11()) return false; #endif char *v = getenv("XDG_SESSION_TYPE"); if(v != NULL) { if(strcasecmp(v, "x11") == 0) return true; if(strcasecmp(v, "wayland") == 0 || strcasecmp(v, "mir") == 0) return false; } char *d = getenv("DISPLAY"); return (d != NULL); } ``` This is a warning itself (from [here](https://github.com/MaartenBaert/ssr/blob/00ebba23fb6581f9d822b79b19278ed156f21d4a/src/GUI/MainWindow.cpp#L71-L78)): ```c // warning for non-X11 window systems (e.g. Wayland) if(!IsPlatformX11()) { MessageBox(QMessageBox::Warning, NULL, MainWindow::WINDOW_CAPTION, MainWindow::tr("You are using a non-X11 window system (e.g. Wayland) which is currently not supported by SimpleScreenRecorder. " "Several features will most likely not work properly. " "In order to solve this, you should log out, choose a X11/Xorg session at the login screen, and then log back in."), BUTTON_OK, BUTTON_OK); } ```
Author
Owner

@Ashark commented on GitHub (Oct 1, 2021):

This is how wayland detected warning looks in TeamViewer 15.22.3.
teamviewer wayland warning

<!-- gh-comment-id:932496106 --> @Ashark commented on GitHub (Oct 1, 2021): This is how wayland detected warning looks in TeamViewer 15.22.3. ![teamviewer wayland warning](https://user-images.githubusercontent.com/22634975/135675887-cb41b546-9cdd-46ab-87a9-76d257bbcc0d.png)
Author
Owner

@Ashark commented on GitHub (Oct 1, 2021):

This is how warning looks in simple screen recorder:
ssr wayland warning

<!-- gh-comment-id:932497498 --> @Ashark commented on GitHub (Oct 1, 2021): This is how warning looks in simple screen recorder: ![ssr wayland warning](https://user-images.githubusercontent.com/22634975/135676265-f4f58bf5-8c3b-4d8e-b103-6ec9f2b6f0b7.png)
Author
Owner

@dddw commented on GitHub (Oct 24, 2021):

thanks for implementing this

<!-- gh-comment-id:950331264 --> @dddw commented on GitHub (Oct 24, 2021): thanks for implementing this
Author
Owner

@florent-andre commented on GitHub (Jan 7, 2022):

Hi there, comment on closed to inform you that this warning don't show up on ubuntu 21.10 (wayland by default).
I tried Barrier as the server on this OS and see no warning in the logs nor in "messageBox".
Regards.

<!-- gh-comment-id:1007438626 --> @florent-andre commented on GitHub (Jan 7, 2022): Hi there, comment on closed to inform you that this warning don't show up on ubuntu 21.10 (wayland by default). I tried Barrier as the server on this OS and see no warning in the logs nor in "messageBox". Regards.
Author
Owner

@Ashark commented on GitHub (Jan 10, 2022):

@florent-andre Are you sure you use latest version? As I can see in the packages list, ubuntu 21.10 currently has outdated version 2.3.3.

<!-- gh-comment-id:1009023951 --> @Ashark commented on GitHub (Jan 10, 2022): @florent-andre Are you sure you use latest version? As I can see in the packages list, ubuntu 21.10 currently has outdated version 2.3.3.
Author
Owner

@florent-andre commented on GitHub (Jan 10, 2022):

I install it via snap and get the 2.4.0 version.
Result of snap list : "barrier 2.4.0-4-gac5a1bfd 682 latest/stable shymega -"
Barrier GUI -> about:
image
French build date says November 3rd.

<!-- gh-comment-id:1009460322 --> @florent-andre commented on GitHub (Jan 10, 2022): I install it via snap and get the `2.4.0` version. Result of `snap list` : "barrier 2.4.0-4-gac5a1bfd 682 latest/stable shymega -" Barrier GUI -> about: ![image](https://user-images.githubusercontent.com/837462/148856533-a821bcf1-0306-4efe-b045-9083589c6f12.png) French build date says November 3rd.
Author
Owner

@Ashark commented on GitHub (Jan 14, 2022):

Yes, I can confirm, I have installed ubuntu 21.10 and snap package, and there is no warning window.

<!-- gh-comment-id:1013101767 --> @Ashark commented on GitHub (Jan 14, 2022): Yes, I can confirm, I have installed ubuntu 21.10 and snap package, and there is no warning window.
Author
Owner

@RelicCornhusk commented on GitHub (May 4, 2022):

This warning would have saved me a lot of time trying to use Barrier on a Manjaro with Wayland.

<!-- gh-comment-id:1117757017 --> @RelicCornhusk commented on GitHub (May 4, 2022): This warning would have saved me a lot of time trying to use Barrier on a Manjaro with Wayland.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#201
No description provided.