diff options
author | Christoph Ruegge <c.ruegge@math.uni-goettingen.de> | 2016-04-14 11:28:10 +0200 |
---|---|---|
committer | Christoph Ruegge <c.ruegge@math.uni-goettingen.de> | 2016-04-15 21:43:42 +0200 |
commit | f270af1acd52e01f76295def42302bb8535f9c58 (patch) | |
tree | 4698fd38bbd5ba094dcaa54d6c1f069a27b2098c /nixos | |
parent | e5d00a28dd77b1a42b6d1d1da3adeb83f7a47638 (diff) | |
download | nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar.gz nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar.bz2 nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar.lz nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar.xz nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.tar.zst nixpkgs-f270af1acd52e01f76295def42302bb8535f9c58.zip |
xsession: Update DBus activation environment
`dbus-launch` is executed early in the script, before desktop managers had a chance to setup the environment. If DBus activation is used, applications launched by this may therefore lack necessary environment variables. This patch sends the complete environment to DBus after launching the desktop manager.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/display-managers/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index be634fc259a..ff78964e553 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -126,6 +126,14 @@ let (*) echo "$0: Desktop manager '$desktopManager' not found.";; esac + ${optionalString cfg.startDbusSession '' + ${pkgs.glib}/bin/gdbus call --session \ + --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus \ + --method org.freedesktop.DBus.UpdateActivationEnvironment \ + "{$(env | ${pkgs.gnused}/bin/sed "s/'/\\\\'/g; s/\([^=]*\)=\(.*\)/'\1':'\2'/" \ + | ${pkgs.coreutils}/bin/paste -sd,)}" + ''} + test -n "$waitPID" && wait "$waitPID" exit 0 ''; |