How to shutdown the computer system when striking the Power switch?

I have a Xubuntu Lucid 10.04 computer system connected in to my TELEVISION. I make use of the command line to supervise it.

Now when I struck the power switch it simply opens up a Logout screen.

Just how can I set it up to make sure that I can close it down by striking the power switch ? I recognize it has something to do with acpi or acpid.

I desire response to be command-line just as I do not have any kind of key-board or computer mouse attached to that computer system.

Modify :

Isn't there a means to change the default actions of the xfce4 power supervisor when pressing the power switch?

Additionally as opposed to making use of the GUI to do so, can I do it by creating/modifying an arrangement documents?

jbowtie had an intriguing solution yet I can not locate the xfce4-power-manager. xml documents. If a person recognizes where to locate that documents or just how to create it, I would certainly be interested.

2019-05-07 13:22:04
Source Share
Answers: 3

When you struck the power switch, the manuscript /etc/acpi/ is called. So one alternative is to change this manuscript to simply call the shutdown manuscript, bypassing the power monitoring daemon. This functions throughout all circulations and also settings that I recognize of.

Given that you're making use of Xubuntu, you can nonetheless simply transform the setup 'power - button - activity' in xfce4-power-manager.xml to the shutdown activity - the default value is the ask activity.

2019-05-09 08:28:58

You are without a doubt appropriate concerning ACPI.

This discussion forum blog post is specifically what you're seeking.

It information the actions you require to take much much better than I ever before can clarify it :)

Edit : Basically, the remedy was to install acpid.

2019-05-09 08:07:02

I located a remedy. jbowtie placed me on the appropriate tracks. Congratulations to him.

The trouble was I did not have any kind of xfce4 - power - manager.xml documents and also I did not recognize specifically where to locate the documents and also just how to change the documents, yet I located that I required to replicate the documents from /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml and also usage xfconf-query to change it effectively.

The shutdown activity for /xfce4-power-manager/power-button-action appeared to be 4 .

Below's what I did :

cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml $HOME/.config/xfce4/xfconf/xfce-perchannel-xml
DISPLAY=:0.0 xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/power-button-action -s 4
2019-05-08 09:09:54