site  contact  subhomenews

Fix Firefox second instance will not start

December 13, 2023 — BarryK

I posted about this problem to the forum:

The error popup states "Firefox is already running, but is not responding".

I discovered that dbus is the problem, as reported here:

EasyOS is unique, in that it runs each app as its own user; or rather, that is an option. The choice is made for each browser to run as its own user, so Firefox runs as user "firefox". Same for appimage and flatpak apps, and there was a problem with dbus, that was solved awhile back:

In the case of Firefox, /usr/bin/firefox is a script, that, amongst other things, logs in as user "firefox", then runs /usr/bin/firefox.bin. Here is the latter:

export $(dbus-launch) #if app needs to access dbus.
/usr/bin/firefox.bin0 $@

...the problem with this, and it seems only to break Firefox, Chromium is ok, is that running this a second time, when FF is already running, starts a second 'dbus-daemon'.

The solution is to run 'dbus-daemon' once-only. The script needs to detect if dbus-daemon is already running for that user. If already running, it still needs to export variables DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID, to satisfy some appimage and/or flatpak apps.

The fixed script is here:

And here:

Actually, FF is starting to look good again.    

Tags: easy