dbus-update-activation-environment - update environment used for D-Bus session
[--systemd] [--verbose] --all | VAR... | VAR=VAL...
updates the list of environment
variables used by dbus-daemon --session
when it activates session
services without using systemd
With the --systemd
option, if an instance of systemd --user
available on D-Bus, it also updates the list of environment variables used by
when it activates user services, including D-Bus session
services for which dbus-daemon
has been configured to delegate
activation to systemd
. This is very similar to the
command provided by systemctl
Variables that are special to dbus-daemon
may be set,
but their values will be overridden when a service is started. For instance,
it is not useful to add DBUS_SESSION_BUS_ADDRESS
's activation environment, although it might still be useful
to add it to systemd
's activation environment.
Set all environment variables present in the
environment used by dbus-update-activation-environment.
Set environment variables for systemd user
services as well as for traditional D-Bus session services.
Output messages to standard error explaining
what dbus-update-activation-environment is doing.
If VAR is present in the environment of
dbus-update-activation-environment, set it to the same value for D-Bus
services. Its value must be UTF-8 (if not, it is skipped with a warning). If
VAR is not present in the environment, this argument is silently
Set VAR to VAL, which must be
is primarily designed to be used in
Linux distributions' X11 session startup scripts, in conjunction with the
"user bus" design.
To propagate DISPLAY
, and propagate DBUS_SESSION_BUS_ADDRESS
dbus-update-activation-environment --systemd \
DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
To propagate all environment variables except XDG_SEAT
) for compatibility with legacy X11 session startup
# in a subshell so the variables remain set in the
# parent script
dbus-update-activation-environment --systemd --all
exits with status 0 on success,
EX_USAGE (64) on invalid command-line options, EX_OSERR (71) if unable to
connect to the session bus, or EX_UNAVAILABLE (69) if unable to set the
environment variables. Other nonzero exit codes might be added in future
are used to find the address of the session bus.
does not provide a way to unset environment variables after
they have been set (although systemd
does not offer this functionality
POSIX does not specify the encoding of non-ASCII environment variable names or
values and allows them to contain any non-zero byte, but neither
supports environment variables with
non-UTF-8 names or values. Accordingly,
assumes that any name or value that
appears to be valid UTF-8 is intended to be UTF-8, and ignores other names or
values with a warning.
Please send bug reports to the D-Bus bug tracker or mailing list. See
(1), the import-environment
Copyright © 2015 Collabora Ltd.
This man page is distributed under the same terms as
dbus-update-activation-environment (MIT/X11). There is NO WARRANTY, to the
extent permitted by law.