Ubuntu

Replacement for gnome-power-cmd script

Asked by Danilo Piazzalunga on 2009-10-15

The gnome-power-cmd script has been removed from gnome-power-manager 2.28. Therefore, it is no longer available on Ubuntu 9.10 (Karmic Koala).

Where do I find a replacement for this script, that is, a method to perform logout/reboot/shutdown from the command line?

[re-opening by jeff covey:]

is there no answer for this? my ~/bin/hibernate script suddenly stopped working after upgrading to koala.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-power-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Danilo Piazzalunga
Solved:
2009-11-24
Last query:
2009-11-24
Last reply:
2009-10-31
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

At last, I have found an answer:

* Suspend and Hibernate are handled by DeviceKit-power

** Suspend
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DeviceKit.Power /org/freedesktop/DeviceKit/Power org.freedesktop.DeviceKit.Power.Suspend

** HIbernate
dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DeviceKit.Power /org/freedesktop/DeviceKit/Power org.freedesktop.DeviceKit.Power.Hibernate

* Logout, Reboot and Shutdown are handled by gnome-session

** Logout
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1

** Reboot
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestReboot

** Shutdown
dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown

** If some application is inhibiting logout/reboot/shutdown, no action will be performed and gnome-session will show a confirmation dialog.

And now the question is solved.

jeff covey (jeff-covey) said : #4

great, thank you!

Vikram Dhillon (dhillon-v10) said : #5

If you question has been solved, please mark it solved :)

--
Regards,
Vikram Dhillon

On Mon, 2009-12-07 at 14:51 +0000, jeff covey wrote:
> Question #85949 on gnome-power-manager in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gnome-power-manager/+question/85949
>
> jeff covey posted a new comment:
> great, thank you!
>

jeff covey (jeff-covey) said : #6

i'm sorry, i didn't realize i needed to mark it solved. it seems to have been done now, according to the status line above. let me know if i need to do anything else.

thanks,
jeff