all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements
@ 2017-11-11 17:05 Gabriel Szasz
  2017-11-11 19:01 ` Emanuel Berg
  2017-11-11 19:20 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriel Szasz @ 2017-11-11 17:05 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-12  5:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-11 17:05 [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements Gabriel Szasz
2017-11-11 19:01 ` Emanuel Berg
2017-11-11 19:20 ` Eli Zaretskii
2017-11-11 21:25   ` Gabriel Szasz
2017-11-12  5:29     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.