[Solved] Shutdown notification

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Post Reply
donald_s
Ronin
Ronin
Posts: 2
Joined: 07 Mar 2019, 13:31
Distribution: Kiosk

[Solved] Shutdown notification

Post#1 by donald_s » 07 Mar 2019, 13:51

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!)
Last edited by donald_s on 07 Mar 2019, 18:26, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 5286
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Shutdown notification

Post#2 by fanthom » 07 Mar 2019, 15:52

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
Please add [Solved] to your thread title if the solution was found.

donald_s
Ronin
Ronin
Posts: 2
Joined: 07 Mar 2019, 13:31
Distribution: Kiosk

Shutdown notification

Post#3 by donald_s » 07 Mar 2019, 18:07

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.

User avatar
fanthom
Site Admin
Site Admin
Posts: 5286
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

[Solved] Shutdown notification

Post#4 by fanthom » 08 Mar 2019, 04:12

Nice - thank you in advance.
Please add [Solved] to your thread title if the solution was found.

Post Reply