forked from mirrors/nixpkgs
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.
This commit is contained in:
parent
e5d00a28dd
commit
f270af1acd
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue