Disabling Power Button Entirely

'User made' tutorials related to Porteus Kiosk edition.
Official kiosk documentation can be find here: http://porteus-kiosk.org/documentation.html
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
MotherLizard
Ronin
Ronin
Posts: 2
Joined: 14 Jan 2020, 23:36
Distribution: Porteus Kiosk Cloud

Disabling Power Button Entirely

Post#1 by MotherLizard » 15 Jan 2020, 00:15

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.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Disabling Power Button Entirely

Post#2 by fanthom » 15 Jan 2020, 09:05

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

Dimitri
White ninja
White ninja
Posts: 24
Joined: 12 Nov 2019, 19:38
Distribution: kiosk 4.8

Disabling Power Button Entirely

Post#3 by Dimitri » 18 Jan 2020, 19:44

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.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Disabling Power Button Entirely

Post#4 by fanthom » 19 Jan 2020, 08:46

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

Locked