You are not logged in.

#1 2014-08-16 00:16:27

sylverpyro
Member
Registered: 2014-08-15
Posts: 1

xbmc user from XBMC package unable to run systemctl --user

I'm posting this in multimedia rathar than another section as this appears to be an issue with the 'xbmc' user installed as part of the Arch xbmc package from pacman. 

When logged in at the xbmc user (either via sudo su - xbmc, or direct login after setting a pssword for the user), when I attempt to run any systemctl --user <command> I get the following error:

~]$ whoami && systemctl --user status dbus
xbmc
Failed to get D-Bus connection: Connection refused

But I can run non --user commands with no problem:

 ~]$ whoami && systemctl status dbus
xbmc
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/usr/lib/systemd/system/dbus.service; static)
   Active: active (running) since Wed 2014-08-13 16:50:15 CDT; 2 days ago
     Docs: man:dbus-daemon(1)
 Main PID: 265 (dbus-daemon)
   CGroup: /system.slice/dbus.service
           └─265 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

Also, other "normal" users (ones not created by a package, such as my own user) do not have this problem:

~]$ whoami && systemctl --user status dbus
sylverpyro
● dbus.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

the reason this is an issue is until very recently the btsync package from AUR used btsync@<username> unit files to run the service for the specified user.  With those unit files now depricated in systemd, I need to be able to run systemctl --user commands to enable the service correctly, but I just end up with a the ablove D-Bus error:

~]$ whoami && systemctl --user start btsync
xbmc
Failed to get D-Bus connection: Connection refused

Originally I thought it may be because the D-Bus session wasn't getting passed to the user properly, however even setting up the D-Bus session manually doesn't get me very far:

~]$ whoami && dbus-launch 
xbmc
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-A4VaDZXDOu,guid=9c85fdad1bcc90f8e1d5f52753eea211
DBUS_SESSION_BUS_PID=18081
 ~]$ export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-A4VaDZXDOu,guid=9c85fdad1bcc90f8e1d5f52753eea211
 ~]$ whoami && systemctl --user start btsync
xbmc
Failed to start btsync.service: Process org.freedesktop.systemd1 exited with status 1

Is there a permission, group, or UID restriction somewhere that I am missing or unaware of that prevents certain users from running systemctl --user commands?

Offline

Board footer

Powered by FluxBB