Howto – Fix Firefox already running error
July 20, 2010 2 Comments
This is the error message that tells you Firefox is already running:
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
To fix it you can usually just kill Firefox with:
killall firefox-bin
But sometimes it decides to be a bit of a pest and you’ll need to find the Firefox PID and then kill the process:
ps auxwww | grep firefox
Which will give you something like this:
rich 2167 0.0 0.0 3300 764 pts/0 S+ 19:36 0:00 grep firefox
Then you just kill the process number:
killall 2167
Still not able to kill Firefox?
1. Find your profile. This page tells you how to find the location of your Firefox profile. Under Linux (e.g. Ubuntu), it will be at ~/.mozilla/firefox/[Profile name]/ .
2. Remove the lock files. This page tells you what the lock files are for Firefox on Windows/Linux/Mac. Under Unix/Linux, you’ll need to remove two files “lock” and “.parentlock” .
I have a small script that I call “killfox” in my ~/bin/ that does this basic thing. I originally wrote
it because my kids would be playing flash games and it would hang – so I needed something
that they could click on without bugging me :D … just make sure to fix the “FF_DIR” variable
before you use it.
#!/bin/bash
FF_DIR="/home/kevin/.mozilla/firefox/h6s1yevz.default"
/bin/kill -9 `pidof firefox-bin`
sleep 5
rm -f $FF_DIR/lock & \
rm -f $FF_DIR/.parentlock
Hey thanks Kev,
That’s a great little script. I never though of that to be honest even though I also have a bunch of other scripts in /usr/local/bin.
I’ll be adding yours now.
If you have a blog post with this, let me know and i’ll link to it.
EDIT: I had to remove the Ampersand from line 6 or it threw up an error with both & or amp:
#!/bin/bash
FF_DIR=”/home/rich/.mozilla/firefox/.vbtmn4x1.default”
/bin/kill -9 `pidof firefox-bin`
sleep 5
rm -f $FF_DIR/lock; \
rm -f $FF_DIR/.parentlock
rich