How to kill hidden firefox?(Solved)
How to kill hidden firefox?(Solved)
When I try to open firefox I get a message that firefox is already running and I must kill it or reboot.
I have tried to re-boot but no help. I removed and re-installed firefox and still get message.
I have looked in TOP and do not see firefox running.
I have looked in Pprocess process manager and do not see firefox in there either.
Where else can I look to kill firefox?
I am using puppy 4.3.1 on a 2G usb thumb drive and firefox 3.5.6 on a acer netbook
I have tried to re-boot but no help. I removed and re-installed firefox and still get message.
I have looked in TOP and do not see firefox running.
I have looked in Pprocess process manager and do not see firefox in there either.
Where else can I look to kill firefox?
I am using puppy 4.3.1 on a 2G usb thumb drive and firefox 3.5.6 on a acer netbook
Last edited by kent41 on Mon 14 Mar 2011, 15:58, edited 1 time in total.
[size=75][color=darkred]Toshiba M35X S-111 - Aspire 5100-3357 using puppy 2.12 - 2.13 - 2.14 - 4.3.1 -
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
You can try
and see if Firefox will open after that that command.
Code: Select all
kill -9 firefox-bin
Find your Firefox profile directory. It should be ~/.mozilla/firefox/('random' characters), I believe.
In that directory, if there is a file named something like ".lock" and/or ".parent-lock", delete them. Then, try starting Firefox again.
(The files are meant to prevent more than one instance of Firefox from running at a time, basically. However, if FF crashes, the files may not be deleted, and FF will unfortunately think another instance is already running, when there aren't any.)
In that directory, if there is a file named something like ".lock" and/or ".parent-lock", delete them. Then, try starting Firefox again.
(The files are meant to prevent more than one instance of Firefox from running at a time, basically. However, if FF crashes, the files may not be deleted, and FF will unfortunately think another instance is already running, when there aren't any.)
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: How to kill hidden firefox
Open rxvt (command window), and enter:kent41 wrote:When I try to open firefox I get a message that firefox is already running and I must kill it or reboot.
I have tried to re-boot but no help. I removed and re-installed firefox and still get message.
I have looked in TOP and do not see firefox running.
I have looked in Pprocess process manager and do not see firefox in there either.
Where else can I look to kill firefox?
I am using puppy 4.3.1 on a 2G usb thumb drive and firefox 3.5.6 on a acer netbook
Code: Select all
ps | grep firefox
Code: Select all
14766 root 0:00 /bin/sh /usr/lib/firefox/run-mozilla.sh /usr/lib/firefox/firefox-bin
Code: Select all
kill -9 14766
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
Thanks for all the suggestions however the thumbdrive
seem to have other issues and I found it would be just as easy to re-install.
I deleted the .lock and the .parentlock but that did not help.
I had added lots of changes so now I will have to reload all my changes and updates.
Thanks again
seem to have other issues and I found it would be just as easy to re-install.
I deleted the .lock and the .parentlock but that did not help.
I had added lots of changes so now I will have to reload all my changes and updates.
Thanks again
[size=75][color=darkred]Toshiba M35X S-111 - Aspire 5100-3357 using puppy 2.12 - 2.13 - 2.14 - 4.3.1 -
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
I wrote this script quite quickly and tested it. It seems to work fine. If problems let me know.
First we try and be nice to the ghost app, if that doesn't work, we use
signal 9, the ghost buster.
Note: All the iterations don't do anything unless there is something to do.
But Firefox has several threads and PIDS.
File attached, unzip it and put in your path, one of the bin directories
File name is killfox
~
EDIT: the -xs switch didn't work with Puppy's BusyBox pidof. I fixed
the downloadable file by replacing the -xs with just -s and it works
fine.
If you downloaded the killfox.zip file, please download killfox-fixed.zip
to replace the script killfox.
Sorry for the inconvenience.
Note - the script requests Firefox to close several times before
forcing it do close. If Firefox closes on request, it will give a normal
shutdown and likely prevent corrupting Cache or configuration files.
~
First we try and be nice to the ghost app, if that doesn't work, we use
signal 9, the ghost buster.
Code: Select all
#!/bin/bash
### MODIFIED to reflect changes
# first kill gently try up to 12x
while [ x$cnt != x11 ]; do
id=`pidof -s firefox`
if [ ! -e $id ] ; then
kill -s 15 $id
fi
idbin=`pidof -s firefox-bin`
if [ ! -e $idbin ] ; then
kill -s 15 $idbin
fi
cnt=`echo $((cnt + 1))`
done
cnt=0
# test and force kill try up to 8x
while [ x$cnt != x7 ] ; do
id=`pidof -s firefox`
if [ ! -e $id ] ; then
kill -s 9 $id
fi
idbin=`pidof -s firefox-bin`
if [ ! -e $idbin ] ; then
kill -s 9 $idbin
fi
cnt=`echo $((cnt + 1))`
done
# test and report
id=`pidof -s firefox`
idbin=`pidof -s firefox-bin`
if [ -e $id ] && [ -e $idbin ] ; then
echo "Success, Firefox isn't running"
else
echo "Sorry, Firefox appears to be running"
fi
But Firefox has several threads and PIDS.
File attached, unzip it and put in your path, one of the bin directories
File name is killfox
~
EDIT: the -xs switch didn't work with Puppy's BusyBox pidof. I fixed
the downloadable file by replacing the -xs with just -s and it works
fine.
If you downloaded the killfox.zip file, please download killfox-fixed.zip
to replace the script killfox.
Sorry for the inconvenience.
Note - the script requests Firefox to close several times before
forcing it do close. If Firefox closes on request, it will give a normal
shutdown and likely prevent corrupting Cache or configuration files.
~
- Attachments
-
- killfox-fixed.zip
- Updated replacement for killfox.zip. Contents: killfox script
- (437 Bytes) Downloaded 207 times
Last edited by Bruce B on Mon 14 Mar 2011, 12:27, edited 4 times in total.
- Moose On The Loose
- Posts: 965
- Joined: Thu 24 Feb 2011, 14:54
You can make your script a little faster with
# A=$(( 1 + 1 ))
# echo $A
2
instead of using the echo to do it.
You can also use a for loop like:
to do more than one program's PID. With seamonkey, I seem to get a total of 3 zombie programs when is crashes. Perhaps with firefox there are only 2.
# A=$(( 1 + 1 ))
# echo $A
2
instead of using the echo to do it.
You can also use a for loop like:
Code: Select all
# for A in firefox firefox-bin madeup madeupmore ; do
> echo $A
> done
firefox
firefox-bin
madeup
madeupmore
#
Thanks Bruce I will add the script to my bag of tricks and the next time Firefox acts up I have a bigger hammer.
Kent
EDIT: for some reason I was getting a x error on pidof - I removed the -x and kept the -s and it works ok now.
Kent
EDIT: for some reason I was getting a x error on pidof - I removed the -x and kept the -s and it works ok now.
[size=75][color=darkred]Toshiba M35X S-111 - Aspire 5100-3357 using puppy 2.12 - 2.13 - 2.14 - 4.3.1 -
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
Bootable CD and no hard drive[/color][/size]
Acer Aspire 1 netbook using thumbdrive or CD
Two different tools. I used the GNU pidof which supports the -x switch.kent41 wrote:Thanks Bruce I will add the script to my bag of tricks and the next time Firefox acts up I have a bigger hammer.
Kent
EDIT: for some reason I was getting a x error on pidof - I removed the -x and kept the -s and it works ok now.
-s Single shot - this instructs the program to only return one pid
-x Scripts too - this causes the program to also return process id's of shells running the named scripts
I installed my own Firefox. The name filename firefox is a script. The name firefox-bin is a binary file.
Here is the help for Puppy's pidof - note that -x isn't supported, so
it needs to be removed for that tool. Sorry.
Code: Select all
BusyBox v1.16.2 (2010-06-19 18:02:46 GMT-8) multi-call binary.
Usage: pidof [OPTIONS] [NAME]...
List PIDs of all processes with names that match NAMEs
Options:
-s Show only one PID
-o PID Omit given pid
Use %PPID to omit pid of pidof's parent
I see the title "How to kill hidden firefox"; will it kill a running firefox or only a "hidden firefox"?
I downloaded killfox and installed it in /root/bin. To test it I open FirePup (firefox 1.5.0.12) and ran killfox. Killfox reported "Success, Firefox isn't running". However, nothing changed with firefox it is running as before.
What is going on?
Edit:
Fixed - reread the comments about removing the pidof -x option and everything works right.
Bruce B posted his answer below while I was doing this edit. He must not sleep!
I downloaded killfox and installed it in /root/bin. To test it I open FirePup (firefox 1.5.0.12) and ran killfox. Killfox reported "Success, Firefox isn't running". However, nothing changed with firefox it is running as before.
What is going on?
Edit:
Fixed - reread the comments about removing the pidof -x option and everything works right.
Bruce B posted his answer below while I was doing this edit. He must not sleep!
Last edited by don922 on Mon 14 Mar 2011, 11:03, edited 1 time in total.
[color=green][i]Don -- Thailand[/i][/color]
[url=http://www.puppylinux.com][img]http://tinypic.com/4e0tojl.jpg[/img][/url]
[url=http://www.puppylinux.com][img]http://tinypic.com/4e0tojl.jpg[/img][/url]