Firefox Failed to Launch D-Bus Daemon
After some upgrades on my Arch Linux, my Firefox suddenly raised an error dialog on startup:

, where the details button showed me:
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: /usr/bin/dbus-launch terminated abnormally without any error message)
Through command ps aux | grep dbus-daemon, I found out that there are many
processes started. The problem is that Firefox cannot communicate with
dbus-daemon. After goolgling, the communication is established by setting
environment variable DBUS_SESSION_BUS_ADDRESS. It is weird that dbus-daemon
was started on-demand, but Firefox had not got the address. So I tried to start
dbus-daemon myself when I logged into windows manager, and Firefox no longer
reported such error.
Because I use SLiM to start the windows manager, I can add following code in
.xinitrc to start dbus-daemon and setup the environment variable correctly
(via Arch Wiki). Depending on the startup method, these code may need to add to
.xsession, .Xclients or other init files.
# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
Also see a more complicated version written by me here, which store variables in file and avoid starting multiple instances of dubs-daemon.
Related posts:

Thanks a Lot !!! I was wondering what the problem could be, and hadn’t made the link between firefox and dbus.
Brilliant !!
@Marc Dubrowski
It seems that after upgrading gtk, Firefox tries to start d-bus if it cannot find one, but has not set the env variable correctly.