From mboxrd@z Thu Jan 1 00:00:00 1970 From: decklin@red-bean.com (Decklin Foster) Date: Sun, 26 Oct 2008 14:48:41 -0400 Subject: [sup-talk] run-mailcap weirdness Message-ID: <1225046594-sup-8381@gillespie.rupamsunyata.org> Viewing HTML attachments fails for me. It turns out that Debian's mailcap falls over if standard output is not a terminal (see below). I don't know if this is right, but removing the redirection makes it work for me (I've committed this to decklins-clone at Gitorious). What was the original rationale for /dev/null-ing this? I noticed if you set the mailcap command to something that just prints text (no pager) it blips by instantaneously in Sup. So, unless we can snarf the output for logging purposes, maybe it is better to just let it reach the terminal? Example mailcap lossage: $ echo hello | /usr/bin/run-mailcap --debug=1 --action=view text/plain:- >/dev/null - parsing parameter "--action=view" - parsing parameter "text/plain:-" - file "-" does not exist -- assuming mime-type specification of "text/plain" - Reading mailcap file "/home/decklin/.mailcap"... - Reading mailcap file "/etc/mailcap"... Processing file "-" of type "text/plain" (encoding=none)... - checking mailcap entry "text/plain; less '%s'; needsterminal" - program to execute: less '%s' - no terminal available for rule (needsterminal) - checking mailcap entry "text/plain; more '%s'; needsterminal" - program to execute: more '%s' - no terminal available for rule (needsterminal) - checking mailcap entry "text/*; less '%s'; needsterminal" - program to execute: less '%s' - no terminal available for rule (needsterminal) - checking mailcap entry "text/*; more '%s'; needsterminal" - program to execute: more '%s' - no terminal available for rule (needsterminal) Error: no "view" rule for type "text/plain" passed its test case (for more information, add "--debug=1" on the command line) -- things change. decklin at red-bean.com