From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32108 invoked from network); 17 Oct 2022 20:52:37 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2022 20:52:37 -0000 Received: (qmail 3592 invoked by uid 89); 17 Oct 2022 20:53:02 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 3585 invoked from network); 17 Oct 2022 20:53:02 -0000 X-Virus-Scanned: SPAM Filter at disroot.org Content-Type: text/plain; charset=UTF-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1666039952; bh=eDtIsg/56Lhcppixhr3I1Fd9Xs7Yx4uaxgKEaBcEGDg=; h=Subject:From:To:Date:In-Reply-To:References; b=DDJOfpRf4zM+DvZD3iab61Q6PZAT66ZInp9r00N11rogSNqqXzRn37VEPxDYBVfYn pkXbOeesFYGqAc8dZ3ACSLD0mJC0LhRCw2KvKRwB35r5BVgfqDsg6NoHoDuWo52nmT KMigcXB46Sy4N9qnTGIJOfo+wD5U+g4SDQ/Kl2FGYcZKntrWngw+VC/3KAXiAsB8uZ b1VazMSpVruERsp0IhmdOwX2MSSj/kKFtG0EfhVSaWn9scFGDLqLq993c70AaxUH61 4SGHDP60pGIOtILoWNezZR129uZEZd7LWNW87t+0NE5loAF6wY+0vhAw554xXWXSrU KvMC7nXRswAlg== Subject: Re: s6-rc as user service manager From: "Peter Shkenev" To: "Ihor Antonov" , Date: Mon, 17 Oct 2022 23:42:02 +0300 In-Reply-To: <20221017175034.jmwoagcwrd6k4j2r@localhost> References: <20221017175034.jmwoagcwrd6k4j2r@localhost> Message-ID: <8F72C59D-7F58-4084-94B4-CBEF75421327@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-K9mail-Identity: !l=2419&o=0&qs=PREFIX&f=TEXT&m=%23%3AYjkyNDcxYjQtMjhk Ni00YjRkLWJiYjYtYmE5MGQzYWZiZDU1%3ANg%3D%3D%3AMw%3D%3D&p=1828&q=NONE Hello, On Mon Oct 17, 2022 at 8:50 PM MSK, Ihor Antonov wrote: > Kicking off another thread because it is slightly different from UX > related questions. > > I am trying to get s6-rc set up as a user service manager (similar how > systemd allows user's to manage their own services with systemctl --user > start bla). > This is useful for example for starting user's dbus, pipewire, > xdg-desktop-portal services, and other stuff that is strictly user > related. > > This usecase is geared towards a desktop/laptop. (There were numerous rants of user services by Laurent Bercot and Colin Booth on IRC, and I'm going to use those rants as a source). Firstly, let's try to define "user services" without "bla". There are three very different options: 1) User services are services running as a given user and started at a boot time This option is a trivial one with s6. 2) User services are services defined by users and running supervised when the user wants it. You can implement this with s6-usertree-maker [1], which would provide you with a supervision tree rooted in a system one which can be managed by user. User will have its own scandir and they can use all commands provided by s6/s6-rc on their scandir. 3) User services are services that are started when user logs in. I guess this is what you had in mind when you was typing your letter. This is the hardest one and badly defined one. There are a lot of questions: - What does "user logs in" mean? Do we want services to be started when user logs in on the console or at seat? Sshd? Serial line? - When do we stop services? "When the user logs out"? And if the user has both an X session and a shell in a console? We need to wait for the last connection to drop? How would we get this information? One needs some time to shut down the supervision tree. One can remember how did systemd killed all user processes on the logout. - Moreover, some services (pipewire, for example) are supposed to be run in certain cases, e.g. a graphical session. - There may be a lot of questions I don't know about. > - Minor: a test utility for svscan dir would be nice > - Minor: a test utility for live dir would be nice If you use s6-rc, those are the same directories, filled by s6-rc-init and changed by s6-rc-update. So the test would actually test those utilities, I guess. [1] https://skarnet.org/software/s6/s6-usertree-maker.html --- Best regards, Peter