Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I want the PC to shut down without any dialogue, but let time for the applications to close properly.

One solution is, to change powerbtn.sh to: shutdown -h now but that does not wait for all applications to close.

share|improve this question

marked as duplicate by Tim, Eric Carvalho, Charles Green, muru, bcbc Dec 4 '14 at 2:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown

will change your the behaviour of the power button of your system from interactive (default) to immediate normal shutdown.

The command is gsettings set org.gnome.settings-daemon.plugins.power button-power <option>

Available options are:

  • Blank: does nothing
  • Suspend: makes your system suspend
  • Shutdown: starts a normal issued shutdown procedure
  • Hibernate: hibernates your system
  • Nothing: does nothing
  • Log out: log your user out
share|improve this answer
Thanks for this answer. Where is this documented? –  Alex Coventry Apr 14 at 0:27

To do it GUI:

Install dconf-tools:

sudo apt-get install dconf-tools

open dconf-editor from dash or just run dconf-editor & in terminal

Navigate to org.gnome.settings-daemon.plugins.power and set your default button-power action there:

enter image description here

replace suspend by shutdown.

share|improve this answer

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