[systemd] Make emacs service work
This commit is contained in:
10
gnome/.local/share/applications/emacsclient.desktop
Normal file
10
gnome/.local/share/applications/emacsclient.desktop
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Emacs Client
|
||||||
|
GenericName=Text Editor
|
||||||
|
Comment=Open a new Emacs GUI frame via emacsclient
|
||||||
|
Exec=emacsclient -c -a "" %F
|
||||||
|
Icon=emacs
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;TextEditor;
|
||||||
|
StartupWMClass=Emacs
|
||||||
@ -1,12 +1,17 @@
|
|||||||
[Unit]
|
[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]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/local/bin/emacs --daemon
|
ExecStart=/usr/bin/emacs --daemon
|
||||||
ExecStop=/usr/local/bin/emacsclient --eval "(kill-emacs)"
|
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
|
||||||
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
# Make sure it uses your session environment
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
Environment=XAUTHORITY=%h/.Xauthority
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=graphical-session.target
|
||||||
|
|||||||
Reference in New Issue
Block a user