help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Starting emacs as a daemon


From: Tobias Geerinckx-Rice
Subject: Re: Starting emacs as a daemon
Date: Wed, 05 Jun 2019 16:58:59 +0200

Marlin,

Marlin wrote:
Hi! I'm currently running the guix system, and would like to start
the emacs daemon/server at boot. How can i do this? Not used to
shepherd yet.

Unless you mean ‘at boot’ literally, this is best handled ‘at log-in’ through a separate (user) instance of El Shep. Unfortunately, this mode isn't currently integrated with Guix System and still underdocumented.

Here's my set-up, which I thought I'd posted here before but can't find in the archives:

~ λ cat /home/nckx/.config/shepherd/services.scm
(define emacs
 (make <service>
   #:provides '(emacs)
   #:requires '()
   #:start (make-system-constructor "emacs --daemon")
   #:stop (make-system-destructor
           "emacsclient --eval \"(kill-emacs)\"")))
;; Other services (gpg, ibus, …) snipped.

~ λ cat /home/nckx/.config/shepherd/init.scm
(load "services.scm")
(register-services emacs gpg-agent ibus-daemon jackd)
(action 'shepherd 'daemonize) ; send shepherd into background
(for-each start (list emacs)) ; services to start automatically

~ λ grep -A1 shepherd /home/nckx/.xsession
shepherd # user service manager
exec dbus-launch --exit-with-session ssh-agent i3

Kind regards,

T G-R

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]