12

I would like to use a gesture to shutdown/restart my computer and I need to know the command that launches the shutdown dialog:

enter image description here

14

/usr/lib/indicator-session/gtk-logout-helper can be used to open the following dialogs:

  • Log Out (/usr/lib/indicator-session/gtk-logout-helper --logout)

    enter image description here

  • Restart (/usr/lib/indicator-session/gtk-logout-helper --restart)

    enter image description here

  • Shutdown (/usr/lib/indicator-session/gtk-logout-helper --shutdown)

    enter image description here

| improve this answer | |
7

To prompt only the shutdown/restart dialog, run the following command:

gnome-session-quit --reboot

Details on binding this on Ctrl-Alt-Del here.

| improve this answer | |
  • 1
    Works perfectly in 18.04. Thanks. – NLV Nov 3 '18 at 3:40
3

In Gnome Shell if I try /usr/lib/indicator-session/gtk-logout-helper --shutdown I obtain the dialog in the screenshot you provided, but when I click on Shut Down I receive another dialog (similar to the first). Only after a second confirm my system shuts down.

This method reaches the second dialog directly via command line?

gnome-session-quit --power-off
| improve this answer | |

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.