Skip to content

Commit 2240dcc

Browse files
authored
fix: allow the user to enable Wayland (#146)
Forcing DISABLE_WAYLAND=1 makes the desktop command-chain hide the Wayland socket. If you then call mattermost-desktop with --ozone-platform-hint=auto or with env ELECTRON_OZONE_PLATFORM_HINT=wayland, chromium will crash instead of falling back to x11. We can default to x11 while still allowing users to opt-in to Wayland by simply not specifying any additional environment variables. Closes: #145
1 parent 02b0dd7 commit 2240dcc

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

snap/local/launcher.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
#!/bin/sh
22

3-
WAYLAND_OPTS=""
4-
5-
if [ -n "$WAYLAND_DISPLAY" ] && [ -z "$DISABLE_WAYLAND" ]; then
6-
WAYLAND_OPTS="--enable-features=UseOzonePlatform --ozone-platform-hint=auto"
7-
fi
8-
9-
exec "$SNAP/opt/Mattermost/mattermost-desktop" --no-sandbox --disable-seccomp-filter-sandbox --disable-features=GlobalShortcutsPortal $WAYLAND_OPTS "$@"
3+
exec "$SNAP/opt/Mattermost/mattermost-desktop" --no-sandbox --disable-seccomp-filter-sandbox --disable-features=GlobalShortcutsPortal "$@"

snap/snapcraft.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ apps:
6161
# Correct the TMPDIR path for Chromium Framework/Electron to
6262
# ensure libappindicator has readable resources
6363
TMPDIR: $XDG_RUNTIME_DIR
64-
DISABLE_WAYLAND: 1
6564
plugs:
6665
- shmem
6766
- home

0 commit comments

Comments
 (0)