summaryrefslogtreecommitdiff
path: root/etc/emacs.service
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2016-11-13 15:46:31 -0800
committerGlenn Morris <rgm@gnu.org>2016-11-13 15:46:31 -0800
commit181bd848eb9662759f076b31a32f6588e9eb58b4 (patch)
tree0ca9d3a192264fe960028b77b8af9a3d886a5b6e /etc/emacs.service
parent9b3a853ab2430503bb1e5bae57fc35e2cd555e1a (diff)
downloademacs-181bd848eb9662759f076b31a32f6588e9eb58b4.tar.gz
Include a systemd user unit file. (Bug#16507)
* etc/emacs.service: New file. * doc/emacs/misc.texi (Emacs Server): Mention systemcl --user. * Makefile.in (libdir): New, set by configure. (systemdunitdir): New variable. (install-etc, uninstall): Handle the emacs.service file.
Diffstat (limited to 'etc/emacs.service')
-rw-r--r--etc/emacs.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/etc/emacs.service b/etc/emacs.service
new file mode 100644
index 00000000000..92cdeb5cf49
--- /dev/null
+++ b/etc/emacs.service
@@ -0,0 +1,17 @@
+## If your Emacs is installed in a non-standard location, you may need
+## to copy this file to a standard directory, eg ~/.config/systemd/user/ .
+## If you install this file by hand, change the "Exec" lines below
+## to use absolute file names for the executables.
+[Unit]
+Description=Emacs text editor
+Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
+
+[Service]
+Type=forking
+ExecStart=emacs --daemon
+ExecStop=emacsclient --eval "(kill-emacs)"
+Environment=SSH_AUTH_SOCK=%t/keyring/ssh
+Restart=on-failure
+
+[Install]
+WantedBy=default.target