|
|
![]() |
|
|
Top | #1 |
|
Glaanies script monkey
Joined: February 2003
Location: Chicago
Posts: 2,725
Reputation: 1520
Power: 155 |
Code:
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/mozilla-firefox"
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if $MOZILLA_FIVE_HOME/mozilla-xremote-client -a firefox openURL\("$url",new-tab\); then
exit 0
fi
exec $MOZILLA_FIVE_HOME/firefox "$url"
user_pref("network.protocol-handler.app.http", "/path/to/firefox_newtab.sh"); I am assuming that this works for mozilla in the exact same manner, by changing the FIVE_HOME path to mozilla's and the line to mozilla-xremote-client -a mozilla openURL etc; also, I would assume that you could remove the /usr/bin/mozilla binary and replace it with the shell script, and not need to point to the script then. |
|
|
|
|
|
Top | #2 |
|
Dominus
Joined: March 2002
Location: Minnesota, USA
Posts: 1,570
Reputation: 660
Power: 146 |
Nice tip. Thanks!
|
|
|
|
|
|
Top | #3 |
|
Beware the G-Man
Joined: March 2002
Location: XP-erience, NTFS, OSNN, Bay Area, California
Posts: 18,474
Reputation: 4070
Power: 348 |
You might want to post this info in this thread also.
![]() http://www.osnn.net/forum/showthread.php?t=2466 |
|
|
|
|
|
Top | #4 |
|
Tech Junkie
Joined: April 2002
Location: New York City
Posts: 13,256
Reputation: 4260
Power: 298 |
Very nice tip! Thanks
|
|
|
|
|
|
Top | #5 |
|
*
Joined: December 2001
Location: USA
Posts: 6,496
Reputation: 2808
Power: 220 |
Code:
#!/usr/local/bin/bash
export MOZILLA_FIVE_HOME=/usr/X11R6/lib/firefox/bin/:/usr/X11R6/lib/firefox/lib/mozilla-1.6/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
# get URL to load
url=$1; [ -z $url ] && url=about:blank
what=$2;
if [ -z $what ]; then
/usr/X11R6/lib/firefox/lib/firefox-0.9/mozilla-xremote-client -a firefox openURL\($url\,new-window\) && exit 0
else
/usr/X11R6/lib/firefox/lib/firefox-0.9/mozilla-xremote-client -a firefox openURL\($url\,$what\) && exit 0
fi
# if xremote failed, then launch the browser
exec /usr/X11R6/lib/firefox/bin/firefox $url &
firefox-starter <url> <type> (new-tab, or new-window) If no URL or type is given, it starts a browser window with a blank screen (about:blank) if only URL is given, it opens a new browser window with that in it. If given new-tab it opens a new tab, and if new-window is set, a new-window (same as not defining it). Enjoy .(Sorry for the hardcoded stuff, change it as you deem fit, it is cause mozilla-xremote-client is not in the same place as firefox the startup script) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Your Top 5 Tabs Always Open | Bman | Green Room | 8 | May 31st, 2007 4:27am |
| Mozilla Firefox 1.0.5 released | NetRyder | Windows Desktop Systems | 7 | July 13th, 2005 5:14am |
| mozilla (firefox) ? | mooo | Green Room | 12 | April 5th, 2005 9:57pm |
| Mozilla Firefox 1.0.2 Final | Lee | Windows Desktop Systems | 12 | March 24th, 2005 2:00am |
| open in tabs | bluzeboy | Windows Desktop Systems | 4 | August 2nd, 2003 3:39am |