Results 1 to 3 of 3

Thread: Firefox target script for external apps

  1. #1
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206

    Firefox target script for external apps

    I use this so much with out thinking that I completely forgot I made it a while ago, I thought I would share. Anytime I tried to target the Firefox binary from an external app, Firefox would ask me to use another profile since the default one was in use and Firefox didn't like multiple instances of itself running.

    Its simple and to the point. Essentially it checks for a running instance of a target Mozilla-based browser, then either creates a new instance or a new tab. You can use the commented out line to create a new window rather than a new tab. Copy and paste this into a file, make it executable, stick it someplace handy and target it with your apps that need a browser. (OpenOffice, Email App, etc.)

    Code:
    #!/bin/bash
    
    #Path to the Mozilla-based browser binary (alliterate much?)
    MOZILLA=/usr/share/firefox/firefox
    
    if ($MOZILLA -remote "ping()"); then
                 $MOZILLA -remote "openurl($1, new-tab)" &
                 #$MOZILLA -remote "openURL (URL, new-window)" &
    else
            $MOZILLA $1 &
    fi
    Let me know if you have any questions.
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  2. #2
    Advisor
    Join Date
    Apr 2004
    Location
    orlando
    Posts
    608
    nice one, i hate that profile shit, i'll have to try this

  3. #3
    Mentor
    Join Date
    May 2004
    Location
    Louisiana
    Posts
    1,206
    Gracias, amigo.

Similar Threads

  1. Firewall script in RHEL 4
    By sud.tech in forum Programming
    Replies: 8
    Last Post: 06-12-2008, 01:07 PM
  2. changing Firefox proxy config by script
    By xylex_blaiste in forum Programming
    Replies: 2
    Last Post: 02-26-2007, 06:54 AM
  3. Growth rate slips for Firefox usage
    By CoolJsa14 in forum General Chat
    Replies: 0
    Last Post: 02-28-2005, 10:46 PM
  4. Firefox flaw raises phishing fears
    By genesis in forum Windows - General Topics
    Replies: 1
    Last Post: 01-08-2005, 07:00 AM
  5. Shell Script to modify apachectl
    By gaxprels in forum Programming
    Replies: 6
    Last Post: 07-23-2002, 07:18 PM

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
  •