On Wed, Sep 03, 2003 at 03:45:19PM +0300, Ami Chayun wrote:
> I don't know if it's a known issue, but I looked for some time for a way
> to launch mozilla without launching a new process every time.
> Finally I wrote this script, hope someone will fid it useful.
> 

What mozilla package do you use?

Here are some parts of /usr/bin/mozilla of RH7.3:


  function check_running() {
      $MOZ_CLIENT_PROGRAM 'ping()' 2>/dev/null >/dev/null
      RETURN_VAL=$?
      if [ "$RETURN_VAL" -eq "2" ]; then
        echo 0
        return 0
      else
        echo 1
        return 1
      fi
  }

[snip]

  # check to see if there's an already running instance or not
  ALREADY_RUNNING=`check_running`

And one example for using it:
  
  # If there is no command line argument at all then try to open a new
  # window in an already running instance.
  if [ "${ALREADY_RUNNING}" -eq "1" ] && [ -z "$1" ]; then
    exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)" 2>/dev/null >/dev/null
  fi

-- 
Tzafrir Cohen                       +---------------------------+
http://www.technion.ac.il/~tzafrir/ |vim is a mutt's best friend|
mailto:[EMAIL PROTECTED]       +---------------------------+

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to