Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The error I get is this:

GConf Error: Failed to contact configuration server; the most common cause is a missing or misconfigured D-Bus session bus daemon. 
See for information. 
(Details -  1: Failed to get connection to session: Error connecting: Connection refused)
Failed to open bus: Failed to connect to socket /tmp/dbus-BYC0LHrEHk: Connection refused

Any suggestions?

share|improve this question
up vote 3 down vote accepted

Instead of letting Gnome run dbus-launch to create a random D-Bus address, start dbus-daemon explicitly early in your X session startup and give it a fixed address like unix:path=~/.dbus-$HOSTNAME-$DISPLAY.

Given the information in the bug report, you may even be able to get away with unset DBUS_SESSION_BUS_ADDRESS and let applications find out the bus address from the root window properties.

As of 15.10, the per-session dbus instance is created via an Upstart session job. The job file in question is /usr/share/upstart/sessions/dbus.conf. You can replace the default random address by overriding the pre-start script stanza which specifies the address to use. Create ~/.config/upstart/dbus.override with the following:

pre-start script
    DBUS_SESSION_BUS_ADDRESS=unix:path=$HOME/.dbus-$(hostname)-$(echo $DISPLAY | sed -e s/:/%3A/)
end script

The fixed address will be used after you next log in.

share|improve this answer

This is apparently a bug in gconf that already has a fix (if I understood correctly from this bug report). In the meantime, the following should work around the problem:

export DBUS_SESSION_BUS_ADDRESS=$(tr '\0' '\n' < /proc/$(pgrep -U $(whoami) gnome-session)/environ|grep ^DBUS_SESSION_BUS_ADDRESS=|cut -d= -f2-)
share|improve this answer

Or if as me you don't use gnome:


share|improve this answer
Works for me, and I do use gnome! – mgalgs May 7 '13 at 21:07

tmux can be told to always reset certain env vars:

update-environment variables

Set a space-separated string containing a list of environment variables to
be copied into the session environment when a new session is created or an
existing session is attached. Any variables that do not exist in the source
environment are set to be removed from the session environment (as if -r was
given to the set-environment command). The default is "DISPLAY SSH_ASKPASS

Based on that it might be appropriate to add DBUS_SESSION_BUS_ADDRES to this option in ~/tmux.conf:


This worked for me.

share|improve this answer
Didn't work for me (Ubuntu 10.04)... – mgalgs May 7 '13 at 21:07
Didn't work for me on Mint 15 :( ...what distro are you running? – hamstar Sep 16 '13 at 3:11
I'm running Debian unstable, tmux version 1.8-4. – arand Sep 17 '13 at 10:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.