New issue by gspe on void-packages repository https://github.com/void-linux/void-packages/issues/28036 Description: @olafmersmann I'd like to ask you what do you think about adding some wrapper scripts to help user with the problem of setting enviromental variable correctly in sway and wayland in general. I'm thinking about this: https://man.sr.ht/%7Ekennylevinsen/greetd/#how-to-set-xdg_session_typewayland https://en.opensuse.org/Portal:OpenSUSEway/Configuration Based on OpenSuse configuration I'm thinking about having: - a file to store enviromental variables `/etc/sway/env` : ``` # recomended enviroment variables for sway based desktop MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland-egl CLUTTER_BACKEND=wayland ECORE_EVAS_ENGINE=wayland-egl ELM_ENGINE=wayland_egl SDL_VIDEODRIVER=wayland _JAVA_AWT_WM_NONREPARENTING=1 NO_AT_BRIDGE=1 # QT theme QT_QPA_PLATFORMTHEME=qt5ct ``` - a wrap script to run sway `/usr/bin/sway-run.sh` : ``` #!/bin/sh # Session export XDG_SESSION_TYPE=wayland export XDG_SESSION_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway # this file imports sway desktop enviroments set -a . /etc/sway/env set +a sway $@ ``` - a desktop file to run sway from login manager `/usr/share/wayland-sessions/sway.desktop` : ``` [Desktop Entry] Name=Sway Comment=An i3-compatible Wayland compositor Exec=sway-run.sh Type=Application ```