reddit / emacs

Emacs daemon does not start as graphically

cakartantyr · 2022-06-26 22:07
When I create a frame with `emacsclient -c` it creates a window but it is not graphical one. I mean I have this in my config; `(defun new-frame-setup (frame)` `(if (display-graphic-p frame)` `(message "window system")` `(message "not a window system")))` ​ `;; Run for already-existing frames` `(mapc 'new-frame-setup (frame-list))` `;; Run when a new frame is created` `(add-hook 'after-make-frame-functions 'new-frame-setup)` I got : `Due to a limitation in GTK 3, Emacs built with PGTK will simply exit when a` `display connection is closed. The problem is especially difficult to fix,` `such that Emacs on Wayland with multiple displays is unlikely ever to be able` `to survive disconnect` ​ It also affects my lsp icons , as shown in image. ​ Any solution ? Thx! https://preview.redd.it/sh4xfj42h1891.png?width=617&format=png&auto=webp&s=8cf75a6ae0269f439ba072dc555618a8542d7307
your_sweetpea · 2022-06-29 07:11
Do you have XWayland support in your window manager? If so, try starting the daemon process with `GDK_BACKEND=x11`. It sounds like as long as GTK is using the x11 backend (through XWayland), the error won't occur.
vgivanovic · 2022-10-16 17:01
For me, using the latest kernel (6.0.1-arch2-1) and the most recent X11 (X.Org version: 21.1.4), this simply causes `emacs` to exit. (`emacs --daemon` runs but still outputs the disconnect message, but exits as soon as `emacsclient` starts.)