[systemd-devel] systemctl --user fails because no D-BUS.
Mantas Mikulėnas
grawity at gmail.com
Thu Mar 24 18:01:23 UTC 2016
On Thu, Mar 24, 2016 at 6:21 PM, Flavio Leitner <fbl at sysclose.org> wrote:
>
> Hi,
>
> I am trying to create services and timers per user but on a recent
> CentOS minimal installation it doesn't work out of the box:
>
> $ ssh <server>
> server$ systemctl --user daemon-reload
> Failed to get D-Bus connection: No such file or directory
>
First check `systemctl status user@$UID.service` to make sure you actually
*have* a `systemd --user` instance, as some distros have ripped it out
entirely.
Some other systems don't configure pam_systemd for ssh, so check `loginctl`
to see if systemd-logind was told about your login (that's what triggers
the automatic start of user at .service).
Also check if $XDG_RUNTIME_DIR exists (normally it should point at
/run/user/$UID), and if $XDG_RUNTIME_DIR/systemd/private exists (should be
a Unix socket).
> I found some websites talking about creating a session with dbus-launch
> command, but that is packaged by dbus-x11, so it didn't make too much
> sense for me as I am not using anything related to x11.
>
`systemd --user` does not use a session bus anyway, as it runs outside any
sessions. It will try to start a "user bus" if the system's dbus is
configured to support it (as in Debian's "dbus-user-session"). It will also
listen on a private socket in $XDG_RUNTIME_DIR/systemd/, whether a user bus
is available or not.
(Neither the user bus nor XDG have anything to do with "x11 vs non-x11".)
--
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160324/7e483a8f/attachment.html>
More information about the systemd-devel
mailing list