You are not logged in.
I use the KDE / Plasma Desktop and have applications that prevent my PC from restarting or shutting down.
For example 'keepassxc' or 'virtualbox'.
The second time I hit the restart-button always works.
Can I manipulate the 'shutdown' script or program somehow so that it exits a program or unmounts a drive before it tries to restart or shutdown?
Last edited by taumeister (2019-10-17 11:54:25)
Offline
I remember KDE has a way to add your own scripts to run at login and logoff somewhere in the KDE settings tool.
EDIT:
I found this here:
https://userbase.kde.org/System_Settings/Autostart
That screen is named "autostart", but in that same screen you can also configure shutdown scripts through that "run on" column of the table.
Last edited by Ropid (2019-10-17 12:03:35)
Offline
Unfortunately I only find the possibility to influence the autostart and to select the login screen etc. under 'Start and Exit'.
But surely systemd is used somehow and you can manipulate that, right?
Offline
ahh..sorry ..I will read first.
Offline
Depending on when an how this fails you can add a hook to /usr/lib/systemd/system-shutdown/
Offline