From 475b87e903baa2fce0aae2ca012bedd3fca5a2f4 Mon Sep 17 00:00:00 2001 From: wuyang <5700876+banisherwy@user.noreply.gitee.com> Date: Mon, 27 Jul 2026 16:58:57 +0800 Subject: [PATCH] Avoid D-Bus notification unit conflicts --- config/systemd/dms.service | 3 +-- install.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/systemd/dms.service b/config/systemd/dms.service index 047bb75..2228ba5 100644 --- a/config/systemd/dms.service +++ b/config/systemd/dms.service @@ -4,8 +4,7 @@ PartOf=graphical-session.target After=graphical-session.target [Service] -Type=dbus -BusName=org.freedesktop.Notifications +Type=simple Environment=PATH=%h/.local/bin:%h/.local/state/niri-beyond-glass/nix-profile/bin:/usr/local/bin:/usr/bin:/bin ExecStart=%h/.local/state/niri-beyond-glass/nix-profile/bin/dms run --session ExecReload=/usr/bin/pkill -USR1 -x dms diff --git a/install.sh b/install.sh index a405ead..6b070ff 100755 --- a/install.sh +++ b/install.sh @@ -459,15 +459,17 @@ activate_dms() { return fi - if ! systemctl --user daemon-reload 2>/dev/null; then - log "当前没有可用的 systemd 用户会话;DMS 将在下次 Niri 登录时启动" - return - fi systemctl --user disable --now waybar.service mako.service 2>/dev/null || true pkill -x waybar 2>/dev/null || true pkill -x mako 2>/dev/null || true pkill -x swaybg 2>/dev/null || true pkill -x swayidle 2>/dev/null || true + systemctl --user reset-failed mako.service dms.service 2>/dev/null || true + + if ! systemctl --user daemon-reload 2>/dev/null; then + log "当前没有可用的 systemd 用户会话;DMS 将在下次 Niri 登录时启动" + return + fi systemctl --user enable dms.service "$profile/bin/dms" auth resolve-lock --quiet >/dev/null 2>&1 || true