sway:wlroots recommendation for XDG_CURRENT_DESKTOP

Vladimir-csp 2024-09-15 02:27:25 +03:00
parent 5b8ab0e37e
commit 30f6ba04a2

@ -550,7 +550,9 @@ bindsym $mod+shift+ctrl+m mode $mode_move_all_workspace_windows
### XDG_CURRENT_DESKTOP environment variable is not being set
Some applications and desktop mechanisms may rely on the `XDG_CURRENT_DESKTOP` environment variable to be set so that the application can accommodate for being ran under sway. Examples include XDG autostart implementations, screensharing in Firefox and many others. Sway itself does not set this variable, it should be set before sway is started. If sway is started from shell profile, export it before sway invocation. If you use a login manager, the login manager will use the DesktopNames attribute inside the `sway.desktop` file. This file may be modified to add `DesktopNames=sway`.
Some applications and desktop mechanisms may rely on the `XDG_CURRENT_DESKTOP` environment variable to be set so that the application can accommodate for being ran under sway. Examples include XDG autostart implementations, screensharing in Firefox and many others.
Sway itself does not set this variable, it should be set before sway is started. Sane default would be `sway:wlroots` (specific `sway` as first priority, common `wlroots` after it to be in line with other wlroots compositors). If you start sway from shell profile, export it before sway invocation. If you use a login manager, the login manager will use the DesktopNames attribute inside the `sway.desktop` file. This file may be modified to add `DesktopNames=sway;wlroots` (also see [#7952](https://github.com/swaywm/sway/pull/7952)).
It's not good practice for applications to make use of XDG_CURRENT_DESKTOP in this way, and Firefox has an issue open to try to fix it. Refer to [xpdw's FAQ](https://github.com/emersion/xdg-desktop-portal-wlr/wiki/FAQ#how-do-i-run-xdpw) and [xdpw's Troubleshooting guide](https://github.com/emersion/xdg-desktop-portal-wlr/wiki/%22It-doesn't-work%22-Troubleshooting-Checklist) if your issue is specifically related to screensharing.