I got this command which enables me to shutdown Ubuntu 13.10 directly from the keyboard (without needing to open a terminal and running something like sudo shutdown -h now
):
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
I have bound this command to a shortcut: CtrlAlt` and it works.
However, I want to know if I can get a Zenity window which will run the above shutdown command if I type y
as a response; but if I press n
the Zenity window should close and I can continue with my session.