Add background and USB consent with XDG session autostart

This commit is contained in:
Samuel Onoja committed 2026-09-29 22:53:30 +01:00
1 parent 915bc8afd6
commit ddbed192c0
13 files changed
+690 -11

No files matched your search

+10
View File
@@ -3,8 +3,13 @@ set -euo pipefail
session_target_started=0
shell_pid=
agent_pid=
autostart_pid=
cleanup() {
trap - EXIT INT TERM
if [[ -n $autostart_pid ]]; then
kill "$autostart_pid" 2>/dev/null || true
wait "$autostart_pid" 2>/dev/null || true
fi
if [[ -n $shell_pid ]]; then kill "$shell_pid" 2>/dev/null || true; fi
if [[ -n $agent_pid ]]; then
kill "$agent_pid" 2>/dev/null || true
@@ -53,6 +58,11 @@ env -u WAYLAND_SOCKET WAYLAND_DISPLAY="${FERESE_PUBLIC_WAYLAND_DISPLAY:-${WAYLAN
agent_pid=$!
"$release_dir/ferese-shell" &
shell_pid=$!
if [[ ${FERESE_SESSION_IMPORT_ENV:-0} == 1 && -x $release_dir/feresectl ]]; then
env WAYLAND_DISPLAY="${FERESE_PUBLIC_WAYLAND_DISPLAY:-${WAYLAND_DISPLAY:-}}" \
"$release_dir/feresectl" autostart &
autostart_pid=$!
fi
if wait "$shell_pid"; then
status=0
else
+2
View File
@@ -4,3 +4,5 @@ org.freedesktop.impl.portal.ScreenCast=ferese;
org.freedesktop.impl.portal.Settings=ferese;
org.freedesktop.impl.portal.Screenshot=ferese;
org.freedesktop.impl.portal.Wallpaper=ferese;
org.freedesktop.impl.portal.Background=ferese;
org.freedesktop.impl.portal.Usb=ferese;
+1 -1
View File
@@ -1,4 +1,4 @@
[portal]
DBusName=org.freedesktop.impl.portal.desktop.ferese
Interfaces=org.freedesktop.impl.portal.ScreenCast;org.freedesktop.impl.portal.Settings;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Wallpaper;
Interfaces=org.freedesktop.impl.portal.ScreenCast;org.freedesktop.impl.portal.Settings;org.freedesktop.impl.portal.Screenshot;org.freedesktop.impl.portal.Wallpaper;org.freedesktop.impl.portal.Background;org.freedesktop.impl.portal.Usb;
UseIn=Ferese;