Results 1 to 3 of 3

Thread: how to Detect Running Firefox through shell script?

  1. #1
    Join Date
    Dec 2007
    Beans
    12

    how to Detect Running Firefox through shell script?

    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

  2. #2
    Join Date
    Sep 2006
    Beans
    2,914

    Re: how to Detect Running Firefox through shell script?

    check for its process
    Code:
    ps -ef |grep firefox
    or
    Code:
    pgrep firefox

  3. #3
    Join Date
    Jan 2008
    Beans
    11

    Re: how to Detect Running Firefox through shell script?

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •