Replacement for gnome-power-cmd script

Asked by Danilo Piazzalunga

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:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

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

Revision history for this message
Danilo Piazzalunga (danilopiazza) said :
#2

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.

Revision history for this message
Danilo Piazzalunga (danilopiazza) said :
#3

And now the question is solved.

Revision history for this message
jeff covey (jeff-covey) said :
#4

great, thank you!

Revision history for this message
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!
>

Revision history for this message
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