Page 1 of 1

Disabling Power Button Entirely

Posted: 15 Jan 2020, 00:15
by MotherLizard
I was struggling to disable the physical power button with Porteus Kiosk Cloud but solved with a quick and dirty solution that doesn't require re-imaging by simply adding the following line to the end of the config.

run_command=knumber=$(ps aux | grep acpid | head -n1 | cut -d' ' -f1,2) ; kill "$knumber"

All this really does is kills the acpid process so use with caution, but it has successfully disabled the physical power button on several different boxes running different hardware. Odd to me that this feature isn't standard as I can't imagine why anyone would want to give someone access to power on a Kiosk. Please note, it does not prevent the user from holding down the button for 10 seconds to force off. I'm open to better solutions but at least this works for now.

Disabling Power Button Entirely

Posted: 15 Jan 2020, 09:05
by fanthom
Hello MotherLizard,

This is probably more reliable/elegant way:

Code: Select all

run_command=killall acpid
"Odd to me that this feature isn't standard"
Kiosk supports full persistence (as an option) and thats why we need to ensure the PCs are powered down gently to avoid filesystem corruption.

Killing the acpid is not really a solution. As you know the users can hold the button for longer to power down the kiosk (and potentially damage persistent filesystem making things even worse).
If you want to prevent the users powering down the kiosks then you need to cut the physical access to the power button. Thats the only "reliable" solution i'm afraid ...


Thanks

Disabling Power Button Entirely

Posted: 18 Jan 2020, 19:44
by Dimitri
Since we're on the power button. If there's only one function assigned to it can the push perform the action rather than bring up a menu?

In my case, I would want the power button to only perform a reboot. Since there's just this one function I would want the push to perform the reboot rather than bring up the menu.

Disabling Power Button Entirely

Posted: 19 Jan 2020, 08:46
by fanthom
Hi Dimitri,

This may cause (rare) accident reboots if power button is pressed by mistake.

Maybe it would be better to use this parameter:

Code: Select all

shutdown_menu=reboot
If enabled, the user will be presented with a menu containing 'reboot' and 'cancel' buttons only so he could return to his session if button is pressed by mistake.

Thanks