Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: How to poweroff the system from user?
Date: Sun, 22 Mar 2015 07:41:42
Message-Id: melrmq$7qm$1@ger.gmane.org
In Reply to: [gentoo-user] How to poweroff the system from user? by German
1 On 21/03/15 21:26, German wrote:
2 > If I run poweroff from root, the system shuts down, however when I run poweroff from user -- command not found. How to shut down the system from user? Thanks
3
4 If you have dbus running (KDE, Gnome and others automatically use it),
5 then you can shut down with something like:
6
7
8 dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit"
9 /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
10
11
12 You can make the above a script and save it in /usr/local/bin/dbus-halt
13 (or whatever.)
14
15 Some more scripts:
16
17 https://bbs.archlinux.org/viewtopic.php?id=127962