reddit / emacs

wayland systemd

[deleted] · 2022-02-17 14:50
Hi, I use Debian 11 with KDE. So far, I was on KDE X11 and I ran the emacs daemon as a service (debian configures this for you ootb, so you simply need to enable it). However, I moved to a KDE wayland setup today, and I cannot launch the client after boot. I think it is launching before wayland can set things up (I have no idea what that means though...). `journalctl --user -u emacs.service | tail -n 10` gives me Feb 17 15:39:39 xxx emacs[1302]: Loaded /home/x/.emacs.d/config/settings.el Feb 17 15:39:40 xxx emacs[1302]: Turning on magit-auto-revert-mode... Feb 17 15:39:40 xxx emacs[1302]: Turning on magit-auto-revert-mode...done (0.330s, 90 buffers checked) Feb 17 15:39:40 xxx emacs[1302]: Starting Emacs daemon. Feb 17 15:39:41 xxx systemd[1282]: Started Emacs text editor. Feb 17 15:39:41 xxx emacs[1302]: Package cl is deprecated Feb 17 15:39:41 xxx systemd[1282]: emacs.service: Got notification message from PID 3258, but reception only permitted for main PID 1302 Feb 17 15:41:51 xxx emacs[1302]: No protocol specified Feb 17 15:45:53 xxx emacs[1302]: No protocol specified So I am guessing the daemon loads properly and then encounters some problems after the `Package cl is deprecated` message. If I try to run the client with `emacsclient -c` I get Waiting for Emacs... *ERROR*: Display :1 can’t be opened Which is very strange since `systemctl status --user emacs.service` shows that the service is indeed active. Any help/suggestions/comments? Cheers
ieure · 2022-02-17 16:06
Your Emacs doesn't support Wayland. You either need to build your own copy with pgtk enabled, or use Xwayland.
[deleted] · 2022-02-17 16:15
AHA. Thank you. May I ask how you were able to deduce this? Also, would you know if Debian repos have pgtk emacs? Perhaps emacs-nox?
db48x · 2022-02-17 18:37
The error message “Display :1 can’t be opened” indicates that it is trying to talk to an X server, which you don’t have running.
[deleted] · 2022-02-17 19:09
Gotcha, thanks!
ieure · 2022-02-17 20:23
> Also, would you know if Debian repos have pgtk emacs? They don't, which is why I said you need to build your own copy? > Perhaps emacs-nox? This is Emacs without any GUI support at all.
[deleted] · 2022-02-17 20:40
Thanks. Yeah in the end I just ended up (very reluctantly) going back to x11 KDE. The final straw was zoom, sadly indispensable for my work, not allowing screen-sharing in KDE wayland. It's quite sad as KDE wayland is absolutely fantastic after the last update. But the scales are still tipped in favour of x11 because of support from other software.
AblatedSprocket · 2022-02-19 15:22
I have zoom screensharing working on Sway. I haven't tried KDE, but I would assume it shouldn't be too bad to set up. I might try getting this going in a VM.
[deleted] · 2022-02-20 13:42
That sounds awesome. If you do succeed I'd be very interested in knowing how you did it!!