Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not find banner #368

Open
wang1zhen opened this issue Apr 4, 2022 · 7 comments
Open

could not find banner #368

wang1zhen opened this issue Apr 4, 2022 · 7 comments
Labels

Comments

@wang1zhen
Copy link

Hi, I use emacs in server mode, and every time I initiate emacs, the following message is shown:

could not find banner ~/.emacs.d/logo.png, use default instead

however, the banner picture is correctly loaded.

Here is my dashboard configs:

(use-package dashboard
      :config
      (setq dashboard-startup-banner "~/.emacs.d/logo.png"
      (dashboard-setup-startup-hook)
      (when (< (length command-line-args) 2)
        (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))))

And I start emacs with emacsclient -c -a ""

@jcs090218
Copy link
Member

You posted an invalid config, you should have the ) in the end of line 3.

(use-package dashboard
  :config
  (setq dashboard-startup-banner "~/.emacs.d/logo.png")
  (dashboard-setup-startup-hook)
  (when (< (length command-line-args) 2)
    (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))))

Try having the dashboard-startup-banner in the :init scope and not config.

@wang1zhen
Copy link
Author

Thanks for reply, I have moved the banner into init part, and the message is still there:

(use-package dashboard
  :diminish
  :init
  (setq dashboard-startup-banner "~/.emacs.d/logo.png")
  :config
  (dashboard-setup-startup-hook)
  (when (< (length command-line-args) 2)
    (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))))

@rnllv
Copy link

rnllv commented Jun 10, 2022

I'm able to see a similar behaviour as @wang1zhen mentioned in my Debian system with Emacs 28.1.
On invoking the emacsclient, the default logo is displayed, and the Messages buffer has the "could not find banner" message.
But once the frame is resized/maximized, the specified logo is displayed.

@rnllv
Copy link

rnllv commented Jun 10, 2022

This is my config

  (use-package all-the-icons :ensure t) ;;Make sure all-the-icons package is installed
  ;;Ensure to run the command: all-the-icons-install-fonts
  (use-package dashboard
  :ensure t ;;install dashboard if not installed
  :init ;; tweak dashboard's configuration before loading it
  (setq dashboard-set-heading-icons t)
  (setq dashboard-set-file-icons t)
  (setq dashboard-banner-logo-title "My Way!")
  (setq dashboard-startup-banner "~/.emacs.d/myway.png")
  (setq dashboard-center-content nil)
  (setq dashboard-items '(
      (recents . 10)
      (agenda . 5)
      (bookmarks . 5)
      (registers . 5)
  ))
  :config
  (dashboard-setup-startup-hook)
  (dashboard-modify-heading-icons '(
    (recents. "file-text")
    (bookmarks . "book"))))
  ;;This is for client mode  
  (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))

@gmsvalente
Copy link

gmsvalente commented Jul 10, 2022

I'm having same issue here if I start with emacsclient. But if I start with emacs it works normally. Something with emacs daemon?

@gmsvalente
Copy link

gmsvalente commented Jul 11, 2022

As I suspected the problem is not with dashboard but is with how things are loaded using emacs --daemon. You can create an use-package init-dashboard and move (dashboard-setup-startup-hook) there to fix it:

(use-package dashboard
  :ensure t
  :init
  (setq dashboard-startup-banner figo-logo)
  (setq dashboard-set-heading-icons t)
  (setq dashboard-set-file-icons t)
  (setq dashboard-items '((recents . 15)))
  :config
  (dashboard-modify-heading-icons
   '((recents . "file-text"))))

(use-package init-dashboard
  :after 'dashboard
  :init
  (dashboard-setup-startup-hook))

@jcs090218
Copy link
Member

The issue is the --daemon since (display-graphic-p) will always return nil. My current suggestion is to use server-mode instead of --daemon.

Further discuss for improvement can see #388.

@jcs090218 jcs090218 added daemon and removed question labels Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants