The user unit app-kime@autostart will load when we simply remove the line. However, since kime spawns a daemon and exits immediately, systemd will kill the kime process because of it exiting before the automatically generated unit's TimeoutSec.
Since the TimeoutSec value is hardcoded to be 5 seconds, we can work around this by sleeping for longer than 5 seconds before exiting.
We introduce a shell script here to sleep for 7 seconds before exiting only if systemd-xdg-autostart-generator is running, and app-kime@autostart.service is active.
We can then set the desktop file's Exec= to /usr/bin/kime-xdg-autostart, the script file.
This has been tested on both KDE (systemd-xdg-autostart-generator dependent) and GNOME (not dependent) by myself.
Checklist
[ ] I have documented my changes properly to adequate places
Summary
This PR closes #576 by introducing a new shell script while fixing other various parts, such as icon name, of the
kime.desktop
autostart file.Note
576 was caused by
systemd-xdg-autostart-generator
, which KDE depends on since 5.21, skipping.desktop
files with the entryX-GNOME-Autostart-Phase
.app-kime@autostart
will load when we simply remove the line. However, sincekime
spawns a daemon and exits immediately, systemd will kill thekime
process because of it exiting before the automatically generated unit'sTimeoutSec
.TimeoutSec
value is hardcoded to be 5 seconds, we can work around this by sleeping for longer than 5 seconds before exiting.systemd-xdg-autostart-generator
is running, andapp-kime@autostart.service
is active.Exec=
to/usr/bin/kime-xdg-autostart
, the script file.systemd-xdg-autostart-generator
dependent) and GNOME (not dependent) by myself.Checklist