Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show warning for wayland linux client #247

Closed
Ashark opened this issue Feb 4, 2019 · 15 comments
Closed

Show warning for wayland linux client #247

Ashark opened this issue Feb 4, 2019 · 15 comments
Labels
enhancement New feature or request

Comments

@Ashark
Copy link

Ashark commented Feb 4, 2019

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.

@rpatterson
Copy link

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

@electrofelix
Copy link

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.

@deisi
Copy link

deisi commented 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.

@electrofelix
Copy link

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

@GitHubGeek
Copy link

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

@GreenMan36
Copy link

I'd love if this would be implemented!

@Ashark
Copy link
Author

Ashark commented 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);
	}

@Ashark
Copy link
Author

Ashark commented Oct 1, 2021

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

@Ashark
Copy link
Author

Ashark commented Oct 1, 2021

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

shymega added a commit that referenced this issue Oct 23, 2021
@dddw

This comment has been minimized.

@florent-andre
Copy link

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.

@Ashark
Copy link
Author

Ashark commented 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.

@florent-andre
Copy link

florent-andre commented 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.

@Ashark
Copy link
Author

Ashark commented Jan 14, 2022

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

@RelicCornhusk
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants