When I hit the power button on my laptop (Ubuntu 14.04.1 without any modifications), I receive a pop window saying

Goodbye, what would you like to do? Lock Suspend Restart Shutdown

How can I get this screen through command-line or a script?

Addition: The linked question mentions gnome-session-quit but this does not produce the overlay specified above: the accepted answer performs the desired behavior.

  • Usually commands are meant to reduce the graphical painting and speed up a process. but gnome-session-quit --power-off may help just like @Neon_overhead said – Zuko Sep 8 '14 at 5:05
  • possible duplicate of How can you log out via the terminal? – Sylvain Pineau Sep 8 '14 at 7:25
  • @OluDoug I understand this, but I was looking to create a custom shortcut to produce the overlay, rather than actually do this through the terminal. – jII Sep 8 '14 at 14:32
  • 3
    Not a duplicate because this is about getting the "shut down" confirm screen, the other question is about logging out. The similarity appears to be only that both involve using gnome-session-quit, just with different options. While the OP may well decide the options in that other question are better, they don't address his specific need to see the shut down confirm screen. – thomasrutter Sep 9 '14 at 0:21

Does this do what you expect?

gnome-session-quit --power-off

Alternatively there are some other options to gnome-session-quit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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