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.lockfile 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:
- This environment variable was missing from my bash shell.
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1003/bus
Exhaustive Version:
- My shell is launched from crontab
*/2 * * * * /home/user/start-up.sh start-up.shstarts atmuxsession.tmux set -g default-shell /usr/bin/bashtmux new-window -t "myservices" -d- Using ssh to connect Console and attach to
tmuxsession bytmux a -dt myservices - Launch the first firefox with profile name Proxy with SSH Console.
DISPLAY=:10.0 firefox --new-tab "about:blank" -P Proxy & - Do step 4 again, causing the error, "Firefox is already running, but is not responding."
- But if I do step 4 inside a Terminal rather than ssh console, firefox opens one more newtab as expected.
- After cross comparing between the
envof 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:
- Close Firefox.
pgrep firefoxkillthe processes you found, orkill -KILLthem if they don't die.- Double-check for the presence of
parent.lockunder~/.mozilla/firefox(delete it if it's there). - Start firefox again.