LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 09-11-2004, 12:04 PM   #1
Liakoni
Member
 
Registered: Aug 2003
Location: Greece
Distribution: Ubuntu Feisty PPC, Ubuntu Feisty x86
Posts: 49

Rep: Reputation: 15
FireFox and mailto


Can anyone tell me how to setup thunderbird to be the default mail client for Firefox?
Now the default is Evolution...
 
Old 09-19-2004, 01:01 PM   #2
legolin
Member
 
Registered: Dec 2003
Location: munich
Distribution: Fedora Core 4
Posts: 141

Rep: Reputation: 15
hey, your post is very old, but i'm having the same problem right now... have you solve the problem allready? how?

thankx,

leg
 
Old 09-19-2004, 02:08 PM   #3
Liakoni
Member
 
Registered: Aug 2003
Location: Greece
Distribution: Ubuntu Feisty PPC, Ubuntu Feisty x86
Posts: 49

Original Poster
Rep: Reputation: 15
Unfortunatelly, i dont't have the solution to the problem yet.
But i haven't search a lot...
 
Old 09-19-2004, 02:14 PM   #4
z-vet
Member
 
Registered: Aug 2004
Location: Israel
Distribution: Ubuntu 10.10
Posts: 271

Rep: Reputation: 34
Here is a solution:
Create subdir in your home directory called scripts. Copy a following script and save it there,call it start-thunderbird.sh
Code:
#!/bin/bash
export tb=/path/to/thunderbird  
url="$1"
url=`echo "$url" | sed -e's/^mailto://'`
$tb -remote "mailto($url)" || exec $tb -P default -compose $1
Change a /path/to/thunderbird with yours...
In Firefox' address bar type about:config and hit enter.Create new preference of type string named network.protocol-handler.app.mailto and set it's value to full path to start-thunderbird.sh script.
Enjoy!

Last edited by z-vet; 09-19-2004 at 02:15 PM.
 
Old 09-19-2004, 02:57 PM   #5
legolin
Member
 
Registered: Dec 2003
Location: munich
Distribution: Fedora Core 4
Posts: 141

Rep: Reputation: 15
hi z-vet,

i did not understand what you where telling me. i have to write on the adressbar :config???

it didn't work... i guess i'm doing something wrong

how do i create a new preference? can i just edit the ~/.mozilla/firefox/whatever/prefs.js and add a new line like this:
user_pref("network.protocol-handler.app.mailto", /path/2/script);


???


thankx a lot,


leg
 
Old 09-19-2004, 03:08 PM   #6
z-vet
Member
 
Registered: Aug 2004
Location: Israel
Distribution: Ubuntu 10.10
Posts: 271

Rep: Reputation: 34
Hi,legolin.
Type "about:config" in addressbar.It gives you a possibility to edit your prefs.js from within Firefox.
 
Old 09-19-2004, 10:26 PM   #7
warren1715
LQ Newbie
 
Registered: Mar 2004
Location: Louisiana
Distribution: Mandrake 10
Posts: 8

Rep: Reputation: 0
I changed mine by starting 'gnome-control-center', go to 'Advanced' then 'File types and programs'
open 'Internet Services' and find mailto. If you dont have mailto then firefox will say 'not registered protocol' and you can create it. Highlight mailto and edit it. Protocol is 'mailto', Program is 'thunderbird "%s"' or whatever you want.

Last edited by warren1715; 09-20-2004 at 06:19 PM.
 
Old 09-20-2004, 11:22 AM   #8
z-vet
Member
 
Registered: Aug 2004
Location: Israel
Distribution: Ubuntu 10.10
Posts: 271

Rep: Reputation: 34
warren1715
And when you click on mailto: link in Firefox Thunderbird opens "Compose new mail"?
 
Old 09-20-2004, 06:09 PM   #9
warren1715
LQ Newbie
 
Registered: Mar 2004
Location: Louisiana
Distribution: Mandrake 10
Posts: 8

Rep: Reputation: 0
Mine works perfectly. Check your syntax. If thunderbird is installed in /usr/local/thunderbird/ directory for example the settings should be as follows:

Protocol mailto
Program /usr/local/thunderbird/thunderbird "%s"

It may help to delete the old mailto and create a new one.

Last edited by warren1715; 09-20-2004 at 06:17 PM.
 
Old 09-21-2004, 05:50 AM   #10
Liakoni
Member
 
Registered: Aug 2003
Location: Greece
Distribution: Ubuntu Feisty PPC, Ubuntu Feisty x86
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks z-vet it worked just fine...
 
Old 10-06-2004, 03:43 PM   #11
leonya
LQ Newbie
 
Registered: Apr 2004
Location: NH/Boston
Distribution: Fedora Core 3
Posts: 9

Rep: Reputation: 0
The script suggested earlier in this thread doesn't work for me anymore in Thunderbird 0.8.
For some reason "thunderbird -remote" no longer works for me.

I had to create a new script as follows:
Code:
#!/bin/sh
#
export MOZILLA_TB_HOME=/path/to/thunderbird
 
#firefox sends URLs in form "mailto:author@site.com"
url=`echo "$1" | sed -e's/^mailto://'`
 
if $MOZILLA_TB_HOME/mozilla-xremote-client -a Thunderbird 'ping()'
then
# thunderbird is running
         $MOZILLA_TB_HOME/mozilla-xremote-client -a Thunderbird "mailto($url?subject=$2)"
else
# thunderbird is not running
        $MOZILLA_TB_HOME/thunderbird -P default -compose "mailto:$url?subject=$2";
fi
I also created another script to open Thunderbird, or refocus if already running:
Code:
#!/bin/sh

export MOZILLA_TB_HOME=/path/to/thunderbird

if $MOZILLA_TB_HOME/mozilla-xremote-client -a Thunderbird 'ping()'
then
 #echo "thunderbird running"
 $MOZILLA_TB_HOME/mozilla-xremote-client -a Thunderbird 'xfeDoCommand (openInbox)'
else
 #echo "thunderbird not running"
 $MOZILLA_TB_HOME/thunderbird &
fi

Last edited by leonya; 10-06-2004 at 03:49 PM.
 
Old 10-23-2004, 08:15 AM   #12
Riichard
Member
 
Registered: Sep 2003
Location: 3rd Rock
Distribution: Mepis 6.5.02
Posts: 106

Rep: Reputation: 15
Im trying to get Thunderbird to open a new message when clicking on a email address.
This works the best for me
Quote:
Originally posted by z-vet

Code:
#!/bin/bash
export tb=/path/to/thunderbird  
url="$1"
url=`echo "$url" | sed -e's/^mailto://'`
$tb -remote "mailto($url)" || exec $tb -P default -compose $1
but doesnt add the email address to the message I want to send it just opens a new message.
I am trying to add this script to KDE's component chooser as preffered email application
 
Old 11-02-2004, 12:55 PM   #13
RussellEast
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Rep: Reputation: 0
Smile

I found that, for FF v1.0PR, it is sending the following URL to the mailto script:
mailto:author@site.com?subject=...?body=...

Accordingly, I changed the script provided by leonya to the following, which works nicely for me, after making the necessary changes in FireFox's "about:config". You can see the "echo" statement I used to figure out what was going on.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#!/bin/bash
# script used by FireFox to compose a mail.
# firefox apparently sends args in form:
# mailto:author@site.com?subject=...?body=...

export MOZILLA_TB_HOME="/path/to/thunderbird"
TB=$MOZILLA_TB_HOME/thunderbird
REMOTE_TB=$MOZILLA_TB_HOME/mozilla-xremote-client

# echo "Firefox mailto: $*" >> $HOME/log.txt

MAILTO_URL="$1"
RECIPIENT=`echo "$MAILTO_URL" | /bin/sed -s 's/^mailto:\([^?]*\)?.*/\1/'`
OTHER=`echo "$MAILTO_URL" | /bin/sed -s 's/[^?]*?/?/'`

if $REMOTE_TB -a Thunderbird 'ping()' ; then
# thunderbird is running
$REMOTE_TB -a Thunderbird "mailto($RECIPIENT$OTHER)"
else
# thunderbird is not running
$TB -P default -compose "$MAILTO_URL"
fi
exit 0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
Old 11-02-2004, 01:25 PM   #14
RussellEast
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Rep: Reputation: 0
Oops, that script worked only for File/SendLink (which is what I was testing for) and not for a genuine "mailto:..." link in a web page. In any case, the script was unnecessarily complicated. Here's the script that works in both cases (for me). Note that it properly puts in the subject heading and message body when doing a File/SendLink.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#!/bin/bash
# script used by FireFox to compose a mail.

export MOZILLA_TB_HOME="/path/to/thunderbird"
TB=$MOZILLA_TB_HOME/thunderbird
REMOTE_TB=$MOZILLA_TB_HOME/mozilla-xremote-client

#echo "Firefox mailto: $*" >> $HOME/log.txt

MAILTO_URL="$1"
MAIL_DATA=`echo "$MAILTO_URL" | /bin/sed -s 's/^mailto://'`

if $REMOTE_TB -a Thunderbird 'ping()' ; then
# thunderbird is running
$REMOTE_TB -a Thunderbird "mailto($MAIL_DATA)"
else
# thunderbird is not running
$TB -P default -compose "$MAILTO_URL"
fi
exit 0
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
Old 11-24-2004, 04:28 PM   #15
beanerjo
Member
 
Registered: Aug 2004
Location: New Zealand
Distribution: Slackware
Posts: 40

Rep: Reputation: 15
Thumbs up

Thanks a lot for the tip about "about:config", z-vet! That's what I have been after so darn long.

Last edited by beanerjo; 11-24-2004 at 04:29 PM.
 
  


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
Firefox, mutt, and mailto links rignes Linux - Software 9 12-05-2011 02:38 PM
Firefox, Mailto and Kmail won't work together Joe Bloggs Linux - Newbie 7 11-22-2005 02:14 PM
need help with mailto carboncopy Linux - Software 1 11-21-2005 01:37 AM
associate mailto in firefox to a program true_atlantis Linux - Software 1 04-26-2004 02:39 PM
mailto phil81 Linux - Newbie 8 04-08-2004 08:11 AM


All times are GMT -5. The time now is 01:27 AM.

Main Menu
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