Re: pipe attachments in mutt
Sandip P Deshmukh wrote:
> > > what do i need to do so that the desired application will open with the attachment?
> > xpdf has the correct mailcap entries that it should start automatically if
> > you ask mutt to ``view-attach''. This command is (by default) bound to
> > <Return> when you're in the attachments screen.
> okay. i tried that. no luck. it opens a text reader with a lot of irrelevant characters.
Is this text reader in the existing terminal (ie. the one that mutt's
running on) or a new terminal that pops up?
> could you possibly tell me more about mailcap entries?
Well, `man mailcap' first.
Things you can do: If you have any pdf files saved, type `see filename.pdf'
and see what happens.
Can you look in /etc/mailcap and /etc/mime.types for any occurrence of
"pdf", and tell me what you find? (Also see if you have your own ~/.mailcap
and ~/.mime.types files.)
> moreover, is there a more generalized way of handling attachments? for instance, if the
> attachment is of type pdf, open xpdf with that attachment and if the attachment is of type
> mp3, open xmms with that attachment, etc.
This is what mailcap is for. (A very simple example: When some idiot sends you
a mail in html, and you try to view the attachment with <Return> from the
attachments screen, does a browser get started to view the message?)
> i will like to use | to change this default behavious. for instance, if i want to open an
> mp3 file not with xmms but with mpg321, i will like to pipe it to mpg321 etc
Piping is possible for some applications, but not all. I think mpg321 will
read from stdin, but for some apps, if you don't want the default behaviour,
you'll have to save the file and run the command yourself.
Glyn
--
There are pavements on New Inn Hall Street. Down both sides, in fact.
Reply to: