Home / Community / Blog / CentOS - Power Button Behaviour - headless version

CentOS - Power Button Behaviour - headless version

My last resolution about power button works only when monitor is connected.

If you have headless server you can use systemd-logind service. By default (in CentOS 8) it do nothing. I've only found:

systemd-logind[1373]: Power key pressed

in /var/log/messages.

To change this behaviour you can modify

/etc/systemd/logind.conf

I've uncommented line

#HandlePowerKey=poweroff

After thins restart service:

systemctl restart systemd-logind

Now power key works on headless Linux server.

Kommentare

Bitte melden Sie sich Logan oder registrieren Sie sich um kommentieren zu können.

Just my blog...

Mon Di Mi Do Fr Sa So
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31