LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-03-2005, 02:35 PM   #1
digitalhead
Member
 
Registered: Jun 2004
Location: West Virginia, US, Earth, Milky Way
Distribution: Ubuntu
Posts: 121

Rep: Reputation: 15
Open URLs from Thunderbird in Firefox


I have posed this question to the MozillaZine forums with no progress, so I figured I would try here. I am using Slackware 10.0, and when I click on a link in Thunderbird, it does nothing. I need to know how to tell Thunderbird to point URLs to Firefox so I don't have to copy/paste or drag/drop the URL. I have tried a user.js script in the profile directories for both....

Firefox:
Code:
user_pref("network.protocol-handler.app.mailto","/usr/bin/thunderbird");
Thunderbird:
Code:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

I was also informed about this...
Quote:
From MozillaZine Knowledge Base

Configure each external program to pass the URL to this Bourne shell script:

Code:
#!/bin/sh
#
# This script allows external apps to open new URLs in Firefox
# or open a new instance of Firefox if it isn't already started
#
/path/to/firefox/firefox -a firefox -remote "openURL($@,new-tab)" ||
exec /path/to/firefox/firefox "$@";
This shell script takes advantage of the Mozilla IPC protocol to either open the external URL in an already active Firefox instance, or start a new instance of Firefox.
I have no idea how to implement this though. If anybody knows how to make this work, or if there's another way for my links to work, please let me know.
 
Old 03-04-2005, 02:04 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
The script I use is /usr/local/bin/fftab:
Code:
#!/bin/sh

export MOZILLA_FIVE_HOME="/opt/firefox/current"

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

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

$MOZILLA_FIVE_HOME/firefox "$url"

exit 0
Then in your thunderbird prefs.js file add:
user_pref("network.protocol-handler.app.ftp", "/usr/local/bin/fftab");
user_pref("network.protocol-handler.app.http", "/usr/local/bin/fftab");
user_pref("network.protocol-handler.app.https", "/usr/local/bin/fftab");
 
Old 03-04-2005, 02:13 PM   #3
digitalhead
Member
 
Registered: Jun 2004
Location: West Virginia, US, Earth, Milky Way
Distribution: Ubuntu
Posts: 121

Original Poster
Rep: Reputation: 15
I'm guessing I should replace "/opt/firefox/current" with "/usr/local/firefox/firefox" if that's where I have Firefox installed?

I understand the prefs.js script you mentioned, but what all would I have to alter to suit my settings from the fftab script?
 
Old 03-04-2005, 02:18 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
You should just need to set /opt/firefox/current to the directory you have firefox installed to.

Also remember to make the script executable:
chmod 755 /usr/local/fftab

The other thing to note is that thunderbird must be closed before making changes to the prefs.js file.
 
Old 03-04-2005, 02:50 PM   #5
digitalhead
Member
 
Registered: Jun 2004
Location: West Virginia, US, Earth, Milky Way
Distribution: Ubuntu
Posts: 121

Original Poster
Rep: Reputation: 15
Still no luck. Added the settings exactly as listed except changed fftab's "/opt/firefox/current" to '/usr/local/firefox" and also tried "/usr/local/firefox/firefox" to point to the actual executable for Firefox. Also made the fftab script executable like you said, and removing the user.js scripts I created earlier just to make sure that didn't effect it.
 
Old 03-04-2005, 03:02 PM   #6
digitalhead
Member
 
Registered: Jun 2004
Location: West Virginia, US, Earth, Milky Way
Distribution: Ubuntu
Posts: 121

Original Poster
Rep: Reputation: 15
Okay, solved this problem by trying this code in the fftab just to see if it worked, and it did!

Code:
#!/bin/sh
#
# This script allows external apps to open new URLs in Firefox
# or open a new instance of Firefox if it isn't already started
#
/usr/local/firefox/firefox -a firefox -remote "openURL($@,new-tab)" ||
exec /usr/local/firefox/firefox "$@";
Maybe this will help somebody else too.

-digitalhead
 
Old 03-04-2005, 04:03 PM   #7
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 31
Great tips here.

Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browsers won't open correct urls in pine or thunderbird lkriho Linux - Software 3 11-12-2004 03:40 PM
Thunderbird and Firefox, Thunderbird doesnt launch firefox? sovietpower Slackware 1 11-01-2004 01:51 PM
Forcing thunderbird to open firefox Acadien Linux - General 2 09-08-2004 04:40 PM
Trying to get Thunderbird to open urls by using Firefox 0.9 Clived Linux - General 3 08-03-2004 10:03 AM
Open gaim urls in new firefox tab Celettu Linux - Newbie 2 07-10-2004 03:24 PM


All times are GMT -5. The time now is 06:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration