mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
Avoid hardcoding XDG_CURRENT_DESKTOP, mention dbus implementation quirks
parent
30f6ba04a2
commit
6e65be864d
|
@ -4,11 +4,21 @@ Make sure you have installed both the `gtk` and `wlr` portal backends.
|
|||
|
||||
## Setup the environment
|
||||
From [xdg-desktop-portal-wlr](https://github.com/emersion/xdg-desktop-portal-wlr/tree/master?tab=readme-ov-file#running):
|
||||
> Make sure `XDG_CURRENT_DESKTOP` is set. Make sure `WAYLAND_DISPLAY` and `XDG_CURRENT_DESKTOP` are imported into D-Bus. If you're running Sway, this can be added to your config file:
|
||||
```sh
|
||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
> Make sure `XDG_CURRENT_DESKTOP` is set. Make sure `WAYLAND_DISPLAY` and `XDG_CURRENT_DESKTOP` are imported into D-Bus.
|
||||
|
||||
See [Systemd and dbus activation environments](https://github.com/swaywm/sway/wiki#systemd-and-dbus-activation-environments)
|
||||
|
||||
If dbus implementation is `dbus-broker`, systemd activation environment is used:
|
||||
|
||||
```
|
||||
`--systemd` can be omitted if you don't use it.
|
||||
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=${XDG_CURRENT_DESKTOP:-sway:wlroots}
|
||||
```
|
||||
If classic dbus is used, it has its own separate one:
|
||||
|
||||
```sh
|
||||
exec dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=${XDG_CURRENT_DESKTOP:-sway:wlroots}
|
||||
```
|
||||
`XDG_CURRENT_DESKTOP` should be passed through in case it was set before sway (i.e. by a Display Manager)
|
||||
|
||||
## Set the portals Sway should use
|
||||
From `portals.conf(5)`:
|
||||
|
|
Loading…
Reference in a new issue