8

It seems that Electron has not support Wayland yet.

About Electron issue: Consider providing a build for Wayland

Does anybody know how to compile Electron to support Wayland native? (step by step)
and run Electron apps in Wayland(Weston etc...).

It took hours to compile electron and I fail many times.

greybeard
  • 2,249
  • 8
  • 30
  • 66
caijw
  • 81
  • 1
  • 1
  • 2

1 Answers1

8

Initial Wayland support was merged in Electron 12.

There is nothing specifically about it in the release notes but it can be tested with a recent electron version by running:

/path/to/yourElectronApplication --enable-features=UseOzonePlatform --ozone-platform=wayland

If you're using flatpack and your Electron application is Slack you need to create an override to expose the wayland socket as well as setting the GDK_BACKEND env variable to wayland. The override will be permanently stored in ~/.local/share/flatpak/overrides

flatpak override --user --socket=wayland com.slack.Slack
GDK_BACKEND=wayland flatpak run com.slack.Slack --enable-features=UseOzonePlatform --ozone-platform=wayland
tomodachi
  • 251
  • 3
  • 9