diff --git a/harness/up.sh b/harness/up.sh index 1a14bab..4e9f7a1 100755 --- a/harness/up.sh +++ b/harness/up.sh @@ -10,7 +10,13 @@ printf '[server_config]\ndatabase_path = "yumush.db"\nserver_address = "127.0.0. cp "$HERE/portals.conf" "$STATE/xdg/xdg-desktop-portal/niri-portals.conf" (cd "$STATE/server" && YUMUSH_CONFIG_DIR="$STATE/server" exec "$ROOT/target/${PROFILE:-harness}/server" >"$STATE/server.log" 2>&1) & echo "server $!" >> "$STATE/pids" -systemd-run --user --scope --collect -q -u yumush-harness-session dbus-run-session -- "$HERE/session.sh" "$STATE" >"$STATE/session.log" 2>&1 & +mkdir -p "$STATE/dbus/services" +for f in "$HOME"/.local/share/dbus-1/services/*.service /usr/share/dbus-1/services/*.service; do + [ -e "$f" ] && ln -sf "$f" "$STATE/dbus/services/" +done +rm -f "$STATE/dbus/services/org.freedesktop.portal.Documents.service" +printf '\nsession\n\nunix:tmpdir=/tmp\nEXTERNAL\n%s\n\n\n' "$STATE/dbus/services" > "$STATE/dbus/session.conf" +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 & echo "session $!" >> "$STATE/pids" for _ in $(seq 100); do [ -s "$STATE/env" ] && break; sleep 0.2; done cat "$STATE/env"