LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-17-2004, 02:23 PM   #1
Pathian
Member
 
Registered: Sep 2003
Location: Dayton, Ohio and Hoffman Estates, IL
Distribution: Slackware 9.1 (laptop) Mandrake 9.2 (desktop)
Posts: 58

Rep: Reputation: 15
Firefox 0.9 launcher script


I just upgraded from Firefox 0.8 to 0.9 on my Slackware 9.1 install, but suddenly my launcher scripts no longer work. I hate that user profile window thing so this is the script I was using to bypass it and create new instances in new tabs.

#!/bin/bash
/usr/bin/mozilla-firefox -remote "openURL($@, new-tab)" || exec /usr/bin/mozilla-firefox "$@";

however, now when I run the script, I get the error
Error: No running window found
Even if I already have a Firefox window open. I've also tried this script.

#! /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("mozilla-firefox -remote 'openURL(" + URL + ",new-window)'")
else:
os.popen2("mozilla-firefox " + URL)

But neither works correctly. Both will open a Firefox window if one is not open, but both fail if one is already open because they can't find the running window. Did they change something about the way the -remote flag works in 0.9? Has anyone found a working launch script?
 
Old 06-17-2004, 02:38 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Yes, they've been hacking at the script that launches Firefox http://bugzilla.mozilla.org/show_bug.cgi?id=177996 I find the firefox script attached to comment #79 on that bug http://bugzilla.mozilla.org/attachme...44&action=view works well for me. Save the page to your computer, make the script executable, rename it firefox and swap it for the firefox script in the firefox folder. I prefer to change the # comment from line 188 to 189 so it opens URL's in new tabs but it's up to you.
 
Old 06-17-2004, 02:45 PM   #3
Pathian
Member
 
Registered: Sep 2003
Location: Dayton, Ohio and Hoffman Estates, IL
Distribution: Slackware 9.1 (laptop) Mandrake 9.2 (desktop)
Posts: 58

Original Poster
Rep: Reputation: 15
Ah, Thanks for the help, I also found a kludge solution by making a script that does...

#!/bin/bash
rm /home/magician/.mozilla/firefox/default.p95/lock
mozilla-firefox "$@"

but I don't like it as much because it opens a new window instead of a tab
 
  


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
gnome launcher for intellij shell script loopyzort Linux - Software 1 08-24-2009 12:46 PM
How do I create application launcher using bash script msgclb Programming 2 01-30-2005 06:28 AM
CVSWineX update script/launcher error breun006 Linux - Games 1 09-02-2004 08:24 PM
open new firefox window from launcher (using tabbrowser extensions) captain-cat Linux - Software 1 06-27-2004 08:02 AM
gnome-terminal launcher script Mur Linux - Software 0 04-26-2004 10:43 AM


All times are GMT -5. The time now is 01:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration