Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2002 11:26:13 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        stan <stanb@awod.com>
Cc:        Free BSD Questions list <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Example mime.types, and mailcap for mutt?
Message-ID:  <20020206172613.GD1066@dan.emsphone.com>
In-Reply-To: <20020206160707.GC13832@teddy.fas.com>
References:  <20020206160707.GC13832@teddy.fas.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

In the last episode (Feb 06), stan said:
> I'm moving to mutt for my mail reader, and I was wondering if anyone
> would be kind ennough to share a copy of these files that are tweaked
> for FreeBSD program locations?
> 
> I'm installing it on both FreeBSD, and Debian. Debian supplies some
> examples, but the paths etc are all wrong for FreeBSD.

mime.types should be installed by mutt, and there's no OS-specific info
in it.  

mailcap shouldn't hardcode paths.  Mutt installs a minimal sample in
/usr/local/share/doc/mutt/samples/sample.mailcap.  Mine is attached.

-- 
	Dan Nelson
	dnelson@allantgroup.com

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=".mailcap"

# Example .mailcap file for FreeBSD machines
#
# First a note about syntax:
#    The first token in a configuration line represents a mime type.
#    A mime type is of the form "SubGroup/Item" and either token
#    can be replaced by the wildcard character "*"
# 
#    the second token is the command that you would run
#    when the specified mime type is encountered.  An example
#    would be "xv %s" where %s will be replaced by a filename
#
#    remaining tokens represent name value pairs.
#
#    the "test=<SOME TEST COMMAND>" pair invokes the test command
#    specified and checks the UNIX shell return code to see if the
#    test passed.  If the test passes the mime mapping is made, otherwise
#    the mapping is not made.
#
#    the "stream-buffer-size=<NUMBER>" pair tells the application
#    to use a popen command to invoke the program specified and to
#    pipe all data into the command.  Only programs that can handle
#    piped input can use this method.  When this method is used
#    a "%s" should not be included in the command.  You should
#    make sure that the program you wish to use can accept piped
#    data by trying something like this before using it:
#       cat "YOUR_DATA_FILE_HERE" | COMMAND_TO_TEST
#
#    You may continue lines by using the backslash character "\"

# use this to display postscript files
# application/postscript; ghostview %s

# use this to display pdf files
application/pdf; pdftotext %s %s.txt \; cat %s.txt \; rm -f %s.txt ; copiousoutput ; test=test -z "$LYNX_VERSION"
application/pdf; pdftotext %s %s.txt \; lynx -child %s.txt \; rm -f %s.txt ; copiousoutput ; test=test -n "$LYNX_VERSION"

# this is the default for non GIF or JPEG images
# image/*; xv %s

image/jpeg; anytoascii %s 2>/dev/null ; copiousoutput
image/gif; anytoascii %s 2>/dev/null ; copiousoutput

#application/msword; catdoc ; copiousoutput ; test=test -z "$LYNX_VERSION"
application/msword; wvText %s %s.txt \; cat %s.txt \; rm -f %s.txt ; copiousoutput ; test=test -z "$LYNX_VERSION"

text/html; lynx -force_html -dump %s ; copiousoutput ; test=test -z "$LYNX_VERSION"

application/x-zip-compressed; unzip -v %s ; copiousoutput ; test=test -z "$LYNX_VERSION"
application/zip; unzip -v %s ; copiousoutput ; test=test -z "$LYNX_VERSION"

application/x-troff; nroff -mandoc ; copiousoutput

--Qxx1br4bt0+wmkIi--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020206172613.GD1066>