Bug #2220

JDShutdown: dbus-send not working

Added by zitmar over 8 years ago. Updated over 5 years ago.

Status:NewStart date:08/14/2010
Priority:HighDue date:
Assignee:jiaz% Done:

0%

Category:Addon
Target version:020 - Next Release 2.0
Resolution:

Description

Hi,

In ubuntu 9.10+, there is no method org.freedesktop.PowerManagement.[Shutdown|Restart|Hibernate|Suspend]
Now there are two services to do this: org.freedesktop.Hal or org.freedesktop.ConsoleKit + org.freedesktop.DeviceKit.Power
But I must warn that Hal is being deprecated: https://wiki.ubuntu.com/Halsectomy

(1) Using the service org.freedesktop.Hal:

dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.[Shutdown|Restart|Hibernate|Suspend]

(2) Using the service org.freedesktop.ConsoleKit + org.freedesktop.DeviceKit.Power:
--> org.freedesktop.ConsoleKit is used to shutdown and restart:

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.[Stop|Restart]

--> org.freedesktop.DeviceKit.Power is used to hibernate and suspend:
dbus-send --system --print-reply --dest=org.freedesktop.DeviceKit.Power /org/freedesktop/DeviceKit/Power org.freedesktop.DeviceKit.Power.[Hibernate|Suspend]

Patch to solve this in attachment.

JDShutdown.patch.tar.gz (2.45 KB) zitmar, 08/14/2010 03:51 PM

Also available in: Atom PDF