Private bus: don't take over the session's document portal mount
CI / test (push) Canceled after 24m10s

A nested compositor's private D-Bus kept the session's XDG_RUNTIME_DIR, so
an xdg-document-portal activated on it mounted over $XDG_RUNTIME_DIR/doc and
removed the mount when the bus exited. The session's portal kept running
without it, and flatpak apps stopped starting.

The bus now has its own config that starts the document portal with a runtime
directory per compositor. scripts/test-private-bus.sh covers it. The KDE
colors test gets its own runtime directory for the same reason.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-25 22:06:51 -08:00
1 parent 50149e6b99
commit 70b24ffe47
5 files changed
+182 -4

No files matched your search

+5 -2
View File
@@ -53,9 +53,12 @@ echo "kdeglobals: ok"
for c in kwrite Xvfb import convert dbus-run-session; do
command -v $c >/dev/null 2>&1 || { echo "skipping the KWrite check ($c not installed)"; exit 0; }
done
export XDG_CONFIG_HOME="$tmp/kw" HOME="$tmp/kw/home" DISPLAY=:77 QT_QPA_PLATFORM=xcb \
QT_QPA_PLATFORMTHEME=kde KC tmp
# Its own runtime dir: a document portal started on this private bus would otherwise take over the
# session's $XDG_RUNTIME_DIR/doc mount, and remove it on exit.
export XDG_CONFIG_HOME="$tmp/kw" HOME="$tmp/kw/home" XDG_RUNTIME_DIR="$tmp/run" DISPLAY=:77 \
QT_QPA_PLATFORM=xcb QT_QPA_PLATFORMTHEME=kde KC tmp
mkdir -p "$HOME"
mkdir -m 700 "$XDG_RUNTIME_DIR"
Xvfb :77 -screen 0 800x600x24 >/dev/null 2>&1 & xvfb=$!
trap 'kill $xvfb 2>/dev/null; rm -rf "$tmp"' EXIT
sleep 1