LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2004, 06:52 PM   #16
glow
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0

This is an old problem, but seems to still be affecting mozilla and now firefox. Here's a little script to launch firefox after detecting if it's running (main functionality was taken from an old ~1.4 mozilla launcher). It should work for mozilla - just edit and replace the firefox calls with the path to your install...

Code:
#!/bin/sh

MOZ_PROGRAM="/usr/local/firefox/firefox"
MOZ_CLIENT_PROGRAM="/usr/local/firefox/mozilla-xremote-client"
url="$1"

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
}

ALREADY_RUNNING=`check_running`

if [ "${ALREADY_RUNNING}" -eq "1" ]; then
    exec $MOZ_CLIENT_PROGRAM "openurl($url,new-window)" 2>/dev/null >/dev/null
else
    exec $MOZ_PROGRAM ${1+"$@"}
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla: no damn profile manager! Sinope Linux - Software 1 09-09-2004 07:18 PM
Mozilla 1.4 and profile manager linux_pioneer Linux - Software 5 07-22-2004 02:28 PM
mozilla profile manager HE|| again! itsjustme Linux - General 3 02-07-2004 10:15 AM
Disable Mozilla Profile Manager beajedi Linux - Software 10 01-28-2004 07:15 PM
Profile Manager for Mozilla 1.2 Qebex Linux - Software 2 09-22-2002 04:41 AM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration