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

[Bug]: Electron launches apps like firefox on X11/xwayland mode, even if they should run in native wayland #28793

Closed
3 tasks done
fabiscafe opened this issue Apr 23, 2021 · 3 comments
Labels

Comments

@fabiscafe
Copy link

fabiscafe commented Apr 23, 2021

Preflight Checklist

Electron Version

12.0.5

What operating system are you using?

Other Linux

Operating System Version

Arch Linux

What arch are you using?

Other (specify below)

Last Known Working Electron version

No response

Expected Behavior

Electron shouldn't change the default behavior of apps, launched by electron

Actual Behavior

All electron apps will start additional 3rd party apps in xwayland mode. This results in a conflict for some of them. Like firefox, if firefox is already launched and you press a link in an electron app, firefox will respond with a message "Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.", because firefox xwayland can not run inside a native wayland firefox.

Testcase Gist URL

No response

Additional Information

Steps to reproduce:

  1. Be on a wayland session (with xwayland support, like GNOME; check with echo $XDG_SESSION_TYPE)
  2. Launch firefox in wayland mode: MOZ_ENABLE_WAYLAND=1 firefox (could be default on your distro anyways, you can check after launch in about:support.)
  3. make sure that firefox is your default browser.
  4. Launch an Electron app
  5. Click a link in this electron app
@vially
Copy link
Contributor

vially commented Apr 23, 2021

It's not entirely clear from the description, but I suppose the Electron app is run using XWayland, right (e.g.: without passing the --enable-features=UseOzonePlatform --ozone-platform=wayland flags)?

If that's the case then this could be caused by #28436 and it might be worth trying to run the Electron app as native Wayland app to see if that makes any difference. Obviously this is not a solution because then you would have the opposite effect (apps run from Electron being forced to run as Wayland apps) but it should help confirm if it's the same underlying bug.

@fabiscafe
Copy link
Author

I suppose the Electron app is run using XWayland,

Yes, without any additional command or any flag passed.

might be worth trying to run the Electron app as native Wayland app to see if that makes any difference.

If I launch it with --enable-features=UseOzonePlatform --ozone-platform=wayland it works, But will in that case enforce wayland on the launching apps

You are right with #28436 that one sounds exactly like my problem. So I guess my one is a duplicate.

@nornagon
Copy link
Member

Duplicate of #28436

@nornagon nornagon marked this as a duplicate of #28436 Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants