[neon/snap-packaging/plasma-desktop-session] /: Activate xdg-desktop-portal-kde
Kevin Ottens
null at kde.org
Wed May 29 14:21:20 BST 2024
Git commit 3bccc74178a1438d7b1a5656b7d571c5eef3f9cb by Kevin Ottens.
Committed on 29/05/2024 at 11:22.
Pushed by ervin into branch 'master'.
Activate xdg-desktop-portal-kde
A +10 -0 scripts/run-portal.sh
M +12 -11 snap/snapcraft.yaml
https://invent.kde.org/neon/snap-packaging/plasma-desktop-session/-/commit/3bccc74178a1438d7b1a5656b7d571c5eef3f9cb
diff --git a/scripts/run-portal.sh b/scripts/run-portal.sh
new file mode 100755
index 0000000..59ebd7a
--- /dev/null
+++ b/scripts/run-portal.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+export PULSE_SERVER=unix:/run/user/`id -u`/pulse/native
+
+# This is necessary to avoid xdg-desktop-portal-kde have Qt try
+# to load the xdg-desktop-portal platform theme plugin
+# this would lead to an unfortunate situation where the portal
+# backend would try to talk to itself for file dialogs and such...
+unset SNAP
+
+exec "$@"
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 1a9213a..9d60175 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -52,17 +52,18 @@ apps:
- systemd-user-control
- snapd-control
- # xdg-desktop-portal-kde:
- # command: run.sh /usr/lib/x86_64-linux-gnu/libexec/xdg-desktop-portal-kde
- # slots:
- # - wayland
- # - x11
- # daemon: dbus
- # passthrough:
- # daemon-scope: user
- # activates-on:
- # - dbus-freedesktop-impl-portal-kde
- # restart-delay: 1s
+ xdg-desktop-portal-kde:
+ command: run-portal.sh /usr/lib/x86_64-linux-gnu/libexec/xdg-desktop-portal-kde
+ slots:
+ - wayland
+ - x11
+ - desktop
+ daemon: dbus
+ passthrough:
+ daemon-scope: user
+ activates-on:
+ - dbus-freedesktop-impl-portal-kde
+ restart-delay: 1s
pipewire:
command: run.sh /usr/bin/pipewire
More information about the Neon-commits
mailing list