Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to open Firefox in CentOS, but I'm getting the following message:

Firefox is already running but is not responding

and Firefox doesn't open. I tried this in command line:

kill Firefox

but it didn't work. Also, I don't know in which directory I must execute the right commands.

How can I fix this?

share|improve this question
    
Is there a killall command on Cent OS? That one you can use to kill by name, as you tried before. –  manatwork Jun 8 '13 at 10:54
2  
Yes there are the standard commands such as pgrep, pkill, and killall. –  slm Jun 9 '13 at 0:55
    
CentOS is a Linux distro, not Unix. –  Rafael Cavalcanti Jun 9 '13 at 16:18
    
Dchris - Please remember to accept which answer worked for you, or ask for more information. –  user66001 Jun 9 '13 at 20:22
    
@user66001 Who said i won't accept an answer? –  Dchris Jun 9 '13 at 21:20

3 Answers 3

up vote 5 down vote accepted
  1. First find the process id of firefox using the following command in any directory:

    pidof firefox
    
  2. Kill firefox process using the following command in any directory:

    kill [firefox pid]
    

Then start firefox again.

Or you can do the same thing in just one command.As don_crissti said:

kill $(pidof firefox)
share|improve this answer
2  
or kill $(pidof firefox) –  don_crissti Jun 8 '13 at 10:43
    
@don_crissti much better! –  Dchris Jun 8 '13 at 10:44
3  
Or better still is pkill firefox. –  slm Jun 9 '13 at 0:57
    
If doesn't work, try kill -9 $(pidof firefox) or pkill -9 firefox –  mavillan Sep 4 '13 at 14:38

Usually, many users say this command helps:

killall -SIGTERM firefox

The killall command will killall processes that are named "firefox". SIGTERM is the kill-signal type. This command works well for me and other Linux users. Also, it may help to wait thirty seconds after closing Firefox before it is turned back on.

share|improve this answer
5  
Not really. killall matches the pattern exactly. What you said is valid for pkill: it kills all processes containing that pattern (unless you pass -x in the arguments). For instance, "pkill refox" will kill firefox, but "killall refox" won't do anything (unless you have a "refox" process running). –  Rafael Cavalcanti Jun 9 '13 at 16:14
    
Thank you for pointing that out. –  Devyn Collier Johnson Jun 9 '13 at 18:09
    
NOTE: The above will not allow Firefox to perform closing operations (like the other pkill/kill options discussed elsewhere on this question, will, as they currently are) and will lead to (amongst other things) the lock symlink not being deleted, which will cause the message in this question to remain. See my answer for more details. –  user66001 Jun 11 '13 at 19:55

From http://kb.mozillazine.org/Profile_in_use - Check for:

1) A file called .parentlock
-AND-
2) A symlink called lock
...in ~/.mozilla/firefox/random string of alphanumeric characters.default/

The former is present while Firefox is running to prevent more than one different instance from trying to simultaneously write to the same set of profile files, and if Firefox is not closed cleanly, neither may be removed.

Error message received in this case should be:

From anywhere in the filesystem (or removing this if pwd reports ~/.mozilla/firefox/random string of alphanumeric characters.default), replacing random string of alphanumeric characters with the FF profile folder on your computer, do rm ~/.mozilla/firefox/random string of alphanumeric characters.default/.parentlock ~/.mozilla/firefox/random string of alphanumeric characters.default/lock` (assuming the first sentence pans out) to remove them, if there isn't a Firefox process running.

More less-authoritative information here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.