Trying To Fix the Intrusive Firefox
|
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
tarball
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
(~/.thunderbird/hd7h4tp9.default/prefs.js):
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".
( Oct 24 2008, 11:25:26 AM PDT ) [Listen] Permalink Comments [4]
Comments are closed for this entry.












Hope you created an SFE recipe for it? :)
Posted by Glynn Foster on October 24, 2008 at 01:58 PM PDT #
If it worked it might be worth it. :-)
Posted by Rich burridge on October 24, 2008 at 02:12 PM PDT #
Hey Rich.
I wasn't able to build wmctrl in OpenSolaris -- and not being all that bothered by this bug, I'm not feeling intellectually curious as to why not. ;-) BUT, I just tried reproducing the bug in Intrepid and without any special settings Firefox stays where it belongs. Seems that if you set "only on this workspace", it is respected -- even by Firefox. But not in OpenSolaris.
So then I checked out Metacity's Changelog:
2008-10-23 Thomas Thurman <tthurman@gnome.org>
Support _NET_WM_STATE_STICKY (i.e. allow third-party apps to decide
whether a window is on all workspaces). Bug found by Ka-Hing
Cheung. Closes #557536.
So I think this metacity fix *may* solve your problem -- and the opening report in the bug cited in the ChangeLog *might* answer the question in your entry(??). :-)
Posted by joanie on October 24, 2008 at 04:34 PM PDT #
Thanks for the browser.tabs.loadDivertedInBackground tip! I don't think that used to exist, and I eventually switched to just opening a new window. Now I can go back to new tab, since it doesn't drag all of firefox into the current desktop any more!
Posted by John Levon on October 24, 2008 at 05:06 PM PDT #