Comment 5 for bug 77625

Rgpublic (rgpublic) wrote :

This bug happens to me 100% of the time since I upgrade to intrepid. Firefox never closes. I already created a new ".mozilla" folder without any extensions etc and used a new firefox, unpacked from Mozilla's orginal .tar.gz files and installed in a separate directory with full right/write access rights to the application itself as well as its profile folder - to no avail. My workaround to be able to use firefox sensibly again - in case others are hit by the same problem:

===================
#!/bin/sh
output=`xwininfo -root -tree | grep firefox-bin`
if [ -z "$output" ]; then
  echo "No firefox"
  killall firefox-bin
  firefox
else
  echo "Firefox running"
fi
===================

This script checks if there is currently any window associated with firefox. In this case - nothing happens, so you don't accidentally kill your firefox session with all its precious tabs if it's really running and you click on the icon. If there is no window, it kills all zombie processes and starts over again. The best solution I found since all other attempts to fix this were futile.