Il 05/01/2024 20:10, Valerio Vanni ha scritto:
My first guess would be that you also need $HOME to be set, or perhaps
the current working directory, or both. --reset-env sets HOME, SHELL,
USER, LOGNAME and PATH. That seems like a reasonable addition.
I have no idea why it crashes later.
If you see my latest message, it goes in a different unit and is shut
down at the end of resume.
Perhaps I could try to remove --reset-env and set some parameter by hand
If I remove --reset-env and set HOME, kaffeine starts.
It seems that issue was to find file in home directory.
But still in systemd-suspend.service unit.
If, in a root shell, I launch
setpriv --reuid 1000 --regid 1000 --init-groups \
env XDG_RUNTIME_DIR=/run/user/1000 DISPLAY=:0 HOME=/home/valerio
XDG_CURRENT_DESKTOP=KDE \
/usr/bin/kaffeine --lastchannel >
/home/valerio/kaffeine_log_resumed 2>&1
kaffeine starts in user@1000.service.
Also with --reset-env.
It's only during resume that it gets into systemd-suspend.service.