The command I always used to achieve this was:
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
However, recently I found that this stopped working.
When I ran the command from a terminal I found the following error:
The name org.freedesktop.ConsoleKit was not provided by any .service files
Eventually I found a post on the ubuntu forums (referencing their french forums) which suggests that this no longer works and to try instead:
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true
When combined with a keyboard shortcut this works perfectly again.
No comments:
Post a Comment