[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix
From: |
Danny Milosavljevic |
Subject: |
Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix |
Date: |
Tue, 13 Jun 2017 16:32:43 +0200 |
Hi Ludo,
On Tue, 13 Jun 2017 10:06:16 +0200
address@hidden (Ludovic Courtès) wrote:
> The ‘delete-file’ was to avoid EADDRINUSE but I wonder if it’s really a
> good idea.
Not a good idea.
We should just put the shepherd socket somewhere in /run/user/4711 where 4711
is the user id (the entire name is present in an environment variable called
XDG_RUNTIME_DIR). That's a new tmpfs created by the login process (elogind) on
the first session of that user. That way, this EADDRINUSE can never happen
except when it should (see below). Everything else is a weird workaround.
> What’s the difference between a “user bus” and a “session bus”? In
> general, my understanding is that the user dbus-daemon (session bus?) is
> started on demand.
The user bus is started once per user. The session bus is started once per
session.
For example let's say you have a terminal server and log in as ludo on seat1
and also as ludo on seat2, then you have two session buses and one user bus.
Filesystem-based services usually run per-user because almost no one creates
extra directories for seats. Many programmers don't even think about it and so
their services are per-user whether they want to or not.
> > Or should we just expect the user to put a (shepherd with fix) invocation
> > into their HOME startup scripts like .xinitrc ? Note that if we did that
> > there's some session-specific stuff in the session's environment that
> > shepherd will inherit. Probably not that bad if invoked early enough.
>
> Currently that’s what I do: my ~/.xinitrc runs shepherd and that’s it.
Yeah, me too. That's how I found the bug... when I logged in to multiple seats
suddenly I had a LOT of duplicate "user" services running :)