Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #220872 > unrolled thread
| Started by | Beatrice Torracca <beatricet@libero.it> |
|---|---|
| First post | 2020-04-04 15:00 +0200 |
| Last post | 2020-04-04 18:40 +0200 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.debian.user
mutt does not find mailcap entry Beatrice Torracca <beatricet@libero.it> - 2020-04-04 15:00 +0200
Re: mutt does not find mailcap entry <tomas@tuxteam.de> - 2020-04-04 15:10 +0200
Re: mutt does not find mailcap entry Beatrice Torracca <beatricet@libero.it> - 2020-04-05 11:10 +0200
Re: mutt does not find mailcap entry <tomas@tuxteam.de> - 2020-04-05 11:30 +0200
Re: mutt does not find mailcap entry David Wright <deblis@lionunicorn.co.uk> - 2020-04-04 17:40 +0200
Re: mutt does not find mailcap entry Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-04 18:40 +0200
| From | Beatrice Torracca <beatricet@libero.it> |
|---|---|
| Date | 2020-04-04 15:00 +0200 |
| Subject | mutt does not find mailcap entry |
| Message-ID | <zRQyZ-A8-11@gated-at.bofh.it> |
Hello, I have been trying to make mutt open pdf files from the view-attachment dialog. I am using a Debian buster (Linux beapc 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux) with Mutt 1.10.1 (2018-07-13). I was trying to make it open evince to view pdf files. It does not seem to recognize the mime type. I tried the same steps I followed with my Debian testing laptop (there the problem was a bit different since it opened pdf files but with calibre). Anyway I edited /etc/mailcap.order adding the line (it is the only line): org.gnome.Evince:application/pdf I ran (as root) the command "update-mime" that gave no error messages. Now in my /etc/mailcap file the first entry is application/pdf; evince %s; test=test -n "$DISPLAY" In my /etc/mime.types I have a line entry for pdf like this application/pdf pdf If I run the command "mutt -nF /dev/null -Q mailcap_path" to see the path it uses to find mailcap entries I get this output mailcap_path="~/.mailcap:/usr/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" I don't have a .mailcap file in my home directory. There is no other mailcap file among those listed aside from /etc/mailcap. Still when I have a mail with a pdf attachment and I see at the bottom of the message in the attachment part [-- application/pdf is unsupported (use 'v' to view this part) --] I press v. I see the application/pdf attachment. Then if I hit Enter I get this message "No matching mailcap entry found. Viewing as text." If I press "m" I get this error message "mailcap entry for type application/pdf not found". I don't understand why since I do have an application/pdf entry. Anyone has any clues and can help me? I did search a lot without getting to an answer (actually I did manage to solve the problem on laptop, but not this one in buster). I might be missing something very obvious. Thanks in advance, beatrice
[toc] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-04-04 15:10 +0200 |
| Message-ID | <zRQIG-SU-11@gated-at.bofh.it> |
| In reply to | #220872 |
[Multipart message — attachments visible in raw view] — view raw
On Sat, Apr 04, 2020 at 02:43:24PM +0200, Beatrice Torracca wrote: > Hello, > > I have been trying to make mutt open pdf files from the > view-attachment dialog. > > I am using a Debian buster (Linux beapc 4.19.0-8-amd64 #1 SMP Debian > 4.19.98-1 (2020-01-26) x86_64 GNU/Linux) with Mutt 1.10.1 > (2018-07-13). Following your detailed description I'd expect it to work. The only idea I can offer at the moment (and that's what I'd try) is to run vim under strace to watch it trying to open the mailcap and perhaps to exec evince. Since mutt takes posession of the screen, it seems best to direct strace's output to a file and examine it later. Like so: strace -f -o my_trace_file -e trace=open,%process mutt (the -f is for "follow", to follow along forks; the -e filters the system calls traced (the traces tend to be a bit... intimidating). Just try to do as few steps as you have to (until mutt tries and fails to call evince), to keep the trace manageable. Hope that helps -- tomás
[toc] | [prev] | [next] | [standalone]
| From | Beatrice Torracca <beatricet@libero.it> |
|---|---|
| Date | 2020-04-05 11:10 +0200 |
| Message-ID | <zS9rY-3XI-21@gated-at.bofh.it> |
| In reply to | #220873 |
On Sat April 4th tomás wrote: > Since > mutt takes posession of the screen, it seems best to direct > strace's output to a file and examine it later. Like so: > > strace -f -o my_trace_file -e trace=open,%process mutt Hi, I tried that. Then I realized I have to apologize. My first try with modifying the mailcap.order file, did work. To test it I was just trying to use it from a text console (yeah, brain obviously not turned on). This is why obviously evince could not start without a graphical environment. It was stupid of me. Thanks to tomás, Andrei and David for trying to help me. Actually I did learn about strace and I want to test some of David solutions for seeing html mails (which is another thing bugging me). Thanks again, and a good Sunday, beatrice
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2020-04-05 11:30 +0200 |
| Message-ID | <zS9Lj-44e-5@gated-at.bofh.it> |
| In reply to | #220907 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Apr 05, 2020 at 11:05:28AM +0200, Beatrice Torracca wrote: > On Sat April 4th tomás wrote: > > > Since > > mutt takes posession of the screen, it seems best to direct > > strace's output to a file and examine it later. Like so: > > > > strace -f -o my_trace_file -e trace=open,%process mutt > > Hi, > > I tried that. Then I realized I have to apologize. No need for that :) > Actually I did learn about strace and I want to test some of > David solutions for seeing html mails (which is another thing bugging > me). After all, that's the point of the whole Great Exercise, isn't it? Cheers -- t
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2020-04-04 17:40 +0200 |
| Message-ID | <zRT3P-2aI-3@gated-at.bofh.it> |
| In reply to | #220872 |
[Multipart message — attachments visible in raw view] — view raw
On Sat 04 Apr 2020 at 14:43:24 (+0200), Beatrice Torracca wrote:
>
> I have been trying to make mutt open pdf files from the
> view-attachment dialog.
>
> I was trying to make it open evince to view pdf files. It does not
> seem to recognize the mime type. I tried the same steps I followed
> with my Debian testing laptop (there the problem was a bit different
> since it opened pdf files but with calibre).
>
> Anyway I edited /etc/mailcap.order adding the line (it is the only line):
>
> org.gnome.Evince:application/pdf
>
> I ran (as root) the command "update-mime" that gave no error
> messages. Now in my /etc/mailcap file the first entry is
>
> application/pdf; evince %s; test=test -n "$DISPLAY"
>
> In my /etc/mime.types I have a line entry for pdf like this
>
> application/pdf pdf
>
> If I run the command "mutt -nF /dev/null -Q mailcap_path" to see the
> path it uses to find mailcap entries I get this output
>
> mailcap_path="~/.mailcap:/usr/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap"
>
> I don't have a .mailcap file in my home directory. There is no other
> mailcap file among those listed aside from /etc/mailcap.
>
> Still when I have a mail with a pdf attachment and I see at the bottom
> of the message in the attachment part
>
> [-- application/pdf is unsupported (use 'v' to view this part) --]
>
> I press v. I see the application/pdf attachment.
> Then if I hit Enter I get this message
>
> "No matching mailcap entry found. Viewing as text."
>
> If I press "m" I get this error message
> "mailcap entry for type application/pdf not found".
>
> I don't understand why since I do have an application/pdf entry.
>
> Anyone has any clues and can help me?
FWIW this is how I approach viewing attachments.
In ~/.mutt/muttrc I have:
$ grep mailcap .mutt/muttrc
auto_view text/html # immediate display (without v command), assumes mailcap support
set mailcap_path=$HOME/.mutt/mailcap-mutt # needed for auto_view
$
and ~/.mutt/mailcap-mutt is attached.
However, I can't help you actually view the document with evince
because, although evince opens, it gives a "Permission denied" error.
Although mutt writes the attachment as a temporary file with
-r-------- permissions, and I can open that file with xpdf even as
evince is still displaying the error message, evince can't.
If I try to open it with evince from another xterm, I "warp to" the
single evince window already displaying it.
I also tested zathura from another xterm, as you can see from the
attachment here, and that worked fine.
So AFAICT evince (which I don't normally use) works differently.
Notes: I run X with startx, and fvwm, so no DE here.
I use an individual mailcap for mutt so that I don't
get big applications starting by surprise.
As you can see, I've tested different ways of handling
HTML at various times.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2020-04-04 18:40 +0200 |
| Message-ID | <zRTZU-2JH-5@gated-at.bofh.it> |
| In reply to | #220872 |
[Multipart message — attachments visible in raw view] — view raw
On Sb, 04 apr 20, 14:43:24, Beatrice Torracca wrote: > Hello, > > I have been trying to make mutt open pdf files from the > view-attachment dialog. > > I am using a Debian buster (Linux beapc 4.19.0-8-amd64 #1 SMP Debian > 4.19.98-1 (2020-01-26) x86_64 GNU/Linux) with Mutt 1.10.1 > (2018-07-13). Opening pdf files works for me without any special configuration with neomutt and mupdf under LXDE. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web