Enable wayland through config or environment variable
See original GitHub issueYour use case
Even if the wayland backend is considered experimental, the only way I know to actually enable Wayland support with Element is to pass the required command line arguments.
What would you like to do?
Setting Electron’s backend to Ozone with wayland support from a configuration file and/or from an environment variable.
Why would you like to do it?
In restricted environments like containers or flatpak, overriding command line arguments cannot be easily done: those extra arguments become necessary boilerplate. Config files and env vars can be passed down easily/selectively to containers.
In general Linux, permanent wayland support requires creating a custom .desktop
file (in addition to the existing one) and aliases in the shell or defining a custom bash script passing down the flags. Config files and env vars would behave like a “set once and forget” configuration without having to go through the effort duplication we have to go through today.
How would you like to achieve it?
A config file (either reading the “standard” $XDG_CONFIG_HOME/electron-flags.conf
or custom) and/or an environment variable (like ELEMENT_WAYLAND_EXPERIMENTAL=1
) would improve wayland user experience at a tiny programming cost.
Have you considered any alternatives?
- Creating a custom
element
bash script. - Adding aliases to my shell (or in general shell config if it should apply to all users).
- Providing an additional custom
.desktop
file, making sure I pinned the “right” one.
All these are partial answers: they don’t cover all the usecases so they need to be all present.
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (1 by maintainers)
Top GitHub Comments
That’s actually perfect! I just tested the --ozone-platform-hint=auto, it works as intended! It picked up that I have wayland and automatically switched to it.
With the electron builder we can ship this flag with the following setting:
Here the full string on the .desktop file:
I’m not the one who did the nvidia thing. That’s already there. 😃
Decoration, absolutely but also webrtc (if still needed)!
On Fri, 21 Oct 2022, 17:18 Christian Glombek, @.***> wrote: