On 2011-02-02, Gabriel Chavez <[email protected]> wrote:
> I've been looking around for a way to open my html emails with Firefox
> but I still don't know how to do it. Is there a way to do it?
Here's what I use in .printcap. Normally w3m is used inside mutt's
pager. If I want to open an html e-mail in firefox I tell mutt to
"print" it:
text/html; w3m -T text/html -dump; copiousoutput; print = firefoxurl %s;
firefoxurl is a script that opens a url in a new tab if firefox is
already running, otherwise it starts firefox:
#!/bin/bash
MRC="firefox -remote"
URL="$1"
CMD="${2:-new-tab}"
echo "$0 '$1' '$2'" >/dev/tty
test -f "$URL" && URL="file://$URL"
expr match "$URL" '.*://.*' >/dev/null || URL="http://$URL"
if $MRC 'ping()' 2>/dev/null ; then
echo 'firefox already running'
echo $MRC "openURL($URL,$CMD)"
$MRC "openURL($URL,$CMD)"
else
echo 'firefox not running'
echo firefox "$URL"
firefox "$URL"
fi
--
Grant Edwards grant.b.edwards Yow! If elected, Zippy
at pledges to each and every
gmail.com American a 55-year-old
houseboy ...