Howto – Fix Firefox already running error

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

Advertisements

One thought on “Howto – Fix Firefox already running error

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s