element-hq / element-hq/element-web

Enable wayland through config or environment variable

Open
#32,192 10 comments 0 reactions 0 assignees View on GitHub
A-App Settings A-Electron O-Uncommon T-Enhancement T-Feature Z-Linux Z-Wayland
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.