Trying To Fix the Intrusive Firefox
By user12607856 on Oct 24, 2008
You may remember from a previous post, that if I clicked on a hyperlink in Thunderbird, then Firefox would be intrusive and start up on my current desktop.
The "workaround" was to set "browser.tabs.loadDivertedInBackground" to True via "about:config" in Firefox.
Bug 175904 on Ubuntu's Launchpad has been tracking this problem, and on Monday, an interesting workaround appeared from Jeremy Nickurak
I wrote up a script that I call on opening URL's instead of calling firefox directly. It checks to see if there's a firefox window on the current desktop. If there is one, it'll focus it, and open the URL in a new tab there. If there isn't one, it'll just open a new window right where you are.
Hopefully this'll be useful to somebody.
It requires wmctrl to be installed. (sudo apt-get install wmctrl)
The script is attached to the bug. I thought I'd give it a try.
Well there is no equivalent of
sudo apt-get install wmctrl
on my OpenSolaris box at the moment, so I downloaded the
for wmctrl, unpacked it and tried to build it with:
$ gzip -dc wmctrl-1.07.tar.gz | tar -xvf - $ cd wmctrl-1.07 $ ./configure --prefix=/usr $ make $ pfexec make install
Unfortunately it bitched about not having some of the X11 header files, so I had to do:
$ pfexec pkg install SUNWxwinc
before I was able to successfully build and install it.
Now I needed to get Thunderbird to recognize the new firefox-tab script. I put a copy of it in my own personal bin directory and gave it execute permission:
$ cd ~/bin $ mv ~/Desktop/firefox-tab . $ chmod +x firefox-tab
As I previously had set "browser.tabs.loadDivertedInBackground" to True via "about:config" in Firefox, then I had to revert that. I restarted Firefox for good measure.
Then I needed to terminate Thunderbird and
add three lines to the prefs.js file in my current Thunderbird profile
user_pref("network.protocol-handler.app.ftp", "~/bin/firefox-tab"); user_pref("network.protocol-handler.app.http", "~/bin/firefox-tab"); user_pref("network.protocol-handler.app.https", "~/bin/firefox-tab");
I then restarted Thunderbird and clicked on a hyperlink. Even though I had Firefox running on a different workspace with several tabs in it, it started up a new Firefox window on my current workspace (where Thunderbird was running). Hmm.
It's definitely running
~/bin/firefox-tab. It's just not
doing the right thing. If anybody has any ideas why this isn't working,
I'm all ears. For now I've gone back to my previous "workaround".