From 0b15f70f0de6e6af089cb70090822cd8ccc10c48 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:26 +0100 Subject: fix(signal): import XDG_SESSION_TYPE/DESKTOP into user systemd + clean stop Two issues with the sway autostart of signal.service: 1. Electron picks its tray backend from XDG_SESSION_TYPE and XDG_SESSION_DESKTOP. The sway config only imported DISPLAY, WAYLAND_DISPLAY, SWAYSOCK and XDG_CURRENT_DESKTOP into the systemd user manager, so services launched there got a partial env and Electron registered no SNI tray icon. Worked when launched from a terminal (which inherits sway's full env, including the bits set by pam_systemd). Add the two missing variables to both systemctl import-environment and dbus-update-activation-environment. 2. With minimize-to-tray on, Electron treats SIGTERM as a window-close and just hides the window, so 'systemctl --user stop signal' did nothing visible until the 90s default timeout SIGKILLed. Switch to ExecStop=flatpak kill org.signal.Signal, which uses flatpak's own instance manager to actually terminate the sandboxed app, plus a short TimeoutStopSec as a safety net. --- dot_config/systemd/user/signal.service | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dot_config/systemd/user') diff --git a/dot_config/systemd/user/signal.service b/dot_config/systemd/user/signal.service index 80d25f2..264eb6e 100644 --- a/dot_config/systemd/user/signal.service +++ b/dot_config/systemd/user/signal.service @@ -7,8 +7,13 @@ ConditionEnvironment=WAYLAND_DISPLAY [Service] Type=simple ExecStart=/usr/bin/flatpak run org.signal.Signal --start-in-tray +# Electron + "minimize to tray" turns SIGTERM into a window-close which +# hides instead of exits, so systemd would wait for the stop timeout +# before SIGKILLing. Use flatpak's instance manager to kill it directly. +ExecStop=/usr/bin/flatpak kill org.signal.Signal Restart=on-failure RestartSec=5s +TimeoutStopSec=10s [Install] WantedBy=sway-session.target -- cgit v1.3.1