Bugzilla – Bug 1179854
Systemd user service does not allow usage of dispal :0
Last modified: 2022-01-13 08:35:32 UTC
Created attachment 844327 [details] Systemd service unit for emacs. Hi, I am trying to enable emacs --daemon as a user service. When I am logged in and start the service I can connect to the emacs daemon via `emacsclient -c`. After I reboot the machine and login again the `emacsclient -c` command throws following error. Waiting for Emacs... *ERROR*: Display :0 can’t be opened This stops if I disable access control via `xhost +`. I tried with different display managers `gdm` and `sddm` both don't work. The expected result should be a emacs window opening. To reproduce. use tumbleweed snapshot 20201207 put attached `emacs.service` file into `~/.conf/systemd/user/emacs.service` enable systemd service `systemctl --user daemon-reload && systemctl enable --user emacs` reboot, login and run `emacslient -c`
(In reply to Georg Grauberger from comment #0) > > This stops if I disable access control via `xhost +`. Never use xhost for this ... the started emacs daemon does not know about the XAUTHORITY of the DISPLAY. It is up on you to set this. *** This bug has been marked as a duplicate of bug 1174534 ***