I am issuing the following command to kill Firefox on my Red Hat Linux box:
[subhrcho@slc04lyo ~]$ pkill -9 -f firefox
[subhrcho@slc04lyo ~]$
However, when I try to invoke Firefox through Applications -> Internet -> Firefox, it says:
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.
Best Answer
Do not use
kill -9
if not absolutely necessary, and most of the time it is not absolutely necessary. Always trykill
(without-9
) first. For an explanation see this question and answer: When should I not kill -9 a process?.Your "trouble" killing firefox might be a direct result of a previous
kill -9
(orpkill -9
). Firefox maintains lockfiles in the profile directory. The lockfiles are there to prevent two instances of firefox accessing the same profile at the same time. Normally firefox removes the lockfiles before it terminates. If youkill -9
firefox then firefox is killed instantly and cannot remove the lockfiles. If youkill
(without-9
) then firefox can still remove the lockfiles before terminating.I think this is what happened in your case:
pkill -9 -f firefox
. Firefox is terminated instanly. Lockfiles still in your profile dir.That is why you should not use
kill -9
if not absolutely necessary, and most of the time it is not absolutely necessary.If you are sure that firefox is killed (check with
pgrep -fl firefox
) you can manually remove the lockfiles from your profile. For more information see this mozillazine article: http://kb.mozillazine.org/Profile_in_use.