Page 1 of 1

[Solved] Shutdown notification

Posted: 07 Mar 2019, 13:51
by donald_s
I'm running intranet web kiosks in a library-like environment, and need to provide a notification to users that the system will be shutting down in X minutes before the automatic shutdown kicks in, preferably in the form of a non-dismissable popup window.

Has anyone done something similar they could share, either out of the box with a custom scheduled task or via plugin?

Edit: have to test it, but it looks like maybe a scheduled task with a custom command using xmessage might work. It's dismissable, but looks like it steals focus at least, which would be good enough to get the user's attention. Better yet, I'd like to use something akin to gxmessage, to use the window dressing appropriate to the desktop environment, but I'm not sure what that is for Porteus Kiosk.

(We're looking to replace existing Windows web kiosks and this is the only piece of functionality left to duplicate. I spent days getting Windows working in kiosk mode and about 10 minutes to replace all of that with Porteus Kiosk, minus this last tweak - thanks devs for this awesome edition!)

Shutdown notification

Posted: 07 Mar 2019, 15:52
by fanthom
Hi Donald,

This should work:

Code: Select all

scheduled_action=Monday-17:55 Tuesday-17:55 Wednesday-17:55 Thursday-17:55 Friday-17:55 action: dunstify -u low/normal/critical "Kiosk will shut down in 5 minutes, please save your work"; sleep 5m; halt
Replace low/normal/critical with single urgency level (test all over SSH to find one which suits you best).

Thanks

Shutdown notification

Posted: 07 Mar 2019, 18:07
by donald_s
Fanthom - thanks so much. Tested this via ssh and it looks like it will work perfectly. I added -t to dunstify to keep it up longer, and have a three minute, two minute, <1 minute warning.

Excited to replace the Windows kiosks. Hopefully I can get the office to purchase updates and give something back for the great edition you've put together.

[Solved] Shutdown notification

Posted: 08 Mar 2019, 04:12
by fanthom
Nice - thank you in advance.