Yes, I know that this question is a bit confusing, I just mean "the variables which are acessible from session's command line".
I am writing an application which runs automatically by upstart on filesystem, to listen to DBus login1 events and thus It runs from root. But after any user logs in I need to listen to his session bus for additional signals. That's why I want to get DBUS_SESSION_BUS_ADDRESS
of current user.
Other methods of getting DBUS_SESSION_BUS_ADDRESS
don't work for me, for example ~/.dbus/session-bus/*
files are somehow outdated(?) ie their content does not match one in the environment.
/proc/<pid>/environ
for all the env var=value (each terminated by null). – meuh Oct 08 '15 at 16:43