## Copyright (C) 2024 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## Do not use sudo!
#systemctl --user enable msgcollector-gui.service
#systemctl --user start msgcollector-gui.service
#systemctl --user status msgcollector-gui.service
#journalctl --user -f -u msgcollector-gui.service

[Unit]
Description=msgcollector msgdispatcher

[Service]
Type=notify
ExecStart=/usr/libexec/msgcollector/msgdispatcher
KillMode=control-group
KillSignal=SIGKILL
NotifyAccess=all
WatchdogSec=30
Restart=always

[Install]
## Not functional in Qubes.
## systemctl --user status graphical-session.target
## Qubes fails to start/activate systemd graphical-session.target target #9576
## https://github.com/QubesOS/qubes-issues/issues/9576
#WantedBy=graphical-session.target
##
## default.target comes with other issues. Probably missing environment variables.
##
## Nov 12 11:32:57 kicksecure-bookworm msgdispatcher[11462]: qt.qpa.xcb: could not connect to display
## Nov 12 11:32:57 kicksecure-bookworm msgdispatcher[11462]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
## Nov 12 11:32:57 kicksecure-bookworm msgdispatcher[11462]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
## Nov 12 11:32:57 kicksecure-bookworm msgdispatcher[11462]: Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
##
## graphical-session.target would probably not have these issues.
#WantedBy=default.target

WantedBy=graphical-session.target
