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 |