Harness session bus uses its own config: user and system D-Bus services are linked in except the document portal, so the headless session no longer starts org.freedesktop.portal.Documents
Browse files at this commit1ed35700ecf2925b689059db7416c846a34fa636Parent: d485dbd- fix
- harness session bus uses its own config: user and system D-Bus services are linked in except the document portal, so the headless session no longer starts org.freedesktop.portal.Documents
1 changed file +7 -1
- harness/up.sh +7 -1
harness/up.shmodified+7 -1
| @@ -10,7 +10,13 @@ printf '[server_config]\ndatabase_path = "yumush.db"\nserver_address = "127.0.0. | ||
| 10 | 10 | cp "$HERE/portals.conf" "$STATE/xdg/xdg-desktop-portal/niri-portals.conf" |
| 11 | 11 | (cd "$STATE/server" && YUMUSH_CONFIG_DIR="$STATE/server" exec "$ROOT/target/${PROFILE:-harness}/server" >"$STATE/server.log" 2>&1) & |
| 12 | 12 | echo "server $!" >> "$STATE/pids" |
| 13 | -systemd-run --user --scope --collect -q -u yumush-harness-session dbus-run-session -- "$HERE/session.sh" "$STATE" >"$STATE/session.log" 2>&1 & | |
| 13 | +mkdir -p "$STATE/dbus/services" | |
| 14 | +for f in "$HOME"/.local/share/dbus-1/services/*.service /usr/share/dbus-1/services/*.service; do | |
| 15 | + [ -e "$f" ] && ln -sf "$f" "$STATE/dbus/services/" | |
| 16 | +done | |
| 17 | +rm -f "$STATE/dbus/services/org.freedesktop.portal.Documents.service" | |
| 18 | +printf '<busconfig>\n<type>session</type>\n<keep_umask/>\n<listen>unix:tmpdir=/tmp</listen>\n<auth>EXTERNAL</auth>\n<servicedir>%s</servicedir>\n<policy context="default"><allow send_destination="*" eavesdrop="true"/><allow eavesdrop="true"/><allow own="*"/></policy>\n</busconfig>\n' "$STATE/dbus/services" > "$STATE/dbus/session.conf" | |
| 19 | +systemd-run --user --scope --collect -q -u yumush-harness-session dbus-run-session --config-file="$STATE/dbus/session.conf" -- "$HERE/session.sh" "$STATE" >"$STATE/session.log" 2>&1 & | |
| 14 | 20 | echo "session $!" >> "$STATE/pids" |
| 15 | 21 | for _ in $(seq 100); do [ -s "$STATE/env" ] && break; sleep 0.2; done |
| 16 | 22 | cat "$STATE/env" |