Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915830 - app-editors/emacs-29: emacsclient opens as text-only if the daemon is started before the X session (e.g. when emacs-29.service is enabled)
Summary: app-editors/emacs-29: emacsclient opens as text-only if the daemon is started...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-15 19:18 UTC by Acid Bong
Modified: 2024-06-03 10:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info emacs (emerge-info-emacs,7.71 KB, text/plain)
2023-10-15 19:20 UTC, Acid Bong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Acid Bong 2023-10-15 19:18:13 UTC
What the summary says, most is described below.

Reproducible: Always

Steps to Reproduce:
1. I enable the systemd user service, thus the daemon starts right on login,
2. slightly later starts my X session (I have `exec sx` in my ~/.zprofile),
3. I run `emacsclient -c`
Actual Results:  
There's no new frame -- the client opens with TUI. To use GUI, I have to start the daemon _after_ the X has initiated.

Expected Results:  
Old behaviour (v28): Emacsclient launches with GUI instead.

Possible solution (inspired by NixOS, https://github.com/NixOS/nixpkgs/pull/246008 and https://github.com/nix-community/home-manager/blob/master/modules/services/emacs.nix#L117): when useflags X, pGTK and/or GTK are enabled, the target in the systemd service is changed from `default.target` to `graphical-session.target`.
Comment 1 Acid Bong 2023-10-15 19:20:42 UTC
Created attachment 872941 [details]
emerge --info emacs
Comment 2 Ulrich Müller gentoo-dev 2023-10-17 21:38:45 UTC
We install the upstream emacs.service file from the etc/ directory in the tarball, with only small distro-specific changes of binary paths.

I suggest that you report the problem upstream (unless NixOS already has?). If some fix gets accepted, we can then backport it to slot 29.
Comment 3 Ulrich Müller gentoo-dev 2023-10-17 21:44:54 UTC
Reading the NixOS PR, they weren't really eager about merging it. Especially:
https://github.com/NixOS/nixpkgs/pull/246008#issuecomment-1675754892
"I must say that I'm not a great fan of this change either. It feels to me like this is an upstream bug?"
Comment 4 Ulrich Müller gentoo-dev 2024-02-21 13:11:57 UTC
(In reply to Ulrich Müller from comment #2)
> I suggest that you report the problem upstream (unless NixOS already has?).
> If some fix gets accepted, we can then backport it to slot 29.

Have you reported the problem upstream?