all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gabriel Szasz <gszasz@redhat.com>
To: help-gnu-emacs@gnu.org
Subject: [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements
Date: Sat, 11 Nov 2017 18:05:17 +0100	[thread overview]
Message-ID: <d19381a3-7b83-49c3-a64c-5d6f17835552@redhat.com> (raw)

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



             reply	other threads:[~2017-11-11 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-11 17:05 Gabriel Szasz [this message]
2017-11-11 19:01 ` [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements Emanuel Berg
2017-11-11 19:20 ` Eli Zaretskii
2017-11-11 21:25   ` Gabriel Szasz
2017-11-12  5:29     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d19381a3-7b83-49c3-a64c-5d6f17835552@redhat.com \
    --to=gszasz@redhat.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.