MIME and mailcap

Frank Shute frank at esperance-linux.co.uk
Tue Sep 5 12:09:54 PDT 2006


On Tue, Sep 05, 2006 at 12:07:42PM -0500, Paul Schmehl wrote:
>
> I'm trying to understand the use of mailcap for MIME translation within a 
> mail client.  I installed mail/metamail, which created a .mailcap file in 
> my home directory.  That file appears to be a copy of the run-mailcap 
> script.  But what does it do?  It seems like it does nothing.
> 
> What I'm trying to do is get the mail client to open an image viewer when I 
> double-click on a jpeg attachment.  The mail client is designed to source 
> the mailcap file from /etc/, /usr/local/etc/ and from ~/.mailcap.
> 
> What am I missing here?  What's the best/proper way to do this?
> 

Put this in ~/.mailcap:

application/x-gzip;/usr/local/bin/zless %s
text/html;/usr/X11R6/bin/firefox %s
application/pdf;acroread %s
application/postscript;gview %s
image/gif;xv %s
image/jpeg;xv %s
image/png;xv %s


There are some others you may find useful. I use mutt.

-- 

 Frank 


echo "f r a n k @ e s p e r a n c e - l i n u x . c o . u k" | sed 's/ //g'

                      --->PGP keyID: 0x10BD6F4B<---                          


More information about the freebsd-questions mailing list