So this is pretty simple: when I press the power button whilst the machine is on, it comes up with a menu (of which one of the options is to shutdown)

However, I just want it to just start shutting down once I press the power button without any further interaction!

How do I accomplish this?

1 Answer 1


Yes, that is exactly how I'm running: a light tap on the power button just shuts down the machine!

Just press Ctrl+Alt+T to go to a terminal and type:

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

Voilà: The power button now powers off the machine!

To be completely honest: the other day I was at a friend and one of her cats ran across my laptop and shut down the machine, so to be avoided near cats! ;-)

  • 1
    There is probably a GUI way to do this.
    – fkraiem
    Dec 31, 2015 at 0:15
  • @fkraiem: I like KISS: Keep it Simply Stupid: the above will work on all Ubuntu machines with a simple key press and a copy-paste. dconf can be used as well, but then you need to install it first, navigate the UI, click on the wrong thing, maybe it doesn't work on lubuntu and that is just what the OP is using, ...
    – Fabby
    Dec 31, 2015 at 0:19
  • Thanks! now my pc turns off with a gentle press of the power button. luckily, i don't have any cats, so i think that won't be a problem Dec 31, 2015 at 0:33
  • @TomLombaerts: Graag gedaan! ;-) Q upvoted! I don't have any cats neither: a friend of mine has 3 of those pesky animals at her home!! ;-)
    – Fabby
    Dec 31, 2015 at 0:50
  • 1
    Would your solution to the power button push to shutdown, be an even greater solution to the BIG problem of Ubuntu 16.04LTS that will not shut down for so many people, myself included. I am a newbie and leery to write gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown' in the Terminal, not knowing how to 'un-write it' if it doesn't work. Your comment Fabby would be greatly appreciated
    – user247958
    Jul 6, 2016 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .