View previous topic :: View next topic |
Author |
Message |
Nephren-Ka n00b
Joined: 10 Jun 2002 Posts: 63 Location: Melbourne, Australia
|
Posted: Fri Jun 25, 2004 9:20 pm Post subject: Using Mozilla Thunderbird with Opera |
|
|
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 |
|
|
Shan Guru
Joined: 04 Nov 2003 Posts: 558 Location: /dev/null
|
Posted: Sat Jun 26, 2004 12:37 am Post subject: |
|
|
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 |
|
|
Nephren-Ka n00b
Joined: 10 Jun 2002 Posts: 63 Location: Melbourne, Australia
|
Posted: Sat Jun 26, 2004 3:30 am Post subject: |
|
|
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 |
|
|
Shan Guru
Joined: 04 Nov 2003 Posts: 558 Location: /dev/null
|
Posted: Sat Jun 26, 2004 3:48 am Post subject: |
|
|
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 |
|
|
Shan Guru
Joined: 04 Nov 2003 Posts: 558 Location: /dev/null
|
Posted: Sat Jun 26, 2004 7:47 am Post subject: |
|
|
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 |
|
|
Nephren-Ka n00b
Joined: 10 Jun 2002 Posts: 63 Location: Melbourne, Australia
|
Posted: Sat Jun 26, 2004 8:02 pm Post subject: |
|
|
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 |
|
|
|