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

display-managers: Import DBUS session bus address & Xauthority #30467

Merged
merged 1 commit into from Oct 17, 2017

Conversation

adisbladis
Copy link
Member

Motivation for this change

Systemd user session depending on these variables are broken.
I was making my own unit that uses notify-send from libnotify that didn't work as expected.

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
      - [ ] other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • 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.

@adisbladis adisbladis force-pushed the display-managers-session/sessionvars branch from 3bf4c2c to 4b7cbb5 Compare October 16, 2017 14:52
${config.systemd.package}/bin/systemctl --user import-environment XAUTHORITY

# Tell systemd about the dbus session bus address. This is required by user units using the session bus.
${config.systemd.package}/bin/systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS
Copy link
Member

Choose a reason for hiding this comment

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

The following should be possible according to man page:

${config.systemd.package}/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes it's possible but I wanted it on multiple lines for better clarity and commenting why every variable is necessary. I did merge DISPLAY and XAUTHORITY on the same line since they are very closely related.

Copy link
Member

Choose a reason for hiding this comment

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

less commands -> faster

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's more clear to have it on multiple lines but I'm OK with changing it to one.

@adisbladis adisbladis force-pushed the display-managers-session/sessionvars branch from 4b7cbb5 to 6d28edd Compare October 17, 2017 01:52
@adisbladis adisbladis force-pushed the display-managers-session/sessionvars branch from 6d28edd to 40f402c Compare October 17, 2017 02:06
@Mic92 Mic92 merged commit 9aa6337 into NixOS:master Oct 17, 2017
@Mic92
Copy link
Member

Mic92 commented Oct 17, 2017

Also in 17.09 now.

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

2 participants