When I start the systemd timer service that I just now created (letās forget about the cron job) I get this error:
Nov 15 19:49:41 shmuel-manjaro systemd[1]: Started "kill and restart Plasmashell".
Nov 15 19:49:41 shmuel-manjaro kquitapp5[19610]: "Application plasmashell could not be found using service org.kde.plasmashell and path /MainApplication."
What info would you like to see?
I canāt post info about the cron job that was the original subject of this thread, because on advice of the community, I made a systemd timer job instead. That is what I am now trying to deal with. Maybe my last post was not so clear, so I will edit it.
journalctl -S today -f -u restar
t_plasmashell.service
Nov 16 00:12:27 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 00:12:27 shmuel-manjaro kquitapp5[40564]: "A
pplication plasmashell could not be found using ser
vice org.kde.plasmashell and path /MainApplication.
"
Nov 16 00:12:27 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 00:12:27 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
Nov 16 01:12:57 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 01:12:57 shmuel-manjaro kquitapp5[43623]: "A
pplication plasmashell could not be found using ser
vice org.kde.plasmashell and path /MainApplication.
"
Nov 16 01:12:57 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 01:12:57 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
Nov 16 02:13:07 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 02:13:07 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 02:13:07 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
Nov 16 03:13:17 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 03:13:17 shmuel-manjaro kquitapp5[49485]: "A
pplication plasmashell could not be found using ser
vice org.kde.plasmashell and path /MainApplication.
"
Nov 16 03:13:17 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 03:13:17 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
Nov 16 04:13:18 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 04:13:18 shmuel-manjaro kquitapp5[52971]: "A
pplication plasmashell could not be found using ser
vice org.kde.plasmashell and path /MainApplication.
"
Nov 16 04:13:18 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 04:13:18 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
Nov 16 04:16:12 shmuel-manjaro systemd[1]: Started
"kill and restart Plasmashell".
Nov 16 04:16:12 shmuel-manjaro kquitapp5[53666]: "A
pplication plasmashell could not be found using ser
vice org.kde.plasmashell and path /MainApplication.
"
Nov 16 04:16:12 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Main process exited, code=exit
ed, status=1/FAILURE
Nov 16 04:16:12 shmuel-manjaro systemd[1]: restart_
plasmashell.service: Failed with result 'exit-code'
.
You missed the point. Service already exists: /usr/lib/systemd/user/plasma-plasmashell.service
And to be honest, you probably donāt even need a timer. Just copy it under /etc/systemd/user/ and edit/add:
RuntimeMaxSec=3600
Restart=always
Not sure if this will work though. BUT! As it was already said, fix underlying issue if there even is one. This automatical restarting of plasmashell makes zero sense.
That is useless because the script(process) does not stay running
@shmu26 , donāt use the timer functionality yet, first try to make your user-service unit work as expected, eg. successfully restarts your plasmashell. Only after that works, you can add the timer to make it execute at your desired interval(s).
And as noted a few times, it needs to be a user-service not a global one under /etc/systemd/system and the likeā¦
and also this one https://www.xf.is/2020/06/27/configuring-systemd-user-timer/
But with both, when testing the service, I got an error message that it is not configured to run with systemctl, even though the content of the service file was the same as when I tried it globally.
Try to fix that firstā¦
Post the location where you placed the service file plus itās contents, plus the command you used that gave you the error message inclusive the exact message you got.
@TriMoon Thanks a lot for the help. To you and to everyone. I think I am going back to my Manjaro Gnome installation, at least for the meantime. This is tiring me outā¦