A full-featured desktop on a single CD that can still work on older equiptment.







 

Force Close Firefox

If you have ever had a browser freeze up and not allow you to close it (completely stop responding) then you know the frustration.

Firefox also has an occassional habit of not openning again, even when you cannot see it anywhere -- claiming it is already running. That part is due to a "lock" file it generates in your home directory.

Enter killFirefox. This script uses killall on firefox-bin then finds the lock file and deletes it. Synopsis: clean dismount.

The menu item, the "Are you sure?" prompt and the result message are below:


The menu item





The "Are you sure?" prompt





The successful result



The script itself is at the bottom of the page.





killFirefoxScript


#!/bin/bash
# killFirefox script by Paul Sherman 
# does not just kill firefox-bin, but also removes lock file 
# from user home dir so that firefox can be restarted.
# uses the bash shell and xdialog

DIALOG=Xdialog
$DIALOG	--title "Firefox Destroyer" \
      	--yesno "This script will close any running instances of the Firefox browser.\nDo you wish to continue?" 0 0
	sel=$?
	case $sel in
		0) echo "Firefox will be destroyed.";;
		1) echo "OK, never mind" ; 
		   exit ;;
		255) echo "OK, never mind" ;
		     exit ;;
	esac 
killall firefox-bin
find "$HOME/.mozilla/firefox" -name "lock" -exec rm {} \;
$DIALOG --title "Success..." \
        --msgbox "If any instances of Firefox were open, \nthey are no more." 0 0
exit 0


Tux Pages created on Absolute OS Graphics made/edited by the Gimp   Created with the Gimp byPaul