how to put mozilla linking to a email client?

Discussion of features in Mozilla Firefox
Post Reply
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

martinf wrote:well i've read every post on this thread and still can't get mozex to open thunderbird in Linux...any other ideas?

What does you entry in MozEx look like? Maybe we can take it from there.
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
User avatar
David James
Posts: 1321
Joined: November 4th, 2002, 10:19 pm
Location: Ottawa, Ontario, Canada
Contact:

Post by David James »

Step-by-step:

Copy the following code that asterix provided (which I have altered only slightly), paste it into a text editor.

Code: Select all

#!/bin/sh
#
#script author: asterix
#http://forums.mozillazine.org/viewtopic.php?p=136157#136157

export MOZILLA_FIVE_HOME=/usr/local/thunderbird

if [ $(ps aux | grep thunderbird | wc -l) -gt 4 ]; then
# thunderbird is running (thunderbird est lance)
        $MOZILLA_FIVE_HOME/thunderbird -remote "mailto($1?subject=$2)"
else
# thunderbird is not running (thunderbird n'est pas lance)
        $MOZILLA_FIVE_HOME/thunderbird -P default -compose mailto:$1?subject=$2;fi

I'm assuming that you've got the thunderbird directory in /usr/local. If you've put it somewhere else, then change as appropriate the export line. Save it as thunderbird-mailto.sh somewhere convenient, such as your home directory.

Next, make the script executable

Code: Select all

chmod +x /path/to/thunderbird-mailto.sh


Finally, with Mozex installed, enter the following into the Mozex settings dialog and be sure that Mozex intercepts mailto: links

Code: Select all

/path/to/thunderbird-mailto.sh %a %s


There, you should be able to open up Thunderbird's composer window from a <a href="mailto:foo@bar.net?subject=Test">mailto link</a>, though you might have to restart Firebird first.

Also, make sure Mozilla isn't running, since Moz will somehow take over. Additionally, Composer can be *very* slow to launch, especially if Thunderbird isn't running. That is why I use kmail for this instead.
Pinball-Firefox maintainer.
http://david.jamesnet.ca/
Debian Sid, KDE 3.3
User avatar
martinf
Posts: 35
Joined: July 6th, 2003, 10:47 pm
Contact:

Post by martinf »

David James, you are a godsend...works fine now.
<a href="http://www.martinworld.net/images/newsig.jpg" alt="www.martinworld.net" />
User avatar
Ponder_Stibbons
Posts: 70
Joined: July 22nd, 2003, 4:20 pm
Location: Germany

Post by Ponder_Stibbons »

hello,
this script is working fine for me if thunderbird isn't running. But if thunderbird is running firebird sais: mailto is not a registered protocol.
Any Ideas? :-)
Greetings Ponder
User avatar
David James
Posts: 1321
Joined: November 4th, 2002, 10:19 pm
Location: Ottawa, Ontario, Canada
Contact:

Post by David James »

Have you restarted Firebird since making the changes to Mozex? I think I recall seeing something similar on the first run through.
Pinball-Firefox maintainer.
http://david.jamesnet.ca/
Debian Sid, KDE 3.3
jnif
Posts: 25
Joined: August 1st, 2003, 10:39 am

Post by jnif »

I am wondering if anyone knows of a function/extension that will email a frame in mozilla? For example, you would right click the frame/page and an option to email the frame would exist in the context menu.....

thanks
User avatar
Ponder_Stibbons
Posts: 70
Joined: July 22nd, 2003, 4:20 pm
Location: Germany

Post by Ponder_Stibbons »

David James wrote:Have you restarted Firebird since making the changes to Mozex?

Yes I restartet firebird several times since making changes.
It doesn't help. Any more ideas? :-)
Thx Ponder
brewerth
Posts: 9
Joined: August 15th, 2003, 4:29 pm

Post by brewerth »

I followed your directions to create the script, which itself works fine. If I just execute the script it dutifully opens up a nice Compose window in T-Bird. However, whenever I try to actually use it in Firebird, it says that the script file does not exist. I'm sure that I got the paths correct. Any ideas?
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

brewerth wrote:I followed your directions to create the script, which itself works fine. If I just execute the script it dutifully opens up a nice Compose window in T-Bird. However, whenever I try to actually use it in Firebird, it says that the script file does not exist. I'm sure that I got the paths correct. Any ideas?

Let's just make sure... what did you put as your full path?
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
brewerth
Posts: 9
Joined: August 15th, 2003, 4:29 pm

Post by brewerth »

/home/tom/thunderbird/mailto.sh

If I type just that from the command line (assuming I'm at /.) it executed the script perfectly.

Thank you for your assistance.
User avatar
daihard
Folder@Home
Posts: 16633
Joined: November 17th, 2002, 6:27 pm
Location: Lynnwood, WA
Contact:

Post by daihard »

brewerth wrote:/home/tom/thunderbird/mailto.sh

If I type just that from the command line (assuming I'm at /.) it executed the script perfectly.

You're using the MozEx extension, correct? The path looks good to me, except you probably need to throw in parameters such as the subject (%s) and e-mail address (%a).
Kubuntu 8.04 (kernel 2.6.24-25-generic) / KDE 3.5.10
CentOS 4.8 (kernel 2.6.9-78.0.22.ELsmp) / KDE 3.5.10
Mac OS X 10.6.1 (Snow Leopard) / iPhone 3GS (32GB black)
User avatar
David James
Posts: 1321
Joined: November 4th, 2002, 10:19 pm
Location: Ottawa, Ontario, Canada
Contact:

Post by David James »

brewerth wrote:/home/tom/thunderbird/mailto.sh

If I type just that from the command line (assuming I'm at /.) it executed the script perfectly.

The only thing that I can think of is that you may not have made the script executable, though I'm surprised it would run at all if that was the case. Can you run it from an upper dir, in your case, /home/tom (try running thunderbird/mailto.sh)?
Pinball-Firefox maintainer.
http://david.jamesnet.ca/
Debian Sid, KDE 3.3
brewerth
Posts: 9
Joined: August 15th, 2003, 4:29 pm

Post by brewerth »

Yes Sir, if I run:

[tom@localhost tom]$ thunderbird/mailto.sh

it works.

I'm just going to bag-it for the time being and go back to Mozilla. I'm sure in the near future the Firebird/Thunderbird people will iron this out.
WooLie
Posts: 2
Joined: March 6th, 2003, 1:02 am
Contact:

Post by WooLie »

Ponder_Stibbons wrote:hello,
this script is working fine for me if thunderbird isn't running. But if thunderbird is running firebird sais: mailto is not a registered protocol.
Any Ideas? :-)
Greetings Ponder


Yup. I had the same problem running fluxbox, and then I happened to try another window manager. I was able to verify that <b>the following WMs do work</b> with the <a href="http://forums.mozillazine.org/viewtopic.php?p=146623&sid=f632d6c6f61477aec89be27d9568cce4#146623">
script David James posted:</a>

KDE
GNOME
Enlightenment
IceWM
FVWM2

The <b>following WMs did not work</b> with the script:

fluxbox
WindowMaker
twm

Not sure what the difference is between how the different WMs view Firebird vs Thunderbird. But when it didn't work Firebird was the app giving the "mailto is not a registered protocol" popup, so the WMs that don't work are sending the message to Firebird instead of Thunderbird. Will look into this further to try to write a fluxbox-safe script.
User avatar
Ponder_Stibbons
Posts: 70
Joined: July 22nd, 2003, 4:20 pm
Location: Germany

Post by Ponder_Stibbons »

I'm using xfce4-beta, may be it will work with xfce4-final(when available). But I don't understand why the wm could be responsible for this :-)
Greetings Mark
Post Reply