LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   "Firefox is already running" (https://www.linuxquestions.org/questions/slackware-14/firefox-is-already-running-892919/)

kikinovak 07-21-2011 05:56 AM

"Firefox is already running"
 
Hi,

I have a 100% Slackware 13.37 network on both server and clients, with roaming profiles using NIS and NFS. Currently I'm debugging the whole thing, and I have a strange error that I can't quite explain.

Sometimes when my girlfriend logs in, she gets some strange "Firefox is already running" error. The strange thing here is: ps aux | grep firefox returns absolutely no Firefox process. The only "solution" to convince Firefox to start again is to wipe her ~/.mozilla directory, but by doing this, she loses all her bookmarks and settings.

Any idea what's going on here?

Cheers from the sunny South of France.

David the H. 07-21-2011 07:22 AM

I don't believe "Firefox" is used as a process name anymore. Try searching for a process called "xulrunner-stub" instead.

mRgOBLIN 07-21-2011 07:26 AM

It will be a lockfile. Mozilla uses .parentlock

You'll get this if Firefox is still running on another machine using a shared home directory or if it was not shut down properly.

Code:

find .mozilla/ -type f -name "*parentlock"|xargs ls -l

repo 07-21-2011 07:27 AM

The process is still firefox
Code:

root@cannabis repo]# ps ax | grep firefox
 4433 ?        Sl    1:02 /opt/firefox/firefox
 8356 ?        Sl    0:07 /opt/firefox/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /opt/firefox/omni.jar 4433 true plugin
 9761 pts/1    S+    0:00 grep firefox
root@cannabis repo]#

Take a look at the lock files in
Code:

/home/user/.mozilla/firefox
directory

Kind regards

kikinovak 07-21-2011 08:24 AM

Thanks everybody for all the detailed answers. I'll give it a try next time the Firefox process seems to hang.

sparkyhall 07-21-2011 08:52 AM

I use roaming profiles with firefox too. For what it's worth I get the "Firefox is already running" message if my network is down when I try to run firefox. This is particularly noticeable if I am connected via wifi at some distance so if your girl friend connects by wifi it could just be intermittent connectivity.

Woodsman 07-21-2011 10:51 AM

Quote:

The only "solution" to convince Firefox to start again is to wipe her ~/.mozilla directory, but by doing this, she loses all her bookmarks and settings.
Firefox creates a lock file named "lock" in the user's Firefox profile directory. The file is a sym link to the firefox-bin process ID. If that file is present then Firefox reports the app is already running.

If 'ps ax | grep firefox' reveals no process, still check for the lock file. As the lock file is a sym link that points to a process ID, there is a way to inspect the entire process list.

I have noticed through the years there is a nominal delay before the lock file is deleted when closing Firefox. Using a roaming profile on a network probably increases that delay and might be noticeable, as in several seconds.

The lock file is a local reference to each machine. Yet that lock file gets stored in the user's Firefox profile directory, which is stored on the network. With roaming profiles a user could start Firefox at one machine, which creates a lock file pointing to a local machine process ID. The user could start Firefox at another machine and the same thing happens. If the lock file is not cleanly deleted at one machine, or Firefox remains open at that first machine, the user can't start Firefox at a different machine because the lock file exists in the user's Firefox profile directory rather than as a link local to each machine.

If a problem with the network prevents Firefox from creating the lock file, I'm guessing Firefox treats that event much the same as an already existing lock file.

A wrapper script to run Firefox could forcibly delete the lock file, but with roaming profiles that might be problematic if users are allowed to log in concurrently at different workstations. Yet a wrapper script won't help if there is a connectivity problem with the roaming profile.


All times are GMT -5. The time now is 02:32 AM.