unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix
Date: Tue, 13 Jun 2017 16:32:43 +0200	[thread overview]
Message-ID: <20170613163243.16baca6d@scratchpost.org> (raw)
In-Reply-To: <87fuf448hz.fsf@gnu.org>

Hi Ludo,

On Tue, 13 Jun 2017 10:06:16 +0200
ludo@gnu.org (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 :)

  reply	other threads:[~2017-06-13 14:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22 16:50 Defining user services in Guix Mathieu Othacehe
2017-04-22 18:31 ` Danny Milosavljevic
2017-04-22 23:06   ` Ludovic Courtès
2017-04-23 16:27     ` Mathieu Othacehe
2017-04-25  0:02       ` Mekeor Melire
2017-04-25  8:36         ` Ricardo Wurmus
2017-04-27 13:36           ` Ludovic Courtès
2017-04-28 15:22             ` Mathieu Othacehe
2017-05-02 10:02               ` Ludovic Courtès
2017-05-02 19:23                 ` Mathieu Othacehe
2017-05-02 21:21                   ` Ludovic Courtès
2017-05-02 21:44                     ` Ricardo Wurmus
2017-05-03  9:43                       ` Mathieu Othacehe
2017-06-11  1:29                 ` Invoking user shepherd; Was: Re: Defining *user* " Danny Milosavljevic
2017-06-11  8:33                   ` Mathieu Othacehe
2017-06-13  8:00                     ` Ludovic Courtès
2017-06-13  8:06                   ` Ludovic Courtès
2017-06-13 14:32                     ` Danny Milosavljevic [this message]
2017-06-13 16:06                       ` Ludovic Courtès
2017-05-02 21:22               ` Defining user " Ludovic Courtès
2017-04-22 23:53   ` Carlo Zancanaro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170613163243.16baca6d@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).