From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gabriel Szasz Newsgroups: gmane.emacs.help Subject: [Emacs 25.3.1] Running emacs daemon via systemd does not load GUI elements Date: Sat, 11 Nov 2017 18:05:17 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1510421132 12143 195.159.176.226 (11 Nov 2017 17:25:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Nov 2017 17:25:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 11 18:25:27 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDZX4-0002v4-To for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 18:25:27 +0100 Original-Received: from localhost ([::1]:46649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDZXC-0002dM-CH for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Nov 2017 12:25:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDZDi-0008Fd-Kx for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 12:05:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDZDe-0000iO-LH for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 12:05:26 -0500 Original-Received: from mail-wr0-f182.google.com ([209.85.128.182]:56954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDZDe-0000hz-4v for help-gnu-emacs@gnu.org; Sat, 11 Nov 2017 12:05:22 -0500 Original-Received: by mail-wr0-f182.google.com with SMTP id q66so10997826wrb.13 for ; Sat, 11 Nov 2017 09:05:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Q1b1MeK0wdh/a/Y7kW+lzH+zHB3H1IVG49aeNf257fY=; b=Ji/twdPveW3BSkf/+AKcKJcUCMvWRc6xr1oP3UkAcnrYgZ+IIHq1LjUkt9sPiSJ9gZ IYlMwrQn65uM1LLOQZPZsm3Tqym7zTuycLu0OkXDZDz2ZDjJUPFI9xzLMJiLrMnNIMeV PQjChWRXTOdOBI6KJzbA987r7Qvr/qjPYZcKLoQqUOO/EC1EwvJn0rPbw6ViAaLi1aCc 7Yfn2zD7XeqRGvJx/ICP56/Ek0O4MKhsdcnNCIKUf6O4y+/wCxjmIpQRbeQt0Cw7UXJd DBazQUNHifHLppQBOFNoFREfmIMR+vZne0tkkD+tYz/mYvrVLoXZlO3u4iqPx7Xm3at5 ikyg== X-Gm-Message-State: AJaThX5U2nh/xMd5WmjvE5MWfXoYf1RnBygmkpufMcOOAaQXfIlIFxBV PkO4/Tac9vd4gMut2lpv2cF36BK7Pok= X-Google-Smtp-Source: AGs4zMZLAFuKjz3fcpoQK6KMoIQM3cqVzUABdGond2EWz5Gmb0061Ca6r5RfMhkXg7KbwoouF7jcEA== X-Received: by 10.223.201.5 with SMTP id m5mr3524516wrh.68.1510419919586; Sat, 11 Nov 2017 09:05:19 -0800 (PST) Original-Received: from nova.localdomain (88.61.broadband6.iol.cz. [88.101.61.88]) by smtp.gmail.com with ESMTPSA id y99sm5950250wmh.0.2017.11.11.09.05.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 09:05:18 -0800 (PST) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.182 X-Mailman-Approved-At: Sat, 11 Nov 2017 12:25:03 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114857 Archived-At: 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