Posts: 9
hazel
Joined: 23 Nov 2012
#1
After installing AntiX12, I noticed that systemd was included and decided to migrate to it. I used it before in Arch and I liked it. I made a service file for slim and I can now now boot straight into graphics. But I can't power off or reboot in my own name; I have to use sudo.

When I try it as myself I get the error"Failed to issue method call: Access denied"
The journal shows the following message from dbus:

Nov 18 18:13:37 Scenic dbus-daemon[394]: dbus[394]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.21" (uid=1000 pid=1693 comm="systemctl poweroff") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/bin/systemd")
Nov 18 18:13:37 Scenic dbus[394]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.21" (uid=1000 pid=1693 comm="systemctl poweroff") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/bin/systemd")

It looks as if I have broken some matching rule or other but I don't know if the fault lies with dbus itself or with policykit or even consolekit. I have noticed that both these daemons need to be running or there is an appreciable hiatus while systemd starts them. And that strikes me as very odd because systemd is supposed to have replaced consolekit with its own logind daemon.

In Arch I could shutdown as myself and there was definitely no run-time dependence on consolekit. I have been comparing configuration files with the Arch ones (because I saved my Arch /etc precisely to help with this kind of problem) but so far I have found no differences that seem relevant, and I haven't found a similar problem reported on Google either.

Is it a configuration problem or has it got something to do with the way Debian builds systemd? I downloaded the source to check on build config options but again, I couldn't see anything relevant.
Posts: 609
dark-D
Joined: 02 Jun 2008
#2
debian is far behind archlinux when it comes to development. even in experimental systemd and dependencies are not up-to-date. debian keeps a paranoid way of updating the software, one that i am not in terms with. as for your question my suggestion is to edit the exitantx.sh located in / usr/local/bin and replace the entries with sudo halt or sudo reboot for shutdown and reboot. if you want hibernate and suspend you need to add them to / etc/sudoers and modify the script yet again. this is the simplest solution i can think of. if you want a suggestion on how to use the dbus method of shutdown reboot included in antix wait for others to help. good luck.
Posts: 9
hazel
Joined: 23 Nov 2012
#3
Curiously I don't have that exit script. Using sudo or gksu with the systemd poweroff and reboot commands is the obvious workaround and that's what I'm currently doing, so it isn't really a practical problem, but I do get irritated when programs don't do what it says on the tin.

I have found the consolkit dependency: consolekit keeps a wholly unnecessary (in my opinion) log of system startups and shutdowns so it gets called in by the relevant systemd targets. But I don't think that has anything to do with the denial of access.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#4
That script is in antiX-base and full versions (you can install it if you like with apt-get install exit-antix).

About systemd, it is certainly way behind in Debian compared to Arch and other distros already usng systemd.

These links might be of some use, perhaps.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://wiki.debian.org/systemd"
linktext was:"http://wiki.debian.org/systemd"
====================================



========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.holgerschurig.de/linux/systemd.html"
linktext was:"http://www.holgerschurig.de/linux/systemd.html"
====================================
Posts: 9
hazel
Joined: 23 Nov 2012
#5
Yes, I found both of those. Neither mentions my specific problem but the second one is an excellent guide for creating one's own service files.

I've decided to let this drop. After all, you need root access to shut down under sysvinit too, and I still think systemd is worth using for its speed alone.
Posts: 96
melodie
Joined: 15 Feb 2008
#6
Hi hazel,

Do you have acpid installed ? (thinking of this page:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.archlinux.org/index.php/Systemd"
linktext was:"https://wiki.archlinux.org/index.php/Systemd"
====================================
)
Posts: 9
hazel
Joined: 23 Nov 2012
#7
No, I didn't bother to install it. I have a traditional desktop machine running on mains electricity, so I don't feel I need to bother with things like hibernation. Though I do vaguely remember reading that some people who use systemd on laptops have problems with that too.