From owner-freebsd-questions Wed Feb 6 9:29:58 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id CC5C837B6BE for ; Wed, 6 Feb 2002 09:26:15 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id g16HQDV51130; Wed, 6 Feb 2002 11:26:13 -0600 (CST) (envelope-from dan) Date: Wed, 6 Feb 2002 11:26:13 -0600 From: Dan Nelson To: stan Cc: Free BSD Questions list Subject: Re: Example mime.types, and mailcap for mutt? Message-ID: <20020206172613.GD1066@dan.emsphone.com> References: <20020206160707.GC13832@teddy.fas.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20020206160707.GC13832@teddy.fas.com> User-Agent: Mutt/1.3.27i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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=" 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=" 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