Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] mutt, mailcap



HA!  Managed to reply to the wrong thread, with the right content...

On Wed, Oct 10, 2018 at 12:45:57PM -0500, Derek Martin wrote:
> On Tue, Oct 09, 2018 at 05:42:16PM -0400, dan moylan wrote:
> > 
> > running fc28, and mutt for mail, using the following ~/.mailcap
> > 
> > # .mailcap
> > 
> > image/jpeg;            eog %s
> > application/pdf;       evince %s
> > text/html;             firefox %s
> > application/msword;    libreoffice %s
> > application/vnd.openxm libreoffice %s
> > 
> > when i send out a message with the following attachments (as seen by mutt)
> > 
> >   I     1 <no description>                        [text/plain, 7bit, us-ascii, 0.3K]
> >   A     2 indypass0.jpg                                   [image/jpeg, base64, 3.1M]
> >   A     3 Behind_the_Bush_score.pdf                      [applica/pdf, base64, 132K]
> >   A     4 ba181019.htm                             [text/html, 7bit, us-ascii, 0.6K]
> >   A     5 amz1228.htm                               [text/html, 7bit, us-ascii, 48K]
> >   A     6 f-MountainDew.doc                            [applica/msword, base64, 77K]
> >   A     7 gutierrez.docx                           [applica/vnd.openxm, base64, 24K]
> >   A     8 leaseadd.docx                            [applica/vnd.openxm, base64, 25K]
> > 
> > the .jpg, .pdf, .doc attachments are displayed correctly --
> > the htm and docx files are not.
> > 
> > htm:
> > no explanation, just displayed as text.
> 
> There are two ways to view attachments in Mutt.  In some 1.5 version,
> the default was to display text attachments as text.  I believe this
> corresponds to the behavior of the default [enter] key binding.
> 
> The usual solution is to use the setting:
> 
>   auto_view text/html
> 
> The default binding of <Return> in the attachment screen is to the
> function 'view-attachment', but I believe there's a second function
> that either forces or does not force text attachments to be viewed as
> text.  I can't recall the specifics, but I would suggest searching the
> Mutt manual for HTML, and it'll probably turn up.
> 
> > docx:
> > "No matching mailcap entry found.  Viewing as text."
> 
> You may need additional bits in your mailcap entry.  The default on my
> system for msword is this:
> 
> $ grep msword  /etc/mailcap
> application/msword; soffice --nologo --writer '%s'; edit=soffice --nologo --writer '%s'; test=test -n "$DISPLAY"; description="Microsoft Word Document"; nametemplate=%s.doc
> 
> I'd check whether Mutt has $DISPLAY set in its environment. One way to
> do this is to have your muttrc set a local mutt variable, and then ask
> Mutt what it is.  Something like:
> 
> set  my_display=`echo $DISPLAY`
> 
> Then in Mutt, use the colon command:
> 
> :set ?my_display
> 
> To see what it is set to.
> 

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org