Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   My firefox script (http://www.velocityreviews.com/forums/t329677-my-firefox-script.html)

Dfenestr8 04-07-2004 07:26 PM

My firefox script
 
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)



=?UTF-8?B?0LTQsNC80ZjQsNC9INCzLg==?= 04-08-2004 11:16 AM

Re: My firefox script
 


> 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"


--
Дамјан (jabberID:damjan@bagra.net.mk)

Where do you think you're going today?


All times are GMT. The time now is 09:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57