Has anyone managed to disable the Power button? I have a desktop where it is easy to hit it on the keyboard by mistake, and it isn’t really needed, so I tried to disable it. I created a /etc/systemd/logind.conf.d/uddeborg.conf file with these contents:
[Login]
HandlePowerKey=ignore
But pressing the button still triggers this message in the journal
sep 12 10:28:59 freddi systemd-logind[661]: Power key pressed short.
sep 12 10:29:00 freddi systemd-logind[661]: The system will power off now!
sep 12 10:29:00 freddi systemd-logind[661]: System is powering down.
I also tried to put the disabling directly in /etc/systemd/logind.conf but that didn’t make any difference.