Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to make mailto: links work with firefox and thunderbird
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
msimplay
Apprentice
Apprentice


Joined: 20 Jun 2004
Posts: 161

PostPosted: Sun Jul 11, 2004 7:05 pm    Post subject: Reply with quote

thanks everyone for this it worked like a charm :)
Back to top
View user's profile Send private message
Mad_Tiger
n00b
n00b


Joined: 15 Feb 2004
Posts: 51

PostPosted: Wed Jul 21, 2004 11:19 am    Post subject: Reply with quote

How can i get into mozex settings?
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Wed Jul 21, 2004 4:18 pm    Post subject: Reply with quote

I've emerged Firefox 9.1, and this no longer works.
Firefox still calls Thunderbird fine. Thunderbird will call firefox if's not already running, but it is running I get "Error: No running window found"
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Wed Jul 21, 2004 4:45 pm    Post subject: Reply with quote

Sounds like a mozilla-launcher problem.

If you grab one of the later branch builds for firefox they have a new startup script which obsoletes the Gentoo mozilla-launcher and lets you launch firefox directly without any extra voodoo scripts . I'm not sure if thunderbird has this script yet or not. There's been some changes in the xremote-client too I believe.

What does your user.js file look like for thunderbird?

I haven't been using the ebuilds for thunderbird or firefox lately because with the pre-compiled versions there seems to be some extra files added when they are emerged which seem to make them work different than when you install manually. I also didn't stay with the newer thunderbird because it segfaulted on me but I'm pretty sure that had to do with something else on my system.

The July 15th build is here which is what I've been using lately with no problems.
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2004-07-15-11-0.9/

Latest branch builds here.
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-0.9/

If you use any of these newer builds ,copy your /opt/firefox directory to a new name then unmerge. After that just unpack the new firefox in opt and replace the searchplugins and plugins directories with the ones from your older version. After that, make /usr/bin/firefox a symlink to /opt/firefox/firefox and then run firefox once as root, exit, and use as normal. Anything wanting to open urls with firefox just needs to be told that "firefox" is what to use. From the command line, something like "firefox http://www.google.com/linux" will launch urls.
Back to top
View user's profile Send private message
r.j.hall
n00b
n00b


Joined: 06 Feb 2003
Posts: 53
Location: London

PostPosted: Wed Jul 28, 2004 1:01 pm    Post subject: Reply with quote

My default action after emerging firefox and thunderbird ~x86 versions and stable, was to call evolution when I clicked on a mail link. Where is the setting that makes it behave that way. I tried evolution but really didn't like it as much as mozilla 1.3 / thunderbird. I can't see any reference to evolution anywhere in the settings. You would have thought the default action would be to behave like mozilla 1.3 and call their own client rather than a third party one.

Also I don't have an entry in about:config for network.protocol-handler.app.mailto I have network.protocol-handler.external.mailto Is that the same thing but a different/new name?

Cheers
Rich
_________________
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
You've read it.
You can't unread it!
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Wed Jul 28, 2004 4:52 pm    Post subject: Reply with quote

You should create a user.js file in your profile directory for adding the proper config lines. You can do this for both thunderbird (to handle urls) and firefox (for the mailto).

I don't know where the default mail handler settings are in Gnome but I'm sure someone can point you to the "simple" hole their tucked away in. ;)
Back to top
View user's profile Send private message
Zapp
n00b
n00b


Joined: 19 Jul 2004
Posts: 9

PostPosted: Wed Aug 04, 2004 4:23 am    Post subject: Reply with quote

How do I get to the mozex options? I am using 0.9.1 Firefox, and I cannot locate the mozex options in the Preferences. Mozex shows up just fine in the context menu.

Sorry if this is a stupid noob question, but I cannot seem to figure it out.

Thanks.
Back to top
View user's profile Send private message
Zapp
n00b
n00b


Joined: 19 Jul 2004
Posts: 9

PostPosted: Wed Aug 04, 2004 7:55 pm    Post subject: Reply with quote

btt
Back to top
View user's profile Send private message
gilkyboy
n00b
n00b


Joined: 05 Sep 2003
Posts: 40

PostPosted: Mon Aug 09, 2004 12:19 am    Post subject: ebuild Reply with quote

is it possible to do this with the ending extension .ebuild so that when I click on a link to an e-build, it adds itself to the portage overlay??? Kinda like our own little CNR (Click n' Run) thing, that would be awesome... talk about converting new users..... Maybe even have it so they can set it up to be binary only..., maybe.
Back to top
View user's profile Send private message
mallchin
l33t
l33t


Joined: 21 Jan 2003
Posts: 655
Location: United Kingdom

PostPosted: Tue Sep 07, 2004 12:23 pm    Post subject: Reply with quote

pacman13 wrote:
Would it not be possible to use Gnome's built in "Preferred Applications" to do this? (or KDE's? .. but I'm using Gnome at the moment)

So far I have it -almost- working, just by putting this as my preferred mail reader:

Code:
thunderbird -remote "mailto (%s)"


the only problem is that the %s stays as a %s in the TO field, not as the e-mail address. There may or may not be a way around this, but it seems MUCH more elegant than scripts, etc...

I'll play with it more later when I'm home from work, and post results if I get it working.


Agreed; Assuming you have an extensive DM (Gnome/KDE) I think Firefox should use whatever default mailto handler you have set.

I also use Gnome and Evolution is configured as default. Epiphany detects this however Firefox states mailto is not a registered protocol. Hrm.
_________________
6700 @ 2.66GHz, 4Gb RAM, 2 x 500Gb, 8800 GTX, PhysX, X-Fi, 24" Widescreen, Tux mascot
Back to top
View user's profile Send private message
silentbob
Apprentice
Apprentice


Joined: 09 Nov 2003
Posts: 159
Location: UK

PostPosted: Tue Sep 07, 2004 1:10 pm    Post subject: Reply with quote

Nice thread, it should help out nicely!
Back to top
View user's profile Send private message
jaybird
n00b
n00b


Joined: 11 Jun 2004
Posts: 59
Location: Alberta, Canada

PostPosted: Sat Sep 18, 2004 8:13 am    Post subject: Reply with quote

I didn't like this mozex method as any module that doesn't have an uninstall just doesn't seem worth using and I've noticed the patch has to be updated as they changed the binary filename of thunderbird.

I moved from evolution to thunderbird and I just have KDE installed (no Gnome). I figured I could go to the KDE component chooser and tell it to use thunderbird but firefox still kept going to the old evolution installation. Then I remembered when evolution installed it installed the gnome controls so sure enough I checked the gconftool-2 --get command and saw that this gnome control tool was forcing things to go to evolution still.

So I simply ran the following command at a terminal prompt and the entire problem was fixed without any extra extensions or patches.

Code:
gconftool-2 --set /desktop/gnome/url-handlers/mailto/command -t string 'thunderbird %s'


Oh, you can also alter the default browser here too

Code:
gconftool-2 --set /desktop/gnome/url-handlers/http/command -t string 'firefox %s'
gconftool-2 --set /desktop/gnome/url-handlers/https/command -t string 'firefox %s'


Enjoy the simplicity :)


Last edited by jaybird on Mon Sep 20, 2004 6:28 am; edited 1 time in total
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Sun Sep 19, 2004 10:08 pm    Post subject: Reply with quote

UPDATE!!
If you're using firefox 9.1 or newer, your http script needs to be updated to the following.

Code:
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox"
FIREFOX_PATH=${MOZILLA_FIVE_HOME}
                                                                                                               
if [ -z "`/bin/ps x | /bin/grep \"[0-9] ${FIREFOX_PATH}/firefox-bin\"`" ]; then
        # No MozillaFirefox running
        firefox -P default "$1"
else
        # MozillaFirefox running
        firefox -remote "openurl($1, new-tab)"
fi

_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
Paranoid
Apprentice
Apprentice


Joined: 07 Jan 2004
Posts: 290
Location: Portland, ME

PostPosted: Mon Oct 11, 2004 1:40 pm    Post subject: Reply with quote

Just wanted to add an update to this as I recently switched to thunderbird as my email client. Easier than ever, just add:
Code:
user_pref("network.protocol-handler.app.mailto", "/usr/bin/thunderbird");


to your firefox prefs.js file. No need for an extra script anymore, mozilla-launcher script handles it just fine.

To get urls from thunderbird to open in firefox just add:
Code:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");


to your thunderbird prefs.js file.

versions:
firefox -1.0_pre-r2
thunderbird-0.8
mozilla-launcher-1.21
_________________
A paranoid is someone who knows a little of what's going on.
William S. Burroughs
Back to top
View user's profile Send private message
dayul
Apprentice
Apprentice


Joined: 02 Jun 2004
Posts: 180
Location: Blackpool, England

PostPosted: Fri Dec 10, 2004 11:03 am    Post subject: Reply with quote

Hi, has anyone managed to get a url from thunderbird to open in firefox in a new tab instead of opening a new window?
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Fri Dec 10, 2004 6:11 pm    Post subject: Reply with quote

In your thunderbird prefs, make sure that
Code:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");

is removed or commented out incase you want go go back later.
Make them
Code:

user_pref("network.protocol-handler.app.http", "~/scripts/http");
user_pref("network.protocol-handler.app.https", "~/scripts/http");

The "~/scripts/http" is wherever you have the following script saved.

Your script should look like
Code:

#!/bin/sh
PS=`/bin/ps x`
RUN=`echo $PS | grep firefox-bin`
if test "$RUN" = ""; then
        # No MozillaFirefox running
        firefox -P default "$1"
else
        # MozillaFirefox running
        firefox -remote "openurl("$1", new-tab)"
fi

Been working fine for me, but forgot to come back here, and update.


Edited this, because I pasted in the old script the first time accidentally.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy


Last edited by NewBlackDak on Fri Dec 10, 2004 6:29 pm; edited 2 times in total
Back to top
View user's profile Send private message
dayul
Apprentice
Apprentice


Joined: 02 Jun 2004
Posts: 180
Location: Blackpool, England

PostPosted: Fri Dec 10, 2004 6:25 pm    Post subject: Reply with quote

thats great, thanks a lot, i was putting

firefox -remote "openurl("$1", new-tab)

directly in the prefs.js file, which didnt work, but your script even checks for if firefox is not open!

works a treat, what a star you are.
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Fri Dec 10, 2004 6:27 pm    Post subject: Reply with quote

dayul wrote:
thats great, thanks a lot, i was putting

firefox -remote "openurl("$1", new-tab)

directly in the prefs.js file, which didnt work, but your script even checks for if firefox is not open!

works a treat, what a star you are.


Take a look at again. I accidentally copied the old one in. That one doesn't work if ff isn't already running, but what I just edited does.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
firephoto
Veteran
Veteran


Joined: 29 Oct 2003
Posts: 1612
Location: +48° 5' 23.40", -119° 48' 30.00"

PostPosted: Fri Dec 10, 2004 6:30 pm    Post subject: Reply with quote

If things haven't changed much then /usr/bin/firefox is just a link to the mozilla-launcher script which you could open up and change the correct line to say new-tab instead of new-window.
This is the line from the /usr/libexec/mozilla-launcher that you would change.
Code:

# new windows instead of new tabs
newtype=${MOZILLA_NEWTYPE:-"window"}


Also you should be able to call the firefox script that installs with firefox directly. It would be /opt/firefox/firefox or /usr/lib/MozillaFirefox/firefox(I'm not sure?) so have your user.js for thunderbird point directly to the mozilla script that installs with firefox (not the gentoo mozilla-launcher script/link).
Code:

user_pref("network.protocol-handler.app.http", "/path/to/mozilla-firefox-script");
user_pref("network.protocol-handler.app.https", "/path/to/mozilla-firefox-script");

This script is the one located in the base directory of where firefox is installed to and it's called "firefox" unless Gentoo changes that name for the source install.

One of the fixes before firefox went stable was make the launching of firefox or thunderbird directly without extra command line options or wrapper scripts necessary and this would obey to the settings for each program so if new windows opened in tabs then when a url was called from somewhere else firefox would know to open that in a new tab. This was working 6 months ago so I'm sure it hasn't been broken again.

I don't use thunderbird anymore but the method of launching firefox directly for urls, or thunderbird for mailto's, by directly pointing to the mozilla built script always worked for me once this feature was fixed by mozilla.
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Fri Dec 10, 2004 6:31 pm    Post subject: Reply with quote

firephoto wrote:
If things haven't changed much then /usr/bin/firefox is just a link to the mozilla-launcher script which you could open up and change the correct line to say new-tab instead of new-window.
This is the line from the /usr/libexec/mozilla-launcher that you would change.
Code:

# new windows instead of new tabs
newtype=${MOZILLA_NEWTYPE:-"window"}


Also you should be able to call the firefox script that installs with firefox directly. It would be /opt/firefox/firefox or /usr/lib/MozillaFirefox/firefox(I'm not sure?) so have your user.js for thunderbird point directly to the mozilla script that installs with firefox (not the gentoo mozilla-launcher script/link).
Code:

user_pref("network.protocol-handler.app.http", "/path/to/mozilla-firefox-script");
user_pref("network.protocol-handler.app.https", "/path/to/mozilla-firefox-script");

This script is the one located in the base directory of where firefox is installed to and it's called "firefox" unless Gentoo changes that name for the source install.

One of the fixes before firefox went stable was make the launching of firefox or thunderbird directly without extra command line options or wrapper scripts necessary and this would obey to the settings for each program so if new windows opened in tabs then when a url was called from somewhere else firefox would know to open that in a new tab. This was working 6 months ago so I'm sure it hasn't been broken again.

I don't use thunderbird anymore but the method of launching firefox directly for urls, or thunderbird for mailto's, by directly pointing to the mozilla built script always worked for me once this feature was fixed by mozilla.


never even looked at this before, but yes changing to
Code:

# new windows instead of new tabs
#newtype=${MOZILLA_NEWTYPE:-"window"}
newtype=${MOZILLA_NEWTYPE:-"tab"}

Works just the same
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy


Last edited by NewBlackDak on Fri Dec 10, 2004 9:09 pm; edited 2 times in total
Back to top
View user's profile Send private message
dayul
Apprentice
Apprentice


Joined: 02 Jun 2004
Posts: 180
Location: Blackpool, England

PostPosted: Fri Dec 10, 2004 6:38 pm    Post subject: Reply with quote

lol, thatll teach me for not testing it fully,
new one works great, thanks again.
Back to top
View user's profile Send private message
Lokheed
Veteran
Veteran


Joined: 12 Jul 2004
Posts: 1295
Location: /usr/src/linux

PostPosted: Fri Dec 10, 2004 8:15 pm    Post subject: Reply with quote

Paranoid wrote:
Just wanted to add an update to this as I recently switched to thunderbird as my email client. Easier than ever, just add:
Code:
user_pref("network.protocol-handler.app.mailto", "/usr/bin/thunderbird");


to your firefox prefs.js file. No need for an extra script anymore, mozilla-launcher script handles it just fine.

To get urls from thunderbird to open in firefox just add:
Code:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");


to your thunderbird prefs.js file.

versions:
firefox -1.0_pre-r2
thunderbird-0.8
mozilla-launcher-1.21



Awesome. Works like a charm. Thanks for this quick and easy "proper" way of doing it. Those two things have bugged me for a long time.

I can confirm it works on Firefox 1.0 and Thunderbird 1.0 :D

NOTE: You also dont need mozilla-launcher either.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum