From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sLn4FWQ/6GCbKAAAgWs5BA (envelope-from ) for ; Fri, 09 Jul 2021 14:21:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kJ+0EWQ/6GAydwAA1q6Kng (envelope-from ) for ; Fri, 09 Jul 2021 12:21:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6DC1823921 for ; Fri, 9 Jul 2021 14:21:55 +0200 (CEST) Received: from localhost ([::1]:38294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1pVx-00033i-JA for larch@yhetil.org; Fri, 09 Jul 2021 08:21:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1pVb-00032K-BT for help-guix@gnu.org; Fri, 09 Jul 2021 08:21:32 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:11146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1pVY-0001xu-4S for help-guix@gnu.org; Fri, 09 Jul 2021 08:21:30 -0400 Date: Fri, 09 Jul 2021 12:21:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail3; t=1625833277; bh=UtbxsxI5w3dM/LT3HXSv90DA7oBZID6udBfX8uWFzww=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=B/2tzlfA46fsVBUQAbby5LmfNkMN9QDoLtj1Dn6PqJuPz4Sqg68WCJbgXOHBFxU1L +bHQ4PR/riGUn3LkeCjX36CxXjTau8NzgM/LZUBcqw/l5eqbnD+zS865mRjxOOcq84 6NdvRN2d475L8yaGkyDpBIzXJ1Lp8vbqJPn22MFzBWLlTEFYf7NAWFYYWVs3kr/mCC gA1v0238I5ECB0GSde6gdaX0BbvnNXd/C3nPoxD+HfAPoRCzpZcKWU2KRuvZUFzHjY BTRGrlv4svqDHACK1i8NuALRefynCuZOa0OUmJk8lJpQ31d7SU6kBQu5tDuJahRS2d kgZ3itz/tXfug== To: excalamus@tutanota.com From: Ekaitz Zarraga Subject: Re: Auto-start service Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.133; envelope-from=ekaitz@elenq.tech; helo=mail-40133.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Ekaitz Zarraga Cc: Help Guix Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625833316; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UtbxsxI5w3dM/LT3HXSv90DA7oBZID6udBfX8uWFzww=; b=RJRogMXlOFGR037KqH9a4HEL8OgEOpu3oS+I4qj4v1v5mWyeD6AfM6gfObqfA+P73MmblS 0zGhTvbLuKPKaFykuqMvR5TgDFD0HUNYFcQKQ9iH1BnK7L6PrvQirFV/BBJWuvupe64HxW 6t+gajOkUizOGIgABKJopI1sq9BCuiyJQ14d4skJg/lnM5/9tBttcr35yYYzbbosCXznr3 OZLRQPDy2JtApZMxF2ZcCn82CCe8FJUn6I+7sqTqm2yUhBpKYQqVTzazCOFnRGjCWGF7cd kKecz4vMv3P0/AYRbnuUTiA3dNq5qMb2V+4jX+jqUBgFdsWzOTa0C29WWCXF2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625833316; a=rsa-sha256; cv=none; b=s/6iJuBCJna21ja2DsvFCvxUOEuki3GypRask0ERrMCJYMlf4H8tSyexREPDyC8lI3MD1Z aojhYoFkctnYtgEhlj0eDmA7GuZBvi8vaA2gCol7jUQW6CVWscXGftjTn+8SlVyuGW3s7S V7hrNih969x6oZszqVcZF0vK+RQ0JUt3hlsj8TlHo6IVNyWx4+ili9xzwxufD4lUIA9IvX jApRdML4Divp8ZuoTDriVctum/DXEBMS/bPDo1U0HkpdQU+sfHdQNL5PuddiFNyDlNAly3 C86+MA8r100sNBTeLaXvK+fPC/SK2Pn7CZv/hI+7FLIf+2h7j1aMP9nhQP3uaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=protonmail3 header.b="B/2tzlfA"; dmarc=pass (policy=none) header.from=elenq.tech; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=protonmail3 header.b="B/2tzlfA"; dmarc=pass (policy=none) header.from=elenq.tech; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 6DC1823921 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9xfno7Ur8G1A =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, July 9th, 2021 at 12:28 AM, excalamus--- via = wrote: > I'm setting up the Emacs daemon following a thread on the mailing list:= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 https://lists.gnu.org/archive/html/he= lp-guix/2019-11/msg00148.html. I have services.scm and init.scm defined.= =C2=A0 I can call `shepherd -c ~/.config/shepherd/init.scm` and the service= starts.=C2=A0 I can kill the terminal and connect a client with `emacsclie= nt -c`.=C2=A0 Trouble is, I can't figure out how to start the service on bo= ot. > > The config files I'm using are: > > ;; services.scm > > (define emacsd > > =C2=A0 (make > > #:provides '(emacsd) > > =C2=A0=C2=A0=C2=A0 #:start (make-system-constructor "emacs --daemon") > > =C2=A0=C2=A0=C2=A0 #:stop (make-system-destructor "emacsclient --eval \"(= kill-emacs)\""))) > > ;; init.scm > > ;;; Shepherd User Services > > (load "/home/ahab/.config/shepherd/services.scm") > > (register-services > > =C2=A0emacsd) > > ;; Send shepherd into the background. > > (action 'shepherd 'daemonize) > > ;; Services to start when shepherd starts: > > (for-each start '(emacsd)) > > Based on what (shepherd) Jump Start paragraph 3 says, I'm confused about = why Shepard doesn't find the config files.=C2=A0 Is it because Shepherd sta= rts as superuser on boot? > > Meanwhile, I was advised to define a service in my config.=C2=A0 I'm in t= he process of reading the documentation (really, figuring out how to set Ge= iser up to read the documentation) so that I can understand the relevant pa= rts.=C2=A0 Is the config the generally recommended approach for Guix SD ver= sus the $HOME/.config/shepherd directory? > > Surely someone else has set up an Emacs daemon service?=C2=A0 The linked = thread mentioned this being a good idea for a cookbook recipe.=C2=A0 I'd be= happy to contribute to that as I'm confident I'm not alone in wanting an E= macs daemon service defined. There's a blog post in Guix's blog about this configuration: https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/ I remember to have followed that and I have it working. I had to activate t= he user-level Shepherd by hand in any file that is executed when the system= is started. In my case I have it in my i3 config. You can put it in .xsess= ion like the thread you shared suggests. Hope this helps. Ekaitz