mailcap_bg

I use a script called "mailcap_bg" to run mailcap helpers in the background. This allows mutt to keep running in the foreground while X-based viewer(s) run concurrently.

mailcap_bg is always called twice when the mime type matches: First it's called to determine if the chosen viewer can run, then it's called to actually launch the viewer. This allows mailcap to list a set of possible viewers for a mime type, in order of priority, and the first one available will be used.

For example, if firefox can be executed, then use that for text/html:

text/html;    mailcap_bg %s firefox file://@s ; nametemplate=%s.html ; \
              test=mailcap_bg -test %s firefox

Don't forget to tell mutt to look up mime types in the case of application/octet-stream. This generic mime type is used by most Windows-based mailers. Put this in your .muttrc:

mime_lookup application/octet-stream

Downloads

Filename
mailcap
bin/mailcap_bg

This page was generated Tue Jan 29 07:57:04 2008.