1) Para desligar, digite o seguinte comando:
sudo poweroff
ou:
sudo shutdown -h now
para reiniciar o tipo:
sudo reboot
2) Edite /etc/acpi/events/powerbtn
Abra o terminal e digite:
nano /etc/acpi/events/powerbtn
Será algo como:
# /etc/acpi/events/powerbtn
# This is called when the user presses the power button and calls
# /etc/acpi/powerbtn.sh for further processing.
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
# We need to react on "button power.*" and "button/power.*" because
# of kernel changes.
event=button[ /]power
action=/etc/acpi/powerbtn.sh
Para salvar o tipo Ctrl + O e tecle entre Para sair do tipo Ctrl + X
Edite /etc/acpi/powerbtn.sh
e adicione as seguintes linhas:
# If all else failed, just initiate a plain shutdown.
/sbin/shutdown -h now "Power button pressed"
Salvar, sair e digitar:
sudo service acpid restart