The systemd
service file seems to need some modifications to work. From the link you provided, the --fg-daemon
option is only available for Emacs 26.1+, whereas version below should use --daemon
(was introduced in Emacs 23.1).
Further the Type=
should be adopted to forking, since emacs
is forking.
So the resulting systemd
unit should look like as follows.
user@host:~$ cat .config/systemd/user/emacs.service [Unit]Description=Emacs text editorDocumentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/[Service]Type=forkingExecStart=/usr/bin/emacs --daemonExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"Environment=SSH_AUTH_SOCK=%t/keyring/sshRestart=on-failure[Install]WantedBy=default.target
After you have applied your changes, do not forget to reload the configuration.
user@host:~$ systemctl daemon-reload --user
Then start the service as regular user.
user@host:~$ systemctl start --user emacs