It's nice the emacs-common includes an emacs.service file for systemd. Two
in fact,

/usr/share/emacs/30.2/etc/emacs.service
/usr/lib/systemd/user/emacs.service

The second of those is actually used when you go

$ systemctl --user start emacs.service

It works okay, except that if you enable it and have "lingering" set,
you'll get a no-graphics server even if you log into a desktop. Or if you
ssh in and then log into a desktop, the desktop will see the non-graphical
server. (Why is it possible to have a non-graphical server when the server
doesn't actually do any graphics, and can connect to multiple displays
using the env info passed to emacsclient? I dunno but apparently that's
really hard to fix.)

In any case, according to https://www.emacswiki.org/emacs/EmacsAsDaemon
that emacs.service file should include

[Unit]
After=graphical-session.target

This would make the server more likely to start in graphical mode.

Reply via email to