Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: use graphical-session.target for GUI services #5785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Scrumplex
Copy link
Member

@Scrumplex Scrumplex commented Aug 31, 2024

Description

As per systemd.special(7)[0] graphical-session-pre.target is strictly
for units that set up things for a graphical session. Most notably,
these are usually started before the compositor/session is actually
ready.

While Home Manager's current implementation of graphical-session.target
allows these units to work regardless of what systemd.special(7)
specifies, other setups like ones with uwsm[1] do not allow these units
to start properly.

Signed-off-by: Sefa Eyeoglu [email protected]

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@Scrumplex
Copy link
Member Author

Marking this as a draft, as there are many more occurrences of graphical-session-pre.target

@Scrumplex Scrumplex force-pushed the treewide/graphical-session-shenanigans branch from 4be05b0 to a0c04bd Compare September 1, 2024 10:13
@Scrumplex Scrumplex force-pushed the treewide/graphical-session-shenanigans branch from a0c04bd to 1215a00 Compare October 27, 2024 11:36
@Scrumplex Scrumplex marked this pull request as ready for review October 27, 2024 11:36
@Scrumplex Scrumplex marked this pull request as draft October 27, 2024 20:22
@Scrumplex Scrumplex force-pushed the treewide/graphical-session-shenanigans branch 2 times, most recently from 615f913 to 00433e4 Compare October 27, 2024 20:53
@Scrumplex
Copy link
Member Author

I have significantly expanded the scope of this PR to actually do a treewide change.

  • Anything that needs a DISPLAY or WAYLAND_DISPLAY to work should run after graphical-session.target
  • Exception: X11 tools that set up the X11 session (i.e. setting keymap) should run before reaching graphical-session.target

In case you think that a module was moved to the later target unreasonably, feel free to start a review!

@Scrumplex Scrumplex force-pushed the treewide/graphical-session-shenanigans branch from 00433e4 to 6a9f87b Compare October 29, 2024 12:18
@Scrumplex Scrumplex marked this pull request as ready for review October 29, 2024 18:33
@CnTeng CnTeng mentioned this pull request Dec 24, 2024
2 tasks
Copy link

@Redhawk18 Redhawk18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #6219

@Redhawk18
Copy link

@Scrumplex Are you still willing to work on this, I know it's been a while.

As per systemd.special(7)[0] graphical-session-pre.target is strictly
for units that set up things for a graphical session. Most notably,
these are usually started *before* the compositor/session is actually
ready.

While Home Manager's current implementation of graphical-session.target
allows these units to work regardless of what systemd.special(7)
specifies, other setups like ones with uwsm[1] do not allow these units
to start properly.

[0]: https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#graphical-session-pre.target
[1]: https://github.com/Vladimir-csp/uwsm

Signed-off-by: Sefa Eyeoglu <[email protected]>
@Scrumplex Scrumplex force-pushed the treewide/graphical-session-shenanigans branch from 6a9f87b to 823cc54 Compare January 11, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants