From 6de24374b85ec9777c0ee5c36c50036daee02db9 Mon Sep 17 00:00:00 2001 From: q3aql Date: Sun, 11 May 2025 19:42:55 +0200 Subject: [PATCH] Fix xdg-desktop-portal on Sway (wlroots) --- .config/sway/config | 5 +++++ .../user/xdg-desktop-portal-wlr.service.disabled | 13 +++++++++++++ .../user/xdg-desktop-portal.service.disabled | 9 +++++++++ 3 files changed, 27 insertions(+) create mode 100644 .config/systemd/user/xdg-desktop-portal-wlr.service.disabled create mode 100644 .config/systemd/user/xdg-desktop-portal.service.disabled diff --git a/.config/sway/config b/.config/sway/config index 8a2d34d..ae711e3 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -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 diff --git a/.config/systemd/user/xdg-desktop-portal-wlr.service.disabled b/.config/systemd/user/xdg-desktop-portal-wlr.service.disabled new file mode 100644 index 0000000..452d823 --- /dev/null +++ b/.config/systemd/user/xdg-desktop-portal-wlr.service.disabled @@ -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 diff --git a/.config/systemd/user/xdg-desktop-portal.service.disabled b/.config/systemd/user/xdg-desktop-portal.service.disabled new file mode 100644 index 0000000..ec8f96e --- /dev/null +++ b/.config/systemd/user/xdg-desktop-portal.service.disabled @@ -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