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 get a message roughly like this:

Firefox is already running, close it or restart

I am on a network so don't have permissions to do anything with sudo and so cannot restart it so I went looking for the .lock file in .mozilla/firefox.

All that is inside is a

.profile.ini 

In the file it says

[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=o4k6tgim.default

This is maddening. Does anyone know how I can find this lock file? Or another way to get Firefox working again?

share|improve this question
1  
As of Firefox 16, the file is called profiles.ini, and there would be a directory called ~/.mozilla/firefox/o4k6tgim.default. Did you copy the file name properly (use copy-paste!)? Where is your o4k6tgim.default directory located? While you're at it, copy-paste the error message you're getting. –  Gilles Dec 7 '12 at 0:08
    
add comment

4 Answers 4

Try checking out the output from running strace firefox from the command line ...assumming you are running under some type of Linux.

share|improve this answer
    
how do I do that? Yes it's scientific linuz –  Magpie Dec 6 '12 at 22:44
    
@Magpie You just run strace firefox and strace will output every system call as it happens. You can filter it a bit and run strace -e open firefox to show all open() calls, and then look for the line where it tries to open its lock file –  Michael Mrozek Dec 7 '12 at 0:21
add comment

First use ps | grep firefox to check that the process isn't stuck somewhere. If it is, use kill to terminate it - you'll probably need kill firefox-bin. Once you know Firefox is not running, you can delete the .lock file in the profile.

share|improve this answer
add comment

Thanks for all the suggestions but I did not get to try them to confirm whether they would have worked, as I managed to solve it earlier by going to terminal and hitting

firefox -P

Then i created a new profile.ini and deleted the one there and tried again.

This worked!

share|improve this answer
    
NOTE: (For future visitors to this question. The above is a workaround, and (I would think) a more time intensive one, compared to other offered solutions; not a solution. –  user66001 Sep 3 '13 at 1:58
add comment

If the below is the error message the OP was getting....

From http://kb.mozillazine.org/Profile_in_use, there should be:

1) A file called .parentlock
-AND-
2) A symlink called lock
... in (for this OP) ~/.mozilla/firefox/o4k6tgim.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.

From anywhere in the filesystem (or removing this if pwd reports (for this OP) ~/.mozilla/firefox/o4k6tgim.default), do (for this OP) rm ~/.mozilla/firefox/o4k6tgim.default/.parentlock ~/.mozilla/firefox/o4k6tgim.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
add comment

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.