Disabling Power Button Entirely
Posted: 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.
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.