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

unclutter: Fix default value of $DISPLAY #24601

Merged
merged 1 commit into from Apr 19, 2017
Merged

unclutter: Fix default value of $DISPLAY #24601

merged 1 commit into from Apr 19, 2017

Conversation

pbogdan
Copy link
Member

@pbogdan pbogdan commented Apr 3, 2017

Motivation for this change

same as #17746

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@joachifm
Copy link
Contributor

joachifm commented Apr 6, 2017

See also #23834

@bennofs
Copy link
Contributor

bennofs commented Apr 19, 2017

@joachifm what do you think is wrong with this solution?

@joachifm
Copy link
Contributor

It doesn't address the actual problem, as I see it.

@bennofs
Copy link
Contributor

bennofs commented Apr 19, 2017

@joachifm what is the actual problem? that display is null?

@joachifm
Copy link
Contributor

User services that rely on graphical.target are fundamentally broken, the dependency makes no sense. If it worked properly, DISPLAY would be set at the time the service is activated.

@joachifm
Copy link
Contributor

@bennofs I think #17858 (comment) is the proper solution.

@bennofs
Copy link
Contributor

bennofs commented Apr 19, 2017

@joachifm hmm. but you'd also have to import-env DISPLAY into the systemd user instance, right (as the systemd user instance does not expose DISPLAY to services by default afaik)? Also, isn't there only one systemd user instance for all sessions if a single user? What happens if a user is logged into multiple graphical terminals?

Perhaps we should merge this in the mean time, and remove it again when we figure out a proper solution. I don't think that this will hurt too much, no?

@joachifm
Copy link
Contributor

My primary objection is about correctness, not pragmatics, so please go ahead. I don't use these servies, so have no real stake in them.

I'll just note that I think graphical-session is the real fix for user services that are part of a graphical session &c. Hard-coding DISPLAY to 0 only works because it's what DISPLAY tends to be in practice, but that's incredibly fragile. IMO graphical user services are currently completely shoehorned in and should have been implemented by adding stuff to xinitrc/xsession to begin with ... But here we are :)

@joachifm
Copy link
Contributor

To clarify, the main problem is using dependencies and ordering in these cases, as they are inherently nonsensical and so require kludges like this. You could for example activate the unit manually in xinitrc, to make use of systemd for supervision & whatnot, I see nothing wrong with that.

@bennofs
Copy link
Contributor

bennofs commented Apr 19, 2017

Ok then I will merge this for now. We already have an issue for improving the general situation.

@bennofs bennofs merged commit 1496565 into NixOS:master Apr 19, 2017
@pbogdan pbogdan deleted the unclutter branch December 3, 2019 17:05
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.

None yet

3 participants