3

Sometimes in GUI I use byobu , but I get the following error with qdbus

Could not connect to D-Bus server: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-1rnudRVZOD: Connection refused

and the following with dbus-monitor

Failed to open connection to session bus: Failed to connect to socket /tmp/dbus-1rnudRVZOD: Connection refused

How can I fix this ?

What I've tried so far is exporting couple variables in my .bashrc

export DBUS_SESSION_BUS_ADDRESS
export DISPLAY

2 Answers 2

2

Type

export $(dbus-launch)

This worked for me.

1

You probably want to monitor some specific dbus daemon instance, connected to particular process (like gnome-session or something like this). First find PID of that process

$ pidof gnome-session
34001

Then check its env vars for DBUS_SESSION_BUS_ADDRESS

$ xargs --null --max-args=1 < /proc/34001/environ | grep DBUS_SESSION_BUS_ADDRESS

Now you can export extracted var

$ export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-p7YOEk,guid=ed5c03623a
1
  • To simplify that all into a one liner, it would be: export $(xargs --null --max-args=1 < /proc/$(pidof gnome-session)/environ | grep DBUS_SESSION_BUS_ADDRESS)
    – erwin
    Jan 1, 2023 at 13:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .