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:

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

doesnt work
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
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.
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
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.
hi,
i had the same problem. I used kill -9 ####. It did work for me
thanks kae
Thanks, works fine !
the sudokill command didn’t work for me, but running xkill in the command dialog box worked like a charm .. thanks josh!
rm lock and .parentlock really help.
Thanks.
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!
thanks shah
rm ~/.mozilla/firefox/{profilefolder}/lock does the trick
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
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.
rm /home/somebody/.mozilla/firefox/profile/ is the trik which work for me