linuxcrypt, linux, oss

Ubuntu, Opening firefox, says is already running, close existing process

So, today I was playing around with some different emerald themes, and to apply it I logged out and logged back in. I am very religious about closing my applications before logging out or shutting down a system. So I found it interesting that I still received a firefox error upon returning to my desktop. Error: “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”.

Well, is that so? I can only assume that maybe while trying to apply the new theme to the application it hung, or perhaps my user processes were not completely closed when I logged out. In any case, below is a screen shot of the error:

Whole Desktop

Firefox Error

Well, for those who would rather not restart their system, there is an easy way to resolve this.

Solution:

Open a terminal, and run the following command:

$ps aux | grep firefox

PS Command

What this does, is it asks the system to list the running process. Using the “grep” command is just applying a filter for “firefox”. IF you notice the second to last process is my firefox process. the PID or “process ID” is “5719″. The first column will list what user is running the process, and the second column will show the process ID. Now we can just kill the process by running another command in the temrinal of

$sudo kill -9 5719

What this is doing is telling the system to just kill the process, the equivalent of “end task” in Windows. You should now be able to just relaunch Firefox without any errors.

To see all the processes running just run a:

$ps aux

from your command line and you can see all the processes running and the corresponding information for each.

cheers,

~j

14 Responses to “Ubuntu, Opening firefox, says is already running, close existing process”

  1. kae June 13, 2008 at 3:21 pm #

    doesnt work :(

  2. prometheus July 5, 2008 at 5:31 pm #

    kae, make sure you only type “ps aux | grep firefox” (without the quotes)

    then type sudo “kill -9 ####” the #### is the 4 digit number that will appear after you type in the first code.

    Only use the 4 digit number that comes before the directory of firefox. So in this example the 5719 number comes before the directory line usr/lib/firefox/firefox-bin

    do not use the other 4 digit numbers

  3. shah July 9, 2008 at 11:01 am #

    I get the same error but when i do ps aux | grep firefox, it does not find any firefox process which is running – any thoughts? Basically, I accidentally unplugged my machine whilst it was on and ever since I have had this problem. Even restarting didn’t help. I have Suse Linux. Thanks.

  4. josh July 9, 2008 at 11:05 am #

    shah:

    A couple other things you can try is:

    killall firefox-bin

    One thing I found on the openSuse forums is
    1. Press Alt F2 (run command dialog box)
    2. Type “xkill” and press Enter/Return key
    3. Position the skull icon over the window you want to close/kill and click on it with your left mouse button.

    Hope one of those help?

    Josh

  5. shah July 10, 2008 at 4:09 am #

    Hi Josh, had trouble posting response (killall didn’t work) so did some more searching and found solution. Because firefox had not closed properly the previous profile lock file still existed and so I simply had to do the following:

    “rm ~/.mozilla/firefox/{profile_folder}/lock”
    and
    “rm ~/.mozilla/firefox/{profile_folder}/.parentlock”

    Hope that will be helpful to others encountering the same problem. Thanks.

  6. shruti September 24, 2008 at 1:38 am #

    hi,

    i had the same problem. I used kill -9 ####. It did work for me :) thanks kae

  7. Matias February 25, 2009 at 8:28 am #

    Thanks, works fine !

  8. mitch April 25, 2009 at 10:23 pm #

    the sudokill command didn’t work for me, but running xkill in the command dialog box worked like a charm .. thanks josh! :)

  9. sue May 4, 2009 at 9:26 am #

    rm lock and .parentlock really help.
    Thanks.

  10. Rob A July 20, 2009 at 11:41 pm #

    pkill -9 firefox
    sends “SIGKILL” rather than “SIGTERM” – SIGTERM is not supposed to be blockable, but sometimes a hung process can’t honor SIGTERM. SIGKILL always works. “pkill” is easier, since it does the “ps aux |grep -i firefox” work for you.

    killall will run “kill -15″ on multiple instances of the same process (SIGTERM, not SIGKILL), so is also useful where pkill isn’t, but not quite as powerful.

    ps aux |grep firefox
    sudo kill -9
    is simply just a lot more to type. Cheers!

  11. venkat September 11, 2009 at 5:33 pm #

    thanks shah

    rm ~/.mozilla/firefox/{profilefolder}/lock does the trick

  12. Bhaskar Chowdhury November 13, 2009 at 9:01 pm #

    Hi guys,

    I have face the same problem in openSUSE11.1 and rectified it by changing the file/folder permission. Mistakenly I made to root:root to all the folder under /home/somebody/.mozilla/firefox/profile/ and it showed the mentioned problem.

    So I changed back the permission to normal user and it start working. Thanks all of you for the wonderful insight about this problem.

    Thanks
    Bhaskar

  13. Bhaskar Chowdhury November 13, 2009 at 9:09 pm #

    Hi guys,

    I have faced the same problem on openSUSE11.1 and I found out the I mistakenly changed the permission of /home/somebody/.mozilla/firefox/profile folder. So I change back it the user running it and it start working :)

    Thanks all the ppl for the insight into this problem.

  14. bahareh September 30, 2010 at 2:01 pm #

    rm /home/somebody/.mozilla/firefox/profile/ is the trik which work for me :)

Leave a Reply:

Gravatar Image