3

On my Devuan GNU/Linux system, I have a newer version of Firefox installed, under /opt/firefox . I also have /usr/local/bin/firefox point to it, indirectly, via Debian's alternatives mechanism (i.e. via /etc/alternatives/firefox).

When I just start firefox and it's not already running - this works fine. But if it is already running, then startup takes a long time, and eventually I get that dreaded error message box:

Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.

Now, I don't have _MOZ_NO_REMOTE set; and I don't start firefox with a -no-remote option.

What can I do to prevent the above error (and thus allow opening links with a firefox https://foo.bar/ command)?

Notes:

  • Obviously, I don't want to close the existing running instance.
  • Not a dupe of this, which has MOZ_NO_REMOTE set to 0.
  • Not a dupe of this, which involves specific Thunderbird-Firefox interaction.
  • Not a dupe of this, as I don't seem to have any parent.lock file anywhere.
einpoklum
  • 10,666

4 Answers4

3

The problem was some zombie running instances of the firefox-bin process. The surprising part is that the firefox may run in this situation without complaining, when no other window is open but when some processes are. I have no idea why the mechanisms for bailing out are not uniform, but that's how it is.

So, what I did was:

  1. Close Firefox.
  2. pgrep firefox
  3. kill the processes you found, or kill -KILL them if they don't die.
  4. Double-check for the presence of parent.lock under ~/.mozilla/firefox (delete it if it's there).
  5. Start firefox again.
einpoklum
  • 10,666
3

Ubuntu 20.04 LTS

I ran into this problem myself, but none of the google results could solve my problem. Eventually I figured it out by myself.


Simple Version:

  1. This environment variable was missing from my bash shell.
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1003/bus

Exhaustive Version:

  1. My shell is launched from crontab
    */2 * * * * /home/user/start-up.sh
  2. start-up.sh starts a tmux session.
    tmux set -g default-shell /usr/bin/bash
    tmux new-window -t "myservices" -d
  3. Using ssh to connect Console and attach to tmux session by
    tmux a -dt myservices
  4. Launch the first firefox with profile name Proxy with SSH Console. DISPLAY=:10.0 firefox --new-tab "about:blank" -P Proxy &
  5. Do step 4 again, causing the error, "Firefox is already running, but is not responding."
  6. But if I do step 4 inside a Terminal rather than ssh console, firefox opens one more newtab as expected.
  7. After cross comparing between the env of the Terminal and SSH Console, I found if I set this variable into the Console, firefox will do as it should.
    export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1003/bus

Terminal
SSH Console after adding DBUS_SESSION_BUS_ADDRESS

0

Worked for me, in Fedora (39):

dnf install dbus-x11

... I didn't have installed that package (dbus-x11, wich provides dbus-launch).

And without any configuration or extra settings, I could launch "Firefox 'profile' -new-tab" without warnings.

PS : "Missing Twins" anwser give me the clue, sorry I dont have enough point to comment -\o/-

Sefer
  • 1
-1

Solution worked for me is to create a new firefox profile.

firefox -P
Create a new profile
Give your name
Toto
  • 19,304