|
@@ -1,12 +1,17 @@
|
|
|
[Unit]
|
|
|
-Description=Emacs: the extensible, self-documenting text editor
|
|
|
+Description=Emacs text editor (daemon)
|
|
|
+Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
|
|
+After=graphical.target
|
|
|
|
|
|
[Service]
|
|
|
Type=forking
|
|
|
-ExecStart=/usr/local/bin/emacs --daemon
|
|
|
-ExecStop=/usr/local/bin/emacsclient --eval "(kill-emacs)"
|
|
|
-Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
|
|
+ExecStart=/usr/bin/emacs --daemon
|
|
|
+ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
|
|
|
Restart=on-failure
|
|
|
|
|
|
+# Make sure it uses your session environment
|
|
|
+Environment=DISPLAY=:0
|
|
|
+Environment=XAUTHORITY=%h/.Xauthority
|
|
|
+
|
|
|
[Install]
|
|
|
-WantedBy=default.target
|
|
|
+WantedBy=graphical-session.target
|