From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix Date: Tue, 13 Jun 2017 18:06:34 +0200 Message-ID: <874lvj3m9h.fsf@gnu.org> References: <87o9vowfn0.fsf@gmail.com> <20170422203131.610f2a30@scratchpost.org> <878tmsghzk.fsf@gnu.org> <87inlvdr76.fsf@gmail.com> <87r30hbbi7.fsf@gmail.com> <87fugwsx2s.fsf@elephly.net> <8737cu7z0s.fsf@gnu.org> <877f24pnem.fsf@gmail.com> <87mvavk243.fsf@gnu.org> <20170611032900.6ac194b9@scratchpost.org> <87fuf448hz.fsf@gnu.org> <20170613163243.16baca6d@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKoL8-0005vF-5q for guix-devel@gnu.org; Tue, 13 Jun 2017 12:06:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKoL7-0000aK-44 for guix-devel@gnu.org; Tue, 13 Jun 2017 12:06:46 -0400 In-Reply-To: <20170613163243.16baca6d@scratchpost.org> (Danny Milosavljevic's message of "Tue, 13 Jun 2017 16:32:43 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org Hello Danny, Danny Milosavljevic skribis: > On Tue, 13 Jun 2017 10:06:16 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> The =E2=80=98delete-file=E2=80=99 was to avoid EADDRINUSE but I wonder i= f it=E2=80=99s 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. Yes, that makes sense, we should do that. >> What=E2=80=99s the difference between a =E2=80=9Cuser bus=E2=80=9D and a= =E2=80=9Csession bus=E2=80=9D? 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 p= er session. > > For example let's say you have a terminal server and log in as ludo on se= at1 and also as ludo on seat2, then you have two session buses and one user= bus.=20 > > Filesystem-based services usually run per-user because almost no one crea= tes extra directories for seats. Many programmers don't even think about i= t and so their services are per-user whether they want to or not. I see. Thanks for explaining, that makes a lot of sense to me! Ludo=E2=80=99.