The actual problem here is not caused by dbus startup issues. /usr/share/upstart/sessions/dbus.conf calls 'initctl set-env -g DBUS_SESSION_BUS_ADDRESS' on startup, but even after login if I call 'initctl list-env -g', this variable is missing. If I call 'initctl list-env', it's present - possibly inherited from the dbus job's environment rather from the global environment, since gnome-session is 'start on started dbus [...]'.
Creating a test job, ~/.config/upstart/env-test.conf, that does the following:
pre-start script
initctl set-env --global FOO=bar
end script
And starting this job with 'start env-test', the variable then shows up correctly in 'initctl list-env -g'.
I don't yet know why the variable exported by dbus is missing, but I can confirm that this is a common problem across all the variables being set in /usr/share/upstart/sessions/*.conf; GPG_AGENT_INFO, DBUS_SESSION_BUS_ADDRESS, SSH_AUTH_*, UBUNTU_MENUPROXY are all missing from the global env. GTK_MODULES is there, but presumably arrives by other means.
The actual problem here is not caused by dbus startup issues. /usr/share/ upstart/ sessions/ dbus.conf calls 'initctl set-env -g DBUS_SESSION_ BUS_ADDRESS' on startup, but even after login if I call 'initctl list-env -g', this variable is missing. If I call 'initctl list-env', it's present - possibly inherited from the dbus job's environment rather from the global environment, since gnome-session is 'start on started dbus [...]'.
Creating a test job, ~/.config/ upstart/ env-test. conf, that does the following:
pre-start script
initctl set-env --global FOO=bar
end script
And starting this job with 'start env-test', the variable then shows up correctly in 'initctl list-env -g'.
I don't yet know why the variable exported by dbus is missing, but I can confirm that this is a common problem across all the variables being set in /usr/share/ upstart/ sessions/ *.conf; GPG_AGENT_INFO, DBUS_SESSION_ BUS_ADDRESS, SSH_AUTH_*, UBUNTU_MENUPROXY are all missing from the global env. GTK_MODULES is there, but presumably arrives by other means.