Thunderbird won't open browser

Discussion of general topics about Mozilla Thunderbird
dbwyatt
Posts: 2
Joined: July 31st, 2004, 10:35 am
Location: Oklahoma City OK

tbird not opening links in a browser

Post by dbwyatt »

most of the posts I have read apply to linux and my linux box isn't part of the my network yet, so I'll save those for later. I can't get the links to open , I'm using WinXP, Firefox is default browser, have Opera loaded, and email links were opening in that so I got rid of the email account in Opera, IE is loaded but has no email setup done. Any suggestion??? and yes I'm new to this, which is why my linux box isn't networked yet.
Thanks
leighton67
Posts: 10
Joined: August 23rd, 2004, 10:13 am
Location: Singapore
Contact:

Post by leighton67 »

Hi how about in windows XP? Previously I can click to it but when I open T-Bird now it cannot. Any help please?
dbwyatt
Posts: 2
Joined: July 31st, 2004, 10:35 am
Location: Oklahoma City OK

opening links in Tbird in Windows ZP

Post by dbwyatt »

I was unable to open the links in my email, so having no idea what i what I was doing I went to Internet Explorer > tools> advanced> and changed something...bad part is, it was late and I don't remember what I changed. But the links in Tbird open up in firfox now, very slight delay, but they do open.
TronDD
Posts: 1
Joined: September 19th, 2004, 7:09 pm

Post by TronDD »

I'm having a problem getting Thunderbird (0.8) to open URLs in Firefox (0.9.3)

The scripts call mozilla-xremote-client The problem is that program fails when Thunderbird is running.

If Thunderbird is running, attempting to send a URL to mozilla-xremote-client results in an error 509

$ /usr/lib/MozillaFirefox/mozilla-xremote-client openURL\("http://www.google.com"\)
/usr/lib/MozillaFirefox/mozilla-xremote-client: Error: Failed to send command: 509 internal error

I close Thunderbird, put in the exact same command and it works fine. Same thing whether I run mozilla-xremote-client in the Thunderbird directory or the one in the Firefox directory.

TronDD.
hansmiv
Posts: 2
Joined: September 29th, 2004, 7:05 am
Location: Netherlands

Post by hansmiv »

Beastux wrote:#!/bin/sh

url="$1"

export MOZILLA_FIVE_HOME=/opt/MozillaThunderbird

if [ $(pidof thunderbird-bin | wc -w) -gt 0 ]; then
# thunderbird is running
url=`echo "$url" | sed -e's/^mailto://'`
$MOZILLA_FIVE_HOME/thunderbird -remote "mailto($url)"
else
# thunderbird is not running
$MOZILLA_FIVE_HOME/thunderbird -P default -compose $url
fi

Thank you all for all your knowledge. Eventually I got my FF ( 1.0PR ) and TB ( 0.8 ) working together with your sulutions! My OS is Linux/Mandrake/KDE (3.2).

I got to make one major change in the script above to get all working and one minor one.

The minor one was to add the directory of pidof. I believe this was already mentioned in one of the posts in this topic.
The major thing was this:
OLD: $MOZILLA_FIVE_HOME/thunderbird -remote "mailto($url)"
into
NEW: $MOZILLA_FIVE_HOME/thunderbird -a Thunderbird -remote "mailto($url)"
The source of this trick was found here: http://forums.mozillazine.org/viewtopic.php?t=134289

The result is that all is running fine now.
Again thanks to all who helped me through this.
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

Why don't the Thunderbird and Firefox teams intergrate this kind of functionality? Have they fallen out and stopped talking to each other? It seems natural to want to have both these applications working together - even if they are seperate.

GJ
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

Beastux wrote:RobF, here's what I did to be able to use Firefox as default browser from Thunderbird with my Gentoo (should work with Mandrake too) :

1- Create a shell script called "openlink.sh" in Thunderbird's directory (/opt/MozillaThunderbird for me) containing the following lines :

#!/bin/sh

export MOZILLA_FIVE_HOME="/opt/firefox"

url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi

if $MOZILLA_FIVE_HOME/mozilla-xremote-client openURL\("$url, new-tab"\); then
exit 0
fi
exec $MOZILLA_FIVE_HOME/firefox "$url"

2- chmod +x /opt/MozillaThunderbird/openlink.sh

3- Create a file called user.js in your ~/.thunderbird/default/xxx/ containing :

// Use firefox for http, https & ftp links
user_pref("network.protocol-handler.app.http", "/opt/MozillaThunderbird/openlink.sh");
user_pref("network.protocol-handler.app.https", "/opt/MozillaThunderbird/openlink.sh");
user_pref("network.protocol-handler.app.ftp", "/opt/MozillaThunderbird/openlink.sh");

4- Copy mozilla-xremote-client from /opt/MozillaThunderbird/ to /opt/firefox/

If it works, clicking on a URL in Thunderbird will launch Firefox and if Firefox is allready running, it will open a new tab.

Hope it helps you. :D


In section 3 above it says:

3- Create a file called user.js in your ~/.thunderbird/default/xxx/ containing :


I do not have this folder. I do have one called defaults (note the plural. Is this the same? Also call me incredibly dumb - but why do you appear to have another directory after this called xxx? What is the correct name for this directory?

GJ
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

Man this is very frustrating. Why did these guys divorce themselves to funamentally from each other? Couldn't someone just write a plugin or some kind of extension or something that would fix this?

GJ
User avatar
rworkman
Posts: 640
Joined: March 2nd, 2004, 10:57 pm
Location: Northport, AL (Tuscaloosa)
Contact:

Post by rworkman »

I realize that I'm late arriving to this party, but unless I'm missing something, a lof of people are going around the world for a five minute trip. In an x-terminal, run <b>gnome-default-applications-properties</b> and in the "Web Browser" tab, select "Custom Web Browser," then type <i>/usr/local/firefox/firefox %s</i> (edit as needed to reflect your actual firefox path). That should solve the problem with linking from Thunderbird (or any other email client).
Unfortunately, it doesn't appear to be that simple to go the other way. Using the same process for email client and entering the path to TB (probably <i>/usr/local/thunderbird/thunderbird</i>) will start TB (or switch to it if it's already open), but all of the options I've tried entering after that cause problems...

RW
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

I don't use gnome unfortunately. I still think it's a tad nuts to have so utterly divorced these applications from each other and to have made it so difficult to intergrate them again.

GJ
User avatar
rworkman
Posts: 640
Joined: March 2nd, 2004, 10:57 pm
Location: Northport, AL (Tuscaloosa)
Contact:

Post by rworkman »

I don't use Gnome either - that's not a necessary part of the fix I posted. I don't know <i>why</i> this is the case, but I <i>do</i> know that it makes Firefox load fine from links in Thunderbird when using both KDE and XFCE4, and probably the other window managers as well.
RW
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

No, but it seems you must have gnome installed. I ran this command and it simply said "# gnome-default-applications-properties: command not found."

GJ
pablaasmo
Posts: 22
Joined: April 20th, 2004, 12:25 am
Location: Norway

Post by pablaasmo »

My 2 cents tip :-)

I dicsovered that when moving from 0.7 to 0.8 to 0.9, the behavior of cliking links changed for me.

What I had done when using 0.7 was using the script 'openlink.sh' and editing 'user.js' as described above.
That got it working when using 0.7.

When I moved to 0.8 i forgott to move the 'openlink.sh' to the 0.8 directory. 'user.js' was the same in my profile directory.
The effect was that links was open lika a local file in the tmp catalog. I did not understand what happend since I had forgotten what i
did for 0.7.

Now when I moved to 0.9, clicking on a link did not do anytning. Not even start firefox. I tried to set my prefered application as described, but it did not help.

Then I realised that my 'user.js' pointed to the 'openlink.sh' which did not exist in the 0.9 directory (nor in 0.8 directory).
So I tried to remove the entries in my 'user.js' so that Thunderbird would use my preferd app. as set in Gnome.

That did not help either?

Then I realised that the 'prefs.js' file in my profile directory is saved at exit and restored at startup. In that file the same settings that used to be in my 'user.js' existed.

So what I had to do was to exit Thunderbird and edit 'prefs.js' by removing the same entries that I used to have in my 'user.js'.
Saving the file and restart of Thunderbird made it behave as expected.

Now I can clik on a link in my mail and open my prefered browser (Firefox of course :-) ).
In Firefox 1.0 I also can set the option for prefered behavior as open in tab, existing window or in a new window.

This solved it for me on my Fedora Linux and Gnome platform.
I dont know if it is that same on MS-Windows, but I guess someone using that combo can verify it?

Regards
Per A.
Firefox v2.0
Thunderbird 2.0
Ligthning/Sunbird 0.7pre
Fedora Core 7 (Linux)
Gnome 2.18
User avatar
beta
Posts: 3
Joined: November 24th, 2004, 10:30 am
Location: Italy
Contact:

ALTERNATIVE SOLUTION

Post by beta »

Hi, I've got an alternative solution that seems to be easier...

THUNDERBIRD: Open with firefox an URL contained in an email

1.Go to the .thunderbird directory in your home directory (it is usually an hidden directory like /home/user/.thunderbird)
2.Go your profile directory (with a random-generated name, like this Xbcgev.default). To be sure u're in the correct directory check if a file named "prefs.js" exists.
3. Create an empty file called "user.js". (If it already exists skip this passage)
4. Open "user.js" and write this line (if the file already exists append the line at the end):
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox/firefox");


/usr/bin/firefox/firefox is obviously the path to execute firefox

5.That's all


FIREFOX: open thunderbird when clicking on a "mailto:" link

1.Go to the .mozilla directory in your home directory (it is usually a hidden directory like /home/user/.mozilla or /home/user/.mozilla/firefox)
2.Go your firefox profile directory (with a random-generated name, like this Xbcgev.default). To be sure u're in the correct directory check if a file named "prefs.js" exists.
3. Create an empty file called "user.js". (If it already exists skip this passage)
4. Open "user.js" and write this line (if the file already exists append the line at the end):

user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird/thunderbird");


/usr/bin/thunderird/thunderbird is the path to execute thunderbird

5.That's all

It's really simple and for me it worked perfectly (suse 9.1 personal).
Hope this post could help who, like me, had been googling for hours to find a solution to these problems ;-) Let me know.
Greets :-)
raid517
Posts: 96
Joined: August 20th, 2004, 1:35 am

Post by raid517 »

Thanks very much for your helpful input. I can report that this works - though for some reason it only seems to work for root. I have changed the permission on all the folders and files mentioned to read/write and execute for all and have checked my paths - but all to no effect. I made a file in the below named directories and changed permission on this to rwx for all too:

Code: Select all

user_pref("network.protocol-handler.app.http", "/usr/lib/mozilla-firefox/firefox");


Code: Select all

user_pref("network.protocol-handler.app.http", "/usr/lib/thunderbird/thunderbird");


these are the install directories for both these applications.

Can you please tell me how I can use this fix as a non root user?

GJ
Locked