me_himanshu
January 28th, 2008, 07:08 AM
Hi,
I want to Detect Through Shell Script that whether firefox browser is running or not? How can i do this?
Thanks in advance
Himanshu
ghostdog74
January 28th, 2008, 07:12 AM
check for its process
ps -ef |grep firefox
or
pgrep firefox
SunnyDaze
January 28th, 2008, 07:15 AM
To see all the processes running, just type this in:
ps -A
Then you scroll through the list and look for firefox.
Sometimes when you run a program it will start more than one process related to that program.
To stop all the processes related to a program you type killall like this (let's use firefox for an example:
killall firefox
If you are getting an error message saying firefox is already running, then you either need to delete the .parentlock file in the profile directory, or you no longer have write permission to the profile directory.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.