My firefox script

D

Dfenestr8

Hi. I use mozilla firefox on linux. It's a great browser, but the *nix
version has an annoying problem, that it won't let you open a new instance
from the desktop if the browser is already running.

So, in my amateurish way I wrote a little script to fix that. Here it
is......


#! /usr/bin/python
#fox_launch.py

import sys, os

if len(sys.argv) > 1:
URL = str(sys.argv[1])
else:
URL = ""

a = os.popen("ps ax |grep firefox")

detect_fox = a.read()

if detect_fox.count("firefox-bin") > 0:
os.popen2("firefox -remote 'openURL(" + URL + ",new-window)'")
else:
os.popen2("firefox " + URL)
 
G

Guest

Hi. I use mozilla firefox on linux. It's a great browser, but the *nix
version has an annoying problem, that it won't let you open a new
instance from the desktop if the browser is already running.

search freshmeat.net for "MSS"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top