epiphany launch error: Unable to connect to session bus

Bug #85118 reported by Aurelien Naldi on 2007-02-14
Affects Status Importance Assigned to Milestone
Fix Released
dbus (Ubuntu)

Bug Description

Binary package hint: epiphany-browser

[using epiphany 2.17.91 in feisty. It happened with older versions in feisty, but not in edgy and older versions]

When I boot the system and log in, I can launch epiphany without a problem, but if I logoff, and then log back in, epiphany refuses to start:
** (epiphany:9785): WARNING **: Unable to connect to session bus: Failed to connect to socket /tmp/dbus-9sJiuXWgBI: Connection refused

I can log off, remove all my files in /tmp using the console to fix the problem.
dbus-launch epiphany also works.

ProblemType: Bug
Date: Wed Feb 14 15:30:10 2007
DistroRelease: Ubuntu 7.04
ExecutablePath: /usr/bin/epiphany
Package: epiphany-browser 2.17.91-0ubuntu1
ProcCmdline: epiphany
ProcCwd: /tmp
SourcePackage: epiphany-browser
Uname: Linux gin-g5 2.6.20-6-powerpc64-smp #3 SMP Wed Jan 31 19:43:02 UTC 2007 ppc64 GNU/Linux

Aurelien Naldi (aurelien.naldi) wrote :
Sebastien Bacher (seb128) wrote :

looks like a dbus problem, a session bus should be running

Craig Duquette (cduquette) wrote :

I am also having this issue in Ubuntu Feisty with the latest version of dbus and Epiphany. I get this error when I ctrl+alt+backspace my session and try to log back into the desktop. It then throws that message every time I try to launch epiphany, whether by the command line or a menu icon. It's also interesting to note that network-manager functions fine and restarting dbus doesn't fix this error. The only thing I can do is reboot the computer.

Craig Duquette (cduquette) wrote :

Actually this is only happening when I'm using main-menu to launch applications after a crash. It seems command line and the default gnome-panel are fine.

The major details of this problem can be found at http://bugzilla.gnome.org/show_bug.cgi?id=395488 since this was seen when gnome-session added internal D-Bus support. Basically, dbus will write its PID twice to the PID file handle. The first time is properly processed, but the second time causes a SIGPIPE which crashes the session bus.

I'm not sure what the proper fix is, but I have included a patch that simply ignores SIGPIPE for both writes. Perhaps the second write should be eliminated altogether. These patches are against dbus-1.0.2.

Created an attachment (id=9944)
Ignore SIGPIPE when writing PID

as mentioned on http://bugzilla.gnome.org/show_bug.cgi?id=395488
I think the better fix would be to avoid writing the pid twice.

It looks likely the fix for bug #1720 introduced the problem, though I have not verified. Need to fix it in such a way that it works both with and without --fork.

zerwas (zerwas) wrote :

I can confirm this bug using Ubuntu Gutsy. But i also get it in the Terminal:

** (epiphany-browser:19529): WARNING **: Unable to connect to session bus: Failed to connect to socket /tmp/dbus-choXXMhIMQ: Connection refused

David Meier (droebbel-melta) wrote :

Confirmed in gutsy.
Message is:

** (epiphany:27195): WARNING **: Unable to connect to session bus: Failed to connect to socket /tmp/dbus-iI6OaJFQP3: Connection refused

There is no /tmp/dbus-* directory at all.

Running epiphany with
$ dbus-launch epiphany

Starting a dbus session with
$ dbus-launch
and running epiphany after that does *not* work.
Still there are no dbus-* directories in /tmp after launching a dbus session.

There are a bunch of dbus-daemons running:
26702 ? 00:00:00 dbus-daemon
26708 ? 00:00:00 dbus-daemon
28086 ? 00:00:00 dbus-daemon
28135 ? 00:00:00 dbus-daemon
28551 ? 00:00:00 dbus-daemon
28640 ? 00:00:00 dbus-daemon

Restarting the computer usually helps.

Adam Lofts (adam-lofts) wrote :

There is a race when gnome-session launches dbus. I think running a -rt kernel seems to make it occur more often. The bug that is happening (or something very similar) is described here:


I have strace'd the launch myself and I also find that the dbus child process receives a SIGPIPE. Any easy fix for this is to change your gnome session script to launch dbus before gnome-session. Then gnome-session wont try and start dbus itself. In /usr/share/xsessions/gnome.desktop change the line:



Exec=dbus-launch /usr/bin/gnome-session

Created an attachment (id=13764)
Write pid to pipe once

This proposed patch writes to pid to pipe just once.

patch doesn't apply to git head. Please repost one that does. I don't think this will make 1.2.0.

Brian Cameron has pointed out to me Havoc's commit of 2007-08-17. to bus/bus.c and dbus/dbus-sysdeps-util-unix.c.

I think that fixes the problem and this bug can be closed.

Adna rim (adnarim) wrote :

Confirmed with Hardy Heron.

Setting Status/Importance

Changed in dbus:
importance: Undecided → Medium
status: New → Confirmed
Changed in dbus:
status: Unknown → In Progress
Mark Carter (mcturra2000) wrote :

I'm using Kubuntu Hardy. If I install and try to start Epiphany, I the following error dialog box appears:

Could not start GNOME Web Browser
Startup failed because of the following error:
Failed to execute dbus-launch to autolaunch D-Bus session.

Malte S. Stretz (mss) wrote :

According to
there's a patch to fix this issue, maybe Ubuntu could roll a patched version including the fix?

Sounds like this one is fixed, closing; thanks Padraig.

Changed in dbus:
status: In Progress → Fix Released

This has long-since been fixed.

Changed in dbus (Ubuntu):
status: Confirmed → Fix Released
Changed in dbus:
importance: Unknown → Medium

With Ubuntu LTS Hardy. If I start the Epiphany browser I get:

Could not start GNOME Web Browser
Startup failed because of the following error:
Failed to execute dbus-launch to autolaunch D-Bus session.

Changed in dbus:
importance: Medium → Unknown
Changed in dbus:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.