What's the right way to shutdown Arch Linux through dbus interface?
8,589
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.
Author by
daisy
Updated on September 18, 2022Comments
-
daisy over 1 year
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?
-
PlasmaPower about 10 yearsJust wondering, what is the difference between this and
shutdown
? I have always been using theshutdown
command to shutdown my system, should I be usingsystemd
? -
jasonwryan about 10 years@PlasmaPower See this question and answer: I use
systemctl $command
because it encourages the habit of using systemd commands. -
PlasmaPower about 10 yearsThanks 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 usedshutdown
. +1, I didn't know that you had to have alogind
session. -
jasonwryan about 10 years@PlasmaPower Having an active login session is a very good idea: it will make a whole lot of things work as intended...