Fix xdg-desktop-portal on Sway (wlroots)

This commit is contained in:
q3aql 2025-05-11 19:42:55 +02:00
parent 33217bd040
commit 6de24374b8
3 changed files with 27 additions and 0 deletions

View File

@ -33,6 +33,11 @@ exec --no-startup-id pnmixer -t &
# Configure screens and resolution
exec --no-startup-id ~/.config/sway/startwlrrandr.sh &
# Run xdg-portal for wayland (wlroots)
# If you have problems, rename this files:
# mv -v ~/.config/systemd/user/xdg-desktop-portal.service.disabled ~/.config/systemd/user/xdg-desktop-portal.service
# mv -v ~/.config/systemd/user/xdg-desktop-portal-wlr.service.disabled ~/.config/systemd/user/xdg-desktop-portal-wlr.service
exec --no-startup-id systemctl --user start xdg-desktop-portal-wlr.service
# Run apps with sudo

View File

@ -0,0 +1,13 @@
[Unit]
Description=Portal service (wlroots implementation)
PartOf=graphical-session.target
After=graphical-session.target
#ConditionEnvironment=WAYLAND_DISPLAY
[Service]
Type=dbus
Environment=WAYLAND_DISPLAY=wayland-1
BusName=org.freedesktop.portal.Desktop
#BusName=org.freedesktop.impl.portal.desktop.wlr
ExecStart=/usr/libexec/xdg-desktop-portal-wlr
Restart=on-failure

View File

@ -0,0 +1,9 @@
[Unit]
Description=Portal service
PartOf=graphical-session.target
[Service]
Type=dbus
#BusName=org.freedesktop.portal.Desktop
ExecStart=/usr/libexec/xdg-desktop-portal
Slice=session.slice