Differences between version 6 and revision by previous author of MozillaFirefoxStartupScript.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Saturday, June 25, 2005 7:10:59 pm | by GeertVandeweyer | Revert |
Older page: | version 4 | Last edited on Tuesday, March 1, 2005 5:55:09 am | by JoeJarvis | Revert |
@@ -68,8 +68,37 @@
fi
</verbatim>
We also have a copy of DanielLawson's [old Firefox script|http://www.wlug.org.nz/archive/firefox-helper.sh], hacked up to support post-0.8 versions.
+
+-----------------
+EDIT (25-06-2005)
+-----------------
+
+If you have problems with this script, try this part in the last part of it (the script seemed to have problems with the the variable in the grep command), instead of the the long if..... ;then line
+
+<verbatim>
+if ps ux | grep "firefox-bin" | grep -v "grep" &> /dev/null
+then
+#firefox is already running in another window, open in a new tab/new window
+${FIREFOX_PATH}/mozilla-xremote-client -a firefox "openURL($FILE_PATH,$NEW)"&
+</verbatim>
+
+Also, I made the NEW-variable parameter dependent, that gives more flexibility for hotkey configuration. Just replace NEW=new-tab/window with the next few lines. Default remains new-window
+
+<verbatim>
+#apply tab or window on commandline as second argument, otherwise a new window is opened
+if [ "$2" != "" ]
+then
+NEW="new-$2"
+else
+NEW="new-window"
+fi
+</verbatim>
+
+-----------
+End of edit
+-----------
And here's another, which some kind soul can refactor for me please if it's not as good as the first:
Set this script as your URL handler to make it open in a new tab if Firefox is running, or start it if it isn't. Change the <tt>BROWSER</tt> variable to point to your Firefox binary. <tt>DEFAULT_TO_HOMEPAGE</tt> specifies whether new tabs or windows should start with the homepage you've set in your browser -- 0 = no, 1 = yes (only works in browser versions 0.9 and newer). <tt>OPEN_IN_NEW_TAB</tt> specifies how you want [URL]s to open -- 0 = in a new window, 1 = in a new tab.