Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 http://projects.gnome.org/gconf/ 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
add comment

4 Answers

up vote 2 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.

share|improve this answer
add comment

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
add comment

Or if as me you don't use gnome:

unset DBUS_SESSION_BUS_ADDRESS

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

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
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY".

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

set-option -g update-environment "DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"

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
add comment

Your Answer

 
discard

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.