14

I can access two different shutdown menus.

One is the default one :

Default elementary shutdown menu

The other is the one triggered by the command gnome-session-quit --power-off :

gnome-session-quit --power-off - shutdown menu

When looking for a command that I could use with a shortcut to shut down the system, this is the one I could find.

I'm curious what is the command for the default menu :)

  • I am just guessing, see if this works " sudo shutdown -h now " – jaga Jul 13 '15 at 4:56
  • @jaga - The shutdown menu does not need sudo, while shutdown -h now cannot be used without sudo. – user170 Jul 13 '15 at 13:12
  • yup that is true – jaga Jul 14 '15 at 5:34
  • I'm told it's triggered through a dbus-send command, but we can't seem to find a reference in it. – Lewis Goddard Jul 15 '15 at 16:43
11

You can launch the shutdown menu with the following command

dbus-send --session --print-reply --dest=com.canonical.Unity /org/gnome/SessionManager/EndSessionDialog org.gnome.SessionManager.EndSessionDialog.Open uint32:2 uint32:0 uint32:0 array:objpath:[]
  • Wow. Simply wow. Great job! Removed my answer to avoid shame :) – V_Pavel Jul 18 '15 at 9:57
  • Should this work in Loki? It seems that it doesn't. – user170 Jul 21 '16 at 9:45

Your Answer

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