logo

dmpop

Aircraft photography, spaghetti code, half-baked thoughts

Guestbook Reads
Currently reading: Gli occhi di Venezia, Alessandro Barbero


Reconfigure the power button in Debian

My humble Fujitsu Futro S720 running Debian makes a decent home server. But it has one weakness: the power button is too easy to press by accident, which shuts down the machine. I know that, because I've done it several times. Not the end of the world, but a mild nuisance I can live without. Turned out, it's an easy problem to solve.

Open the /etc/systemd/logind.conf file for editing, and add the following instruction:

HandlePowerKey=ignore

Instead of disabling the power button altogether, you can configure it to reboot the machine. In this case, the instruction is as follows:

HandlePowerKey=reboot

Save the changes, and restart the systemd-logind.service service:

systemctl restart systemd-logind.service

Done!


Published: 2024-11-21Reads: 538
Comment by emailBack
dmpop

dmpop

Linux user, amateur photographer, aviation enthusiast, clueless developer of ADS-B station, Pellicola and Tinble, author of a bunch of books. I can mix a decent Negroni, too. You can reach me at me@dmpop.xyz