3

I'm running openbox with Arch Linux, and looks like the old console kit interface has been long gone,

%> dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files

So what's the interface to use now?

daisy
  • 53,527
  • 78
  • 236
  • 383

1 Answers1

6

Systemd manages dbus sessions in Arch. If you have an active logind session, then you can shutdown or reboot using systemd, without root privileges. See the power management section of the systemd page on the Arch Wiki:

systemctl poweroff

If there are other active seats, you will be prompted for a password.

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
  • Just wondering, what is the difference between this and `shutdown`? I have always been using the `shutdown` command to shutdown my system, should I be using `systemd`? – PlasmaPower Mar 30 '14 at 20:22
  • @PlasmaPower See [this question and answer](http://unix.stackexchange.com/questions/77029/why-are-reboot-shutdown-and-poweroff-symlinks-to-systemctl): I use `systemctl $command` because it encourages the habit of using systemd commands. – jasonwryan Mar 30 '14 at 20:26
  • 1
    Thanks for the link, I was looking for a question like that. I think I will be using `systemd` to shutdown my system, chrome was complaining about not being shutdown properly when I used `shutdown`. +1, I didn't know that you had to have a `logind` session. – PlasmaPower Mar 30 '14 at 20:31
  • 1
    @PlasmaPower Having an active login session is a very good idea: it will make a whole lot of things work as intended... – jasonwryan Mar 30 '14 at 20:32