Author Topic: [SOLVED] Firefox/Thunderbird link handler qestion  (Read 2176 times)

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
[SOLVED] Firefox/Thunderbird link handler qestion
« on: September 07, 2011, 07:42:00 AM »
I am having an already reported issue between TB and FF.

The issue is reported at http://www.pclinuxos.com/forum/index.php/topic,95846.0.html.
If I open Firefox normally, there is no problem, except if the following has happend before opening it.
If I open a link in Thunderbird, Firefox say it's not my default browser and I have to say yes to that - every time.
If I close Firefox and not Thunderbird, and click a link again, Firefox does not respond.

Then closing Thunderbird and opening Firefos by it own, it again say it's not the default browser. If I before that, have clicked a link in Thunderbird 20 times - getting angry - then Firefox, when opend by it's own icon, will open that link in 20 diferent tabs. So somehow Firefox register and remember the click, but they first open when Firefox is opened by it's own icon.


I have been trying to follow the advise, by resetting the two mentioned protocal-handlers to the original value ('/usr/lib/thunderbird-6.0.1/open-browser.sh')
in thunderbird goto config editor and reset the http and https protocol handlers back to the original ... make sure FF is the default browser and that should work .. I specifically had to reset those two app handlers

... but then TB does not react to me clicking a link.

I have tried 'mozffremote' and '/usr/bin/firefox', which takes me back to the 'default browser' behaviour, as per above.

Could someone please spell out for me what actually should be set in the two handlers?

Cheers!
CJ
« Last Edit: September 26, 2011, 08:25:59 AM by CJ »

Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
Re: Firefox/Thunderbird link handler qestion
« Reply #1 on: September 08, 2011, 09:40:03 AM »
In Thunderbird go to:  Preferences -> Advanced -> Config Editor

Check the value
Code: [Select]
network.protocol-handler.app.http; /usr/lib/thunderbird-6.0/open-browser.sh
(Note that the version is correct and that the open-browser.sh script exists)

Then run the command:
Code: [Select]
gconftool-2 -g /desktop/gnome/url-handlers/http/command
The result should be /usr/lib/firefox-6.0/firefox "%s"

(Once again check the version)

This value should be set when you say "yes" to make firefox the default browser but if it is not for some reason then you can set it manually with:

Code: [Select]
gconftool-2 --type string --set /desktop/gnome/url-handlers/http/command "/usr/lib/firefox-6.0/firefox \"%s\" "
(take care with the escape quoting)

Hope that helps
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15316
  • ┌∩┐(◕_◕)┌∩┐
Re: Firefox/Thunderbird link handler qestion
« Reply #2 on: September 08, 2011, 09:47:45 AM »
Nice fix TerryN
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Firefox/Thunderbird link handler qestion
« Reply #3 on: September 08, 2011, 11:05:43 AM »
TerryN, thank you for helping out. Sadly, I must report that it didn't do the trick for me, and the behaviour persists.

All followed all your steps, all checks out (only little difference is version 6.0.1 for me).

To recap the behaviour:
Open a email with a link, click on link.
First time, FF opens the page, but complains about not being the default browser. (Say yes to make it so, and keep the checkmark ticked.)
Click again on an email link from TB, nothing happens.
Close FF and re-open it.
It opens one 'New Tab', and a tab for the second link clicked on (if a link has been clicked on more than once - or several links has been clicked - one tab per click opens).

Close TB and FF, reopen, and the whole circus starts from step 1 (including the complaint about FF not being the default browser).


To the best of my knowledge, I have nothing that 'takes over' as being the default browser in between, and have not installed any additional things on the system in quite a while - just updated... I am not sure if this behaviour started on version 6.0 or 6.0.1, sorry.

Cheers!
CJ

Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
Re: Firefox/Thunderbird link handler qestion
« Reply #4 on: September 10, 2011, 07:42:09 AM »
Strange behavior indeed  :)

I'm wondering if you have 2 instances of Firefox installed somehow.  Have you only installed/updated Firefox from the repo (i.e. not used Firefox's own updater tool) ?

One way to check would be to do a "ps -ef | grep firefox" in a terminal window at each stage and check the path for firefox is the same at each stage.
« Last Edit: September 10, 2011, 07:44:01 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Firefox/Thunderbird link handler qestion
« Reply #5 on: September 14, 2011, 10:07:11 AM »
TerryN, sorry for the delay... to be honest, I was kind of hoping that the update to 6.0.2 would fix things, but alas, no such luck.

To answer your question, yes, I only install from the repo.

I tried running the command. Having just this page open, this is what I get:
Code: [Select]
$ ps -ef | grep firefox
cj        3083     1  5 17:04 ?        00:00:01 /usr/lib/firefox-6.0.2/firefox-bin http://www.pclinuxos.com/forum/index.php?topic=96708.new;topicseen#new
cj        3158  3119  0 17:04 pts/1    00:00:00 grep --color firefox

I does look like two instances, but what is the second one?

Cheers!
CJ

Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
Re: Firefox/Thunderbird link handler qestion
« Reply #6 on: September 14, 2011, 10:23:57 AM »
I does look like two instances, but what is the second one?

No it's OK.   The second line is the grep command itself.
However, it is slightly odd that the firefox process is a child of init (how did you start firefox?)

If you only update via the repo there shouldn't be an issue but what I meant was to run the "ps -ef | grep firefox" at each stage of the steps you outlined before.  So:

Run the command initially to see if firefox is already running

then:

Quote
Open a email with a link, click on link.
First time, FF opens the page, but complains about not being the default browser. (Say yes to make it so, and keep the checkmark ticked.)

run the command now

Quote
Click again on an email link from TB, nothing happens.

Run command again

Quote
Close FF and re-open it.
It opens one 'New Tab', and a tab for the second link clicked on (if a link has been clicked on more than once - or several links has been clicked - one tab per click opens).

Check again.

Also what was the result of running:
Code: [Select]
gconftool-2 -g /desktop/gnome/url-handlers/http/command
I'm hoping this will give me a clue as to what is happening.

Terry.
« Last Edit: September 14, 2011, 10:31:59 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Firefox/Thunderbird link handler qestion
« Reply #7 on: September 14, 2011, 12:31:43 PM »
TerryN,

When I run the default browser check, I get the following:

[darrel@Duron ~]$ gconftool-2 -g /desktop/gnome/url-handlers/http/command
/usr/lib/firefox-6.0.2/firefox %s
[darrel@Duron ~]$

CJ,

I encountered the same problem with Thunderbird-Firefox. What I did to turn off Firefox's nagging is to go into the Firefox preferences, Advanced section, General tab. Uncheck the "Always check to see if Firefox is the default ...". Then click the Check Now button. Answer the prompt, if there is one. Firefox should stop nagging for the default browser check. When Firefox is updated, you will need to click the Check Now button again, but only once.


Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline craesz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 983
Re: Firefox/Thunderbird link handler qestion
« Reply #8 on: September 20, 2011, 11:29:48 AM »
Mine says:

Code: [Select]
[chris@new-host ~]$ gconftool-2 -g /desktop/gnome/url-handlers/http/command
thunderbird %s
[chris@new-host ~]$

I know I have not messed with any of this. I am having issues with thunderbird, apparently, running in the background (??) because when I go to System Activity there are numerous "thunderbird-bin" processes that come and go but are never truly gone. Even when I close thunderbird.

I just closed it and this is what I had:



The processes come and go. I've rebooted several times and the issue persists. I also get this popup from time to time.



Once I kill all the processes, this popup stops. Finally, the link between thunderbird and firefox does not work... as with the OP.
« Last Edit: September 20, 2011, 11:32:09 AM by craesz »
Desktop1: AMD64 8450 [3 core]; 8GB; 3.2.18-pclos2.pae.bfs; KDE
Desktop2: AMD64 5400 [8 core]; 16GB; 3.2.16-a64; KDE
Netbook: EeePC 901; Atom N270; 1GB; 2.6.33.7-pclos6.bfs; KDE


Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
Re: Firefox/Thunderbird link handler qestion
« Reply #9 on: September 20, 2011, 12:54:36 PM »
Well it appears you have Thunderbird (which is a MAIL/NEWS client) set as your default BROWSER so it gets started every time you click a link (in a non-browser app) or something "runs" a URL.  Which is not good   :(

I would recommend you carry out the procedure in Reply #7 above and it should get set correctly.

Terry
« Last Edit: September 20, 2011, 02:06:10 PM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline craesz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 983
Re: Firefox/Thunderbird link handler qestion
« Reply #10 on: September 20, 2011, 04:00:03 PM »
How does something like this happen?? Can't find anything in Reply #7 that looks like it would help. Did the command line info in TerryN's post... I use KDE not Gnome so it seemed weird but I did it anyway. It now shows firefox correctly but I still don't have the link working correctly from emails. I've changed the network.protocol setting above (all of them) still doesn't work.
« Last Edit: September 20, 2011, 04:27:19 PM by craesz »
Desktop1: AMD64 8450 [3 core]; 8GB; 3.2.18-pclos2.pae.bfs; KDE
Desktop2: AMD64 5400 [8 core]; 16GB; 3.2.16-a64; KDE
Netbook: EeePC 901; Atom N270; 1GB; 2.6.33.7-pclos6.bfs; KDE


Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Firefox/Thunderbird link handler qestion
« Reply #11 on: September 22, 2011, 05:10:20 PM »
Terry, again sorry for the delay, be away from the machine...

No it's OK.   The second line is the grep command itself.

 ::) Duh, it is there, right in front of my nose, and I miss it!  :D


Before continuing, I should mention - thought I did, but alas - that I am using KDE!


If you only update via the repo there shouldn't be an issue but what I meant was to run the "ps -ef | grep firefox" at each stage of the steps you outlined before.  So:
[...]

Thank you for taking the time to try to help me out, much appreciated. I have followed your suggested steps, with the command in between each and every one of them. There are no surprises, and only one instance all the way... except when FF isn't running, and there is no instance showing.

When starting - first time - from TB:
Code: [Select]
cj        3169     1 15 23:50 ?        00:00:00 /usr/lib/firefox-6.0.2/firefox-bin http://www.pclinuxos.com/forum/index.php?topic=96708.new;topicseen#new
When TB links are non-responsive and FF is started from e.g. desktop icon:
Code: [Select]
cj        3413  2518 19 23:51 ?        00:00:01 /usr/lib/firefox-6.0.2/firefox-bin
In between, it's just the grep line alone, i.e. no other instance of FF running.


Also what was the result of running:
Code: [Select]
gconftool-2 -g /desktop/gnome/url-handlers/http/command

Code: [Select]
gconftool-2 -g /desktop/gnome/url-handlers/http/command
/usr/lib/firefox-6.0.2/firefox %s


I'm hoping this will give me a clue as to what is happening.

Hope it will, as I am clueless...  ;)
Thanks again!


I encountered the same problem with Thunderbird-Firefox. What I did to turn off Firefox's nagging is to go into the Firefox preferences, Advanced section, General tab. Uncheck the "Always check to see if Firefox is the default ...". Then click the Check Now button. Answer the prompt, if there is one. Firefox should stop nagging for the default browser check. When Firefox is updated, you will need to click the Check Now button again, but only once.


DJohnston, thanks for the suggestion. I was reluctant at first, as I wanted to understand why this happens - and have it fixed - but the pester factor won over and I did what you suggested... it actually turned out worse, in some sense: The same behaviour with TB persisted; on top of that, when closing one of multiple tabs (using CTRL-W), it started closing down FF itself (i.e. with all open tabs).
Why this should happen, I have no idea - It simply does not make sense! Anyway, for this reason, I reverted back to having the check enabled.
Thanks anyway, it was worth a shot!


****

Wondering... maybe I should try that old chestnut of either deleting the firefox folder in home; or even try creating another user... just to confirm if the behaviour is global.
Shall post this, then try and report back.

Cheers!
CJ

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Firefox/Thunderbird link handler qestion
« Reply #12 on: September 22, 2011, 05:17:30 PM »
Wondering... maybe I should try that old chestnut of either deleting the firefox folder in home; or even try creating another user... just to confirm if the behaviour is global.
Shall post this, then try and report back.

No. As expected, no difference.
(I thought I would give it a go, if nothing else to rule out that any of the add-ons could be a fault.)

Online TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
Re: Firefox/Thunderbird link handler qestion
« Reply #13 on: September 23, 2011, 11:47:20 AM »
OK, I think I know what is going on now  :)

Actually, djohnston was spot on with the solution:

I encountered the same problem with Thunderbird-Firefox. What I did to turn off Firefox's nagging is to go into the Firefox preferences, Advanced section, General tab. Uncheck the "Always check to see if Firefox is the default ...". Then click the Check Now button. Answer the prompt, if there is one. Firefox should stop nagging for the default browser check. When Firefox is updated, you will need to click the Check Now button again, but only once.

However, there is an important caveat.  You must NOT do this from a firefox browser which has been invoked from Thunderbird!!.   If you do, then your "default browser" gets set to Thunderbird (as craesz has discovered).  This leads to all sorts of silliness which we have discovered in this thread.

Therefore, my recommendation is:

1) Start Firefox from the desktop
2) Untick the "Always check....."
3) Do the "Check Now" and set if necessary

That should solve these issues.

Terry
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline CJ

  • Sr. Member
  • ****
  • Posts: 454
Re: Firefox/Thunderbird link handler qestion
« Reply #14 on: September 23, 2011, 02:40:22 PM »
OK, I think I know what is going on now  :)

Actually, djohnston was spot on with the solution:

I encountered the same problem with Thunderbird-Firefox. What I did to turn off Firefox's nagging is to go into the Firefox preferences, Advanced section, General tab. Uncheck the "Always check to see if Firefox is the default ...". Then click the Check Now button. Answer the prompt, if there is one. Firefox should stop nagging for the default browser check. When Firefox is updated, you will need to click the Check Now button again, but only once.

However, there is an important caveat.  You must NOT do this from a firefox browser which has been invoked from Thunderbird!!.   If you do, then your "default browser" gets set to Thunderbird (as craesz has discovered).  This leads to all sorts of silliness which we have discovered in this thread.

Therefore, my recommendation is:

1) Start Firefox from the desktop
2) Untick the "Always check....."
3) Do the "Check Now" and set if necessary

That should solve these issues.

Terry

Sounds almost too good to be true!  :)
Just to get one little thing straight before I try. When you say:
...set if necessary...
... you mean un-check the 'always etc.', or...?

CJ