[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elemen
From: |
Gabriel Szasz |
Subject: |
[Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements |
Date: |
Sat, 11 Nov 2017 18:05:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Hi folks,
I'm executing emacs daemon via systemd using the following unit file:
[Unit]
Description=Emacs: the extensible, self-documenting text editor
Documentation=man:emacs(1) info:Emacs
[Service]
Type=forking
ExecStart=/usr/local/bin/emacs --daemon
ExecStop=/usr/local/bin/emacsclient --eval "(progn (setq kill-emacs-hook
'nil) (kill-emacs))"
Environment=DISPLAY=:%i
TimeoutStartSec=0
Restart=on-failure
User=%i
[Install]
WantedBy=default.target
Everything works flawlessly, but I still cannot figure out how to
convince my emacsclient to display graphic elements such as the raised
buttons in Custom and image icons in Speedbar. I understand that emacs
daemon has no way to predict whether I am going to use graphical
environment so it fallbacks to the safe text-only settings. What I do
not understand is why adding following code into my ~/.emacs.d/init.el
file does not solve the problem.
(when (daemonp)
(add-hook 'after-make-frame-functions
'(lambda (frame) (when (display-graphic-p frame)
(setq custom-raised-buttons t)
(setq speedbar-use-images t)))))
Both custom-raised-buttons and speedbar-use-images are indeed correctly
set to "t" when "emacsclient -c" creates a frame, but graphic elements
are not rendered anyway.
Cheers,
Gabriel Szasz
- [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements,
Gabriel Szasz <=