From f5897674f6f94d39499263a7dd21ffc667abd9ba Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sat, 15 Aug 2026 17:56:25 -0400 Subject: Fixed Polkit to check for systemd service Signed-off-by: Don Williams On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/scripts/Polkit.sh --- config/hypr/scripts/Polkit.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Polkit.sh b/config/hypr/scripts/Polkit.sh index f09c9e1f..ac961165 100755 --- a/config/hypr/scripts/Polkit.sh +++ b/config/hypr/scripts/Polkit.sh @@ -12,6 +12,17 @@ if pgrep -u "$UID" -f 'xfce-polkit|polkit-gnome-authentication-agent-1|polkit-kd exit 0 fi +# If hyprpolkitagent is managed as a user service, defer to systemd. +# This avoids race conditions where both this script and systemd start an +# agent at the same time, which can trigger "authentication agent already exists" +# DBus registration errors on first login. +if command -v systemctl >/dev/null 2>&1; then + if systemctl --user list-unit-files 2>/dev/null | grep -q '^hyprpolkitagent\.service'; then + systemctl --user start hyprpolkitagent.service >/dev/null 2>&1 || true + exit 0 + fi +fi + # Ensure Qt apps default to Wayland in a Wayland session if [ -n "${WAYLAND_DISPLAY:-}" ] && [ -z "${QT_QPA_PLATFORM:-}" ]; then export QT_QPA_PLATFORM=wayland -- cgit v1.2.3