I am using Firefox via ssh on the following machine:

g1> head -1 /etc/motd
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-26-generic x86_64)
g1> firefox -version
Mozilla Firefox 17.0.1

When called from an xterm, the following message appears repeatedly. It seems to be printed only when I perform some action, like writing this question. Clicking on something. Otherwise, no message is printed.

(firefox:4162): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally without any error message

While writing this question I received about a dozen such messages.

Is there some way to avoid this (apart from 2> /dev/null)?

Probably, the following is irrelevant, but who knows:

g1> uname -a
Linux g1 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

You can use the program dbus-launch to get around this issue. So before you start Firefox type export $(dbus-launch). Now you can start Firefox. However there might another error message appear. If yes you can work around with export NSS_USE_SHARED_DB=ENABLED. Now Firefox should start without error messages or warnings.

Can can put that alltogether in a shell script:

export $(dbus-launch)
firefox &

If no dbus-launch is installed on your system, you should install the package dbus-x11. The program is part of this package.

  • Sorry, I'm a bit confused: dbus-launch is what exactly? I see only dbus-daemon, dbus-monitor and some other commands with that prefix. But there is no dbus-launch. echo $(dbus-lauch) gives me: not found
    – false
    Jan 8 '13 at 23:03
  • 1
    dbus-launch is in the package dbus-x11. The echo command results here in DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jQBTkG1okn,guid=3ea653d6cc701aabeb9c2f2b0000ea00 DBUS_SESSION_BUS_PID=22980.
    – qbi
    Jan 8 '13 at 23:07
  • Thanks for the answer, it did remove these errors for me too. But can you explain what these env variables are actually doing?
    – speedplane
    Sep 28 '17 at 3:48

Same problem but I think it was related to installing other software... I apt-get purged everything, then did an apt-get install dbus-launch, and finally an apt-get autoremove

  • 2
    What do you mean by "I apt-get purged everything"? Aug 6 '16 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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