Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Difference between menu shutdown and 'shutdown -h now'

Why can ubuntu perform a shutdown from the GUI even though it is prive on the command line? By what mechanism does it do so?

share|improve this question

marked as duplicate by Bruno Pereira, bodhi.zazen, Jjed, htorque, fossfreedom Feb 3 '12 at 21:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
^Not a duplicate, read that already. –  awiebe Feb 3 '12 at 0:54
    
@awiebe Can you please edit your question to make more sense? I am finding it hard to understand how this is not a duplicate? –  Jorge Castro Feb 3 '12 at 20:20
    
IMO, awebie asked about the mechanism that allows doing the shutdown without root privileges. –  krlmlr Feb 3 '12 at 21:09

1 Answer 1

The mechanism seems to be a DBus message, sent to a process with root privileges. Taken from How can I make shutdown not require admin password?:

Shutdown:

dbus-send --system --print-reply --dest=org.freedesktop.Hal \
          /org/freedesktop/Hal/devices/computer \
          org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.