In the power settings there is no option to perform the shutdown action when a I press the power button. I only see the options to suspend and hibernate or do nothing.
You have to edit
/etc/systemd, and change the line as shown below (remember to unhash it):
Now I'm on Manjaro, so I can't confirm if it works, but it should.
I just tried this and it does not seem to work ... still does a sleep ... mind you ... I am not on a laptop so that could cause a difference Oct 26, 2016 at 8:10
There is the option, I tried that but it does not work.– MateusOct 27, 2016 at 17:50
Open terminal. Type:
sudo apt-get install dconf-tools
After installing dconf-tools, on screen (desktop), click on
Applications (top left of the screen), then find and click on
dconf Editor (normally the logo is a Magnifying glass with a checked red box)
In dconf Editor, go to:
org > gnome > settings-daemon > plugins > power
Click on the value of
button-power and choose
You could put this command in the terminal:
gsettings set org.gnome.settings-daemon.plugins.power power-button-action shutdown
It should force your dconf to be set for shutdown when power button is pressed.
also tries this ...however Oct 26, 2016 at 8:15
I guess they have removed the shutdown functionality for the power button. You should notify the bug tracker of elementary, they might tell you another way or simply add this feature for the next update. Oct 26, 2016 at 13:48
1The command does not work, I also tried the dconf-editor, the option shutdown does not appear.– MateusOct 27, 2016 at 17:55