Emacs background autostart sudo daemon

From 清冽之泉
Revision as of 11:14, 14 May 2025 by Mwroot (talk | contribs) (Created page with "<syntaxhighlight lang="bash"> sudo touch /etc/systemd/system/emacs.service sudo chmod 664 /etc/systemd/system/emacs.service </syntaxhighlight> <syntaxhighlight lang="bash"> [Unit] Description=Emacs: the extensible, self-documenting text editor [Service] Type=forking ExecStart=/usr/bin/emacs --daemon ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" Environment=SSH_AUTH_SOCK=%t/keyring/ssh Restart=always [Install] WantedBy=multi-user.target </syntaxhighlight> <syntaxh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
sudo touch /etc/systemd/system/emacs.service
sudo chmod 664 /etc/systemd/system/emacs.service
[Unit]
Description=Emacs: the extensible, self-documenting text editor
[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable emacs.service
sudo systemctl start emacs.service