Firefox Failed to Launch D-Bus Daemon

October 25th, 2009 | Categories: Linux | Tags: , , ,

After some upgrades on my Arch Linux, my Firefox suddenly raised an error dialog on startup:

http://doitian.com/wp-content/uploads/2009/10/firefox-error-dialog.png

, 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.

Share or Save it:
  • Twitter
  • Facebook
  • FriendFeed
  • del.icio.us
  • Digg
  • StumbleUpon
  • Ping.fm
  • HelloTxt
  • RSS
  • email
  • Print

Related posts:

  1. Use GCC 4.1 in Arch Linux
  2. Run `kill-emacs-hook’ in Emacs Daemon
  1. Marc Dubrowski
    November 1st, 2009 at 05:53
    Reply | Quote | #1

    Thanks a Lot !!! I was wondering what the problem could be, and hadn’t made the link between firefox and dbus.

    Brilliant !!

  2. November 1st, 2009 at 16:33
    Reply | Quote | #2

    @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.

Leave a comment here:
Your email is never published nor shared.

Additional comments powered by BackType