Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using Mozilla Thunderbird with Opera
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Nephren-Ka
n00b
n00b


Joined: 10 Jun 2002
Posts: 63
Location: Melbourne, Australia

PostPosted: Fri Jun 25, 2004 9:20 pm    Post subject: Using Mozilla Thunderbird with Opera Reply with quote

Hey all, I am an Opera user, and I prefer to use Thunderbird for my email client....however it has always annoyed me, having to copy and paste email addresses instead of just clicking on the "mailto:" link and having Thunderbird handle it...so, I made a script that some of you may be interested in :)

Code:

#!/bin/bash

url=$1

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

else
# thunderbird is not running
thunderbird -P default $url
fi


Simply put this script wherever you will, then in Opera go to Tools/Preferences/Email, click on the "Use Specific Email Client" radio button, and put this in as the command:

Code:

/path/to/script/scriptname.sh %w


That's all there is to it, Thunderbird will now pop up a compose window when a mailto link is clicked on...whether you have Thunderbird open or not ;)
Back to top
View user's profile Send private message
Shan
Guru
Guru


Joined: 04 Nov 2003
Posts: 558
Location: /dev/null

PostPosted: Sat Jun 26, 2004 12:37 am    Post subject: Reply with quote

This could probably be modified to allow firefox to acces http:// urls when your not using a full DE that allows you to automagically change program assignments ne? *bookmark*
_________________
{ NO -U } { STRIP }
{ TINY }
Back to top
View user's profile Send private message
Nephren-Ka
n00b
n00b


Joined: 10 Jun 2002
Posts: 63
Location: Melbourne, Australia

PostPosted: Sat Jun 26, 2004 3:30 am    Post subject: Reply with quote

Sure could, fairly easily...I dont use firefox though ;) However I believe that some programs check an environmental variable to see what browser you want to use, such as $BROWSER, etc...you might want to look into that.

Shan wrote:
This could probably be modified to allow firefox to acces http:// urls when your not using a full DE that allows you to automagically change program assignments ne? *bookmark*
Back to top
View user's profile Send private message
Shan
Guru
Guru


Joined: 04 Nov 2003
Posts: 558
Location: /dev/null

PostPosted: Sat Jun 26, 2004 3:48 am    Post subject: Reply with quote

Coolies.

Now stupid BASH scripting question, how do you pass a variable (or switch such as "--pretend") from the command line and read it in the script self. This nugget of info has been holding back my scripting potential for a while and for some reason I've never been able to find a guide that could explain it to me.
_________________
{ NO -U } { STRIP }
{ TINY }
Back to top
View user's profile Send private message
Shan
Guru
Guru


Joined: 04 Nov 2003
Posts: 558
Location: /dev/null

PostPosted: Sat Jun 26, 2004 7:47 am    Post subject: Reply with quote

Bah, I got bored so I picked up a copy of Linux & Unix shell programming from the company library, I'm sure it'll explain things for me. *bury's nose in book*
_________________
{ NO -U } { STRIP }
{ TINY }
Back to top
View user's profile Send private message
Nephren-Ka
n00b
n00b


Joined: 10 Jun 2002
Posts: 63
Location: Melbourne, Australia

PostPosted: Sat Jun 26, 2004 8:02 pm    Post subject: Reply with quote

Well, as you can see in my script...I do just that, use parameters passed to the script.
It's quite simple really:
$0 is the filename itself
$1, $2, $3, etc are the first, second, third, etc parameters that are passed to the program. Simple :)

Shan wrote:
Coolies.

Now stupid BASH scripting question, how do you pass a variable (or switch such as "--pretend") from the command line and read it in the script self. This nugget of info has been holding back my scripting potential for a while and for some reason I've never been able to find a guide that could explain it to me.
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
Page 1 of 1

 
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