[systemd-devel] user units and system units behavior

Mantas Mikulėnas grawity at gmail.com
Sat Feb 14 12:29:39 PST 2015


On Sat, Feb 14, 2015 at 9:37 PM, Alison Chaiken <alison at she-devel.com>
wrote:
>
> Mantas:
> > It's not broken on stock systemd. As long as your `systemd --user`
> instance
> > is running, systemctl can contact it directly over the
> > "$XDG_RUNTIME_DIR/systemd/private" socket, so there's no hard dependency
> on
> > on any D-Bus bus either (neither system nor session nor user).
> >
> > So if you see `systemctl --user` trying to contact systemd over the bus,
> it
> > only does so after it has given up trying to contact it over the private
> > socket. Does that socket exist?
>
> No, I gather that's the problem: 'ls $XDG_RUNTIME_DIR' shows no
> systemd sub-directory at all.


That's weird.

Does that directory have correct permissions (owned by you, etc.)? Can you
mkdir the "systemd" subdirectory manually?

Also try editing user at .service to launch systemd with --log-level=debug to
see if it reveals anything more useful.


> > Also check if the system service "user@<your uid>.service" is active,
> if it
> > has logged any errors. Try starting that .service manually too.
>
> 'systemctl start user at 1000.service' shows no errors in the journal; it
> just seems to 'exit 0' with no lasting effects.
> I suppose that gnome-session is supposed to create
> $XDG_RUNTIME_DIR/systemd/private and for some reason, silently fails
> to do so.   gnome-session shows no associated errors in the journal
> either.
>

It's systemd that would be listening on this socket, so it's systemd that
would be creating it.

gnome-session has absolutely nothing to do with this... (At most, sometime
in the future it might connect to the `systemd --user` instance, or be
replaced by it entirely; but it has no hand in actually starting it.)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150214/2ce67cfa/attachment.html>


More information about the systemd-devel mailing list