how can non-admin users shutdown from CLI?

Ted Gould ted at
Wed Sep 30 04:53:37 BST 2009

On Tue, 2009-09-29 at 23:17 -0400, Jordan Mantha wrote:
> So the question is, is there or will there be a way to shutdown a
> computer as a non-admin user in Karmic? And if not, is there a
> particular reason not to?

It's a little bit of an internal interface, but you can manually launch
the dialogs that indicator-session uses by doing this:

  $ /usr/lib/indicator-session/gtk-logout-helper --shutdown

That will pop up the dialog.  If you want to just ask GNOME session to
shutdown you can do this:

  $ dbus-send --print-reply
--dest=org.gnome.SessionManager /org/gnome/SessionManager

And that should do the trick.  In both cases I believe you'll need to be
able to set up an X connection to get the dbus session bus (or pop the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : 

More information about the ubuntu-devel mailing list