From mboxrd@z Thu Jan 1 00:00:00 1970 From: nly Subject: Re: User-Level services Date: Sat, 09 Feb 2019 17:34:08 +0000 Message-ID: References: <1549206990.3483392.1649820064.4E571E9E@webmail.messagingengine.com> <87k1i973g9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----6BVHB7W5ARC5R8HTJ0PORCG1PXBEGJ" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsWWR-00036V-3d for help-guix@gnu.org; Sat, 09 Feb 2019 12:34:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsWWO-0001bR-NH for help-guix@gnu.org; Sat, 09 Feb 2019 12:34:34 -0500 Received: from knopi.disroot.org ([178.21.23.139]:38894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsWWI-0001TN-K9 for help-guix@gnu.org; Sat, 09 Feb 2019 12:34:28 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id EB93227D99 for ; Sat, 9 Feb 2019 18:34:16 +0100 (CET) Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kz7y7PkEk2Yc for ; Sat, 9 Feb 2019 18:34:15 +0100 (CET) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org ------6BVHB7W5ARC5R8HTJ0PORCG1PXBEGJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >I would love to see something closer to an event triggered service than fo= rking once and forgetting=2E You can use shepherd and herd commands (without sudo)=2E For example: $ shepherd [-c config=2Escm] $ herd status Then configure your `config=2Escm` as you like=2E As a default shepherd wi= ll use `$XDG_CONFIG_HOME/shepherd/init=2Escm`, and if the variable is not s= et then `$HOME/=2Econfig/shepherd/init=2Escm`=2E >It would be awesome if the Guix System could provide a way to configure t= hese declaratively, too=2E That can be done by generating a text-file in store containing the desired= config then symbolic linking it to `$HOME=2Econfig/shepherd/init=2Escm`=2E= This all can be done using guix daemon(declaratively)=2E Though I am not sure how you can 'autostart' the service at boot time and = declaratively? Cheers amar On February 9, 2019 1:14:28 PM UTC, John Soo wrote: >Thanks Chris, > >I wasn=E2=80=99t aware of the autostart spec so I took a look=2E Thanks! = After >reading it I=E2=80=99m not sure it provides the retry support (among othe= r >things) that a user service might provide=2E I would love to see >something closer to an event triggered service than forking once and >forgetting=2E > >It would be awesome if the Guix System could provide a way to configure >these declaratively, too=2E I am not saying shepherd would be the >mechanism, necessarily either=2E I just think people - myself included - >will probably want this feature=2E=20 > >Thanks again, > >John > >> On Feb 9, 2019, at 12:48 AM, Chris Marusich >wrote: >>=20 >> John Soo writes: >>=20 >>> Hi Reza, >>>=20 >>> I=E2=80=99m not sure this is possible right now=2E I recently tried ma= king a >>> service which would need the x display variable and I got stuck >right >>> about when I needed the logged in user=2E I would love to see it >though=2E >>>=20 >>> Does anyone else know? >>=20 >> I don't think there's an easy solution that's integrated into the >Guix >> System (formerly known as GuixSD)=2E Instead, the best approach is to >use >> any of "the usual" methods for starting up user processes=2E For >example, >> you might use the ~/=2Econfig/autostart convention: >>=20 >> https://freedesktop=2Eorg/wiki/Specifications/autostart-spec/ >>=20 >> --=20 >> Chris --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E ------6BVHB7W5ARC5R8HTJ0PORCG1PXBEGJ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable >I would love to see something closer to an eve= nt triggered service than forking once and forgetting=2E
You can use she= pherd and herd commands (without sudo)=2E
For example:
$ shepherd [-c= config=2Escm]
$ herd status

Then configure your `config=2Escm` a= s you like=2E As a default shepherd will use `$XDG_CONFIG_HOME/shepherd/ini= t=2Escm`, and if the variable is not set then `$HOME/=2Econfig/shepherd/ini= t=2Escm`=2E

>It would be awesome if the Guix System could provide= a way to configure these declaratively, too=2E
That can be done by gene= rating a text-file in store containing the desired config then symbolic lin= king it to `$HOME=2Econfig/shepherd/init=2Escm`=2E This all can be done usi= ng guix daemon(declaratively)=2E

Though I am not sure how you can 'a= utostart' the service at boot time and declaratively?

Cheers
amar=

On February 9, 2019 1:14:28 PM UTC, John= Soo <jsoo1@asu=2Eedu> wrote:
Thanks Chris,

I wasn=E2=80=99t aware of the a= utostart spec so I took a look=2E Thanks! After reading it I=E2=80=99m not = sure it provides the retry support (among other things) that a user service= might provide=2E I would love to see something closer to an event triggere= d service than forking once and forgetting=2E

It would be awesome if= the Guix System could provide a way to configure these declaratively, too= =2E I am not saying shepherd would be the mechanism, necessarily either=2E = I just think people - myself included - will probably want this feature=2E =

Thanks again,

John

On Feb 9, 2019, at 12:48 AM, Chris Marusich <cmmarusich@g= mail=2Ecom> wrote:

John Soo <jsoo1@asu=2Eedu> writes:
Hi Reza,

I=E2=80= =99m not sure this is possible right now=2E I recently tried making a
se= rvice which would need the x display variable and I got stuck right
abou= t when I needed the logged in user=2E I would love to see it though=2E
<= br>Does anyone else know?

I don't think there's an easy= solution that's integrated into the Guix
System (formerly known as Guix= SD)=2E Instead, the best approach is to use
any of "the usual" methods = for starting up user processes=2E For example,
you might use the ~/=2Ec= onfig/autostart convention:

https://freedesktop=2Eorg/wiki/Specificat= ions/autostart-spec/

--
Chris


--
Sent from my Android device with K-9 Mail=2E Plea= se excuse my brevity=2E ------6BVHB7W5ARC5R8HTJ0PORCG1PXBEGJ--