"Firefox is already running, but is not responding."

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

2 Answers

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

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like