I would like to use a gesture to shutdown/restart my computer and I need to know the command that launches the shutdown dialog:
Asked
Active
Viewed 1.0k times
3 Answers
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
)Restart (
/usr/lib/indicator-session/gtk-logout-helper --restart
)Shutdown (
/usr/lib/indicator-session/gtk-logout-helper --shutdown
)

Isaiah
- 59,344
8
To prompt only the shutdown/restart dialog, run the following command:
gnome-session-quit --reboot
Details on binding this on Ctrl-Alt-Del here.

lmeurs
- 207

Simion Agavriloaei
- 398
- 1
- 4
- 8
-
1Works perfectly in 18.04. Thanks. – NLV Nov 03 '18 at 03:40
5
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