how can non-admin users shutdown from CLI?
ted at canonical.com
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
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
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20090929/d530ad7e/attachment.pgp
More information about the ubuntu-devel