CLI commandto show a GUI message in KDE and/or a way to interrupt reboot/shutdown with a GUI notifiaction/alert

I run a long running background job on my machine every now and then.

When it is running I do not want to accidentally reboot my machine. I may forget its running and try to reboot/shutdown.

I think I can use systemd-inhibit to call my job/script so my computer doesn’t shutdown/reboot.

But I’d also like to show a persistant notification too – something that constantly reminds me a job is running.

Or, if there is someway to hook into the shutdown/reboot process from KDE so that if I try to reboot the system, it’ll warn me that I have a long running job.

Is this possible?

Exactly such a thing I could also use. I have a shellscript that starts a daily backup (via cronjob) that runs for about 45 minutes, but should not be interrupted by a reboot or shutdown of the PC.

It would be nice if there would be a graphical possibility to warn you via KDE dialog (and if necessary not allow the reboot or shutdown) if such a self-defined process or program is running.

Greetings
Bluelupo

You can use the ‘kdialog’ tool to create various kinds of dialogs

Looks like kdialog would work well.

I wonder if there is a way to catch/interrupt a reboot/shutdown?