You are not logged in.
I was able to solve the error from here: https://forums.bunsenlabs.org/viewtopic … 13#p144313
with the help of the German man page for 'systemd.service'. Then it was due to the special start conditions of sh scripts. This means that several start commands can be specified with the service-Type= ‘oneshot’
Please note that shell command lines are not directly supported. If shell command lines are to be used,
they must be explicitly passed to a type of shell implementation. Example:ExecStart=sh -c ‘dmesg | tac’
the service
[Unit]
Description=unklar:after-suspend.service: Start at suspend
DefaultDependencies=no
After=suspend.target
[Service]
Type=oneshot
Environment=DISPLAY=:0
ExecStart=sh -c /usr/local/bin/journal-entry started from after-suspend.service "active/running"
ExecStart=sh -c /home/unklar/John/john.sh
[Install]
RequiredBy=suspend.target
which shows this flawless output after suspend:
systemctl status after-suspend.service
○ after-suspend.service - unklar:after-suspend.service: Start at suspend
Loaded: loaded (/usr/local/lib/systemd/system/after-suspend.service; enabled; preset: enabled)
Active: inactive (dead) since Sat 2025-07-05 21:11:41 CEST; 56s ago
Invocation: 7aabc5c2d8064a8d8fb6e847bd50ede4
Process: 7562 ExecStart=sh -c /usr/local/bin/journal-entry started from after-suspend.service active/running (code=exited, status=0/SUCCESS)
Process: 8144 ExecStart=sh -c /home/unklar/John/john.sh (code=exited, status=0/SUCCESS)
Main PID: 8144 (code=exited, status=0/SUCCESS)
Mem peak: 1.8M
CPU: 33ms
Jul 05 21:11:41 T500 systemd[1]: Starting after-suspend.service - unklar:after-suspend.service: Start at suspend...
Jul 05 21:11:41 T500 unklar:journal-entry[7616]: User=unklar, Parm1= Parm2= Parm3=
Jul 05 21:11:41 T500 systemd[1]: after-suspend.service: Deactivated successfully.
Jul 05 21:11:41 T500 systemd[1]: Finished after-suspend.service - unklar:after-suspend.service: Start at suspend.
Unfortunately, the Conky's are still not displayed.
I suspect now,
-a rights problem
-the ‘service’ ends too quickly
Anyway, I'm going to take a break for 4 days...
Last edited by unklar (2025-07-06 13:12:09)
Offline