Contents
What happens if dbus _ session _ bus _ address is not set?
If DBUS_SESSION_BUS_ADDRESS is not set for a process that tries to use D-Bus, by default the process will attempt to invoke dbus-launch with the –autolaunch option to start up a new session bus or find the existing bus address on the X display or in a file in ~/.dbus/session-bus/.
Where are the dBus environment variables set in xinitrc?
If you look at where the dbus environment variables are set (again), it’s in /etc/X11/Xsession.d/20dbus_xdg-runtime. I use my own .xinitrc, and I realized a bunch of problems I had stemmed from not sourcing the scripts in /etc/X11/Xsession.d (as the default xinitrc does).
Why is my display manager not using xinitrc?
Not using display manager and executing startup logic via xinitrc. Problem is some dbus-related env variables are not set. dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments
How to configure D Bus and SSH X forwarding to?
Looking at /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh gives some clue as to what is supposed to happen with a “normal” X session. This of course doesn’t work when just invoking an X application to a remote X Server. This will allow the SSH session to close out, but it feels kludgy.
When to use dbus-run-session in shell script?
dbus-run-session is used to start a session bus instance of dbus-daemon from a shell script, and start a specified program in that session. The dbus-daemon will run for as long as the program does, after which it will terminate.
How to list the services available on the system bus?
On QT setups (short commands and clean, human readable output) you can run: will list list the services available on the system bus. Just like qdbus, if –session or no message bus is specified, dbus will send to the login session message bus.
Where do I find the session bus address?
The session bus’ address is made available to PROGRAM in the environment variable DBUS_SESSION_BUS_ADDRESS. The variables DBUS_SESSION_BUS_PID , DBUS_SESSION_BUS_WINDOWID , DBUS_STARTER_BUS_TYPE and DBUS_STARTER_ADDRESS are removed from the environment, if present.
Why are some dbus env variables not set?
Problem is some dbus-related env variables are not set. dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments How to make sure dbus vars (eg DBUS_SESSION_BUS_ADDRESS) are set?
Why is my dbus autolaunching to another user?
In the meantime, you can edit the session.conf config file to have your session bus listen on TCP, and manually set DBUS_SESSION_BUS_ADDRESS, if you like. The second common reason for autolaunch is an su to another user, and display of X applications running as the second user on the display belonging to the first user.
What does dbus-launch do with no arguments?
With no arguments, dbus-launch will launch a session bus instance and print the address and PID of that instance to standard output.
What does dbus-launch print to standard output?
When dbus-launch prints bus information to standard output, by default it is in a simple key-value pairs format. However, you may request several alternate syntaxes using the –sh-syntax, –csh-syntax, –binary-syntax, or –auto-syntax options. Several of these cause dbus-launch to emit shell code to set up the environment.