setting firefox about:config to invoke or start mutt when clicking a mailto: link
- To: mutt-users@xxxxxxxx
- Subject: setting firefox about:config to invoke or start mutt when clicking a mailto: link
- From: jkinz@xxxxxxxx
- Date: Tue, 21 Apr 2009 15:21:35 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:received:date :from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent:x-ws-trigger; bh=Z/pnyGM6chSiDgSkKpXiGU9n/dd4MQwFYczdZaGV/eU=; b=sxTbLMIzos6RG/i9MESC8Dsx8jHYlXj4C1XFj4p+BVUSLR2jZn0yW9tpEQxu9fjm/o P64Nsz3gGI4ie/CiQGVZeJ+AZa8QbMeuO8zNnYKKY0vRRSjZrfM9Lf4HVUEWn4OMkS3B yDJeDvKcZLOk02GFM7apg9YtcXqnqD1AIeBBA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mail-followup-to :mime-version:content-type:content-disposition:user-agent :x-ws-trigger; b=MnpFYBdEQRZBeDgn6pEw7RSYsVNRTvuxr93KsvIpp8a+L2ZHQhC2pcVtnZt8TpORHY nWKcqLPZO3hM87o1eHG0K/x6fY619k833wxLSX2A8H1GTFUYgnyf2ZhJ1/J/7N745SA1 uosV7mwEHPoiA/ZyAmh2kRs9v/JsmAJJBM8iA=
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.4.1i
To setup firefox to invoke mutt when clicking a "mailto:" link:
#1 - goto the "about:config:" page in firefox by placing
about:config in the address bar.
#2 - right click anywhere on the page and select "new" and
then "string"
#3 - enter the string :
network.protocol-handler.app.mailto
into the new string field and click OK.
#4 - paste the string
network.protocol-handler.app.mailto
into the "filter" field (at the top)
#5 - when that single entry appears right click on the value
entry for it and select "modify"
#6 - enter the pathname of the script you created to run mutt in
some kind of xterm window. "/usr/bin/mutt" won't cut it.
Mine is "/usr/local/bin/mailtomutt" which is based on a
script I found on the web somewhere (sorry I have forgotten
who made it but I give that person credit whoever they are.)
The script is a little slow. It has 14 or so spawned processes
which could be replaced by internal Bash parameter
expansions. Here is script I found on the web; modified to
invoke mutt under the KDE konsole terminal app:
#!/bin/bash
MAILTO_URL="$1"
#Strip off the protocol
MAIL_DATA=$(echo "$MAILTO_URL" | /bin/sed -s 's/^mailto://')
#Get Recipient and strip it off
RECIPIENT=$(echo "$MAIL_DATA" | cut -d? -f1 -)
MAIL_DATA=$(echo "$MAIL_DATA" | /bin/sed -s s/^$RECIPIENT//)
#Get Subject,BCC, and CC
SUBJECT=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?subject=//' \
| /bin/sed -s 's/?.*//')
BCC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?bcc=//' | /bin/sed -s 's/?.*//')
CC=$(echo "$MAIL_DATA" | /bin/sed -s 's/.*?cc=//' | /bin/sed -s 's/?.*//')
# Call mutt in a term
/usr/bin/konsole -e /usr/bin/mutt "$RECIPIENT" -b "$BCC" -c "$CC" -s "$SUBJECT"
################## END ####################################
It's very slow to pop up the mutt window, so I'm sure I'll eventually
upgrade those $( echo blah | sed ) transforms to PE expressions, unless
I come across a better solution in the meantime.
The first goal was just to get "something" working so I could
respond to ads on craigslist with a single click... :)
Jeff Kinz.
--
A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting frowned upon?
"Best claim by a government" signatures series: (posted to a public list)
IMPORTANT: This email remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the CRIMES
ACT 1914. If you have received this email in error, you are requested to
contact the sender and delete the email.