Bug 1179854 - Systemd user service does not allow usage of dispal :0
Summary: Systemd user service does not allow usage of dispal :0
Status: RESOLVED DUPLICATE of bug 1174534
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: 64bit openSUSE Tumbleweed
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-09 17:15 UTC by Georg Grauberger
Modified: 2022-01-13 08:35 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Systemd service unit for emacs. (312 bytes, text/x-dbus-service)
2020-12-09 17:15 UTC, Georg Grauberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Grauberger 2020-12-09 17:15:50 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`
Comment 1 Dr. Werner Fink 2021-01-12 09:15:52 UTC
(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 ***