I have a miniature PC here with a large and prominent power button on the front which is easy to bump accidentally.

The system is running CentOS 7 with systemd.

I already know that I can set HandlePowerKey=ignore in /etc/systems/login.conf but this disables it entirely.

What is the procedure for addressing this on CentOS?

  • Try using a e.g. sleep 5 script before shutdown – don_crissti Nov 27 '18 at 20:34
  • Headless or DE? (I have a gnome solution that shows a dialog box...) – Fabby Nov 27 '18 at 21:39
  • This is a CentOS minimal install so there is no desktop environment. – Zhro Nov 28 '18 at 17:37

You might be able to tackle this via BIOS level setting.

There should be a setting in power or system management with reference to power button. It normally has two options: instant action, and delayed for a couple of seconds.

| improve this answer | |
  • I would agree but there is no such option on this BIOS. – Zhro Nov 27 '18 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.