I think the "test" specs parsed from /etc/mailcap are not being tried. On a tty with DISPLAY unset I find gnus trying to run xpdf (or acroread), despite having test=test -n "$DISPLAY" I think the info alists in mailcap-mime-data are getting strings "test" rather than symbols `test', which is making those tests invisible to mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test (those funcs call "(assq 'test info)"). 2006-01-21 Kevin Ryde * mailcap.el (mailcap-parse-mailcap-extras): "test" key must go into alists as symbol not string, since that's what mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test look for. I'd have thought symbols for all keys would be the way to go, but I see "copiousoutput", "needsx11" and friends are getting tested/used as strings at the moment.