Problem with trying to open an email attachment and involving the mailcap file

Bret Busby bret.busby at gmail.com
Thu Jul 7 16:28:37 UTC 2016


Hello.

I have included below, two messages that I have posted to the alpine
support list, to explain the problem in this message.

This is to do with trying to open an image file that is attached to an
email message. The image file has the extension .JPG .

Please read the text below, and advise what I should do next.

Thank you in anticipation.

-- 

Bret Busby
Armadale
West Australia

..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
 Chapter 28 of Book 1 of
 "The Hitchhiker's Guide to the Galaxy:
 A Trilogy In Four Parts",
 written by Douglas Adams,
 published by Pan Books, 1992

....................................................



---------- Forwarded message ----------
From: Bret Busby <bret.busby at gmail.com>
Date: Wed, 6 Jul 2016 16:07:22 +0800
Subject: How to set application for viewing file attachments
To: Alpine-info List <alpine-info at u.washington.edu>

Hello.

I use alpine 2.20 running on UbuntuMATE 15.10 .

When I want to view a .jpg file attachment, for some strange reason,
alpine loads the web browser, arora, which is a delinquent
application, that keeps adding more windows, each time it is opened,
and, when I tried to view a jpg file attachment today, alpine opened
arora with 515 windows, and, it took quite a while, before I could do
anything with the system, including, using the "kill rabid
application" function.

How can I configure alpine 2.20, to query me (the user), as to which
application is to be used to open an attachment file?

Thank you in anticipation.

-- 

Bret Busby
Armadale
West Australia

....................................................

---------- Forwarded message ----------
From: Bret Busby <bret.busby at gmail.com>
Date: Fri, 8 Jul 2016 00:17:15 +0800
Subject: Re: [Alpine-info] How to set application for viewing file attachments
To: Alpine-info List <alpine-info at u.washington.edu>

On 07/07/2016, Eduardo Chappa <chappa at gmx.com> wrote:
> On Thu, 7 Jul 2016, Bret Busby wrote:
>
>> On 07/07/2016, Eduardo Chappa <chappa at gmx.com> wrote:
>>
>>> Alpine loads what you (as the user) tell it to load. In other words
>>> Alpine does not load something that it (Alpine) thinks you (as the
>>> user) wants or needs.
>>
>> Respectfully, I did not set any parameters to cause .jpg files to be
>> opened by a web browser such as arora.
>
> I understand you, but what I mean is that this is a configuration
> controlled by the user (even if *you* have not configured anything!) and
> if you have not intentionally configured anything in ~/.mailcap, then it
> will be used what the system administrator configured in /etc/mailcap, and
> if the system administrator has not configured anything in /etc/mailcap,
> then whatever the system you installed had in the /etc/mailcap file will
> be used. In other words, there is an explanation that has nothing to do
> with Alpine as to why arora is being used.
>
>> bret at bret-Inspiron-580-UbuntuMATE:~$ cat /etc/mailcap | grep jpg
>> image/jpg; eom %s; test=test -n "$DISPLAY"
>> image/jpg; shotwell %s; test=test -n "$DISPLAY"
>
> This means that attachments of type image/jpg is open by eom, unless of
> course the command "eom %s" fails. The entry "shotwell %s" will be ignored
> if the entry "eom %s" is attempted at all.
>
> Note also that for purposes of testing, the match must be exact, that is
> image/jpg and image/jpeg (for example) are different, so they might be
> managed by different programs. Take a look at the entries for image/jpeg
> also, and also take a look at what mime types use the arora browser.
>
> --
> Eduardo
> http://patches.freeiz.com/alpine/ (Web)
> http://repo.or.cz/alpine.git (Git)
>

Okay; so what I have now done is thus; I did a search in the
/etc/mailcap file, on the string "arora", and found about 6 lines -
for html, xml, html+xml, gif, jpeg, and png.

So, using vi, as superuser (otherwise the file is readonly, as I
found, when I tried to otherwise edit and save the changed file), I
replaced the first three occurrences with rekonq (a cut down version
of the konqueror browser, which (rekonq) I use most as my primary web
browser), and, the last three occurrences (the image file types), with
eom (Eye Of MATE Image Viewer), and, when I tried to open an image
attachment (the image with which, I previously encountered the arora
problem), it attempted to open the image with the Eye Of MATE Image
Viewer, and I got an error;
"No images found in 'file:///tmp/img-DSCN0-64220.jpg'."

The particular file has the extension .JPG, so, I added a line into
the /etcmailcap file, so that I now have

"
text/html; rekonq %s; test=test -n "$DISPLAY"
text/xml; rekonq %s; test=test -n "$DISPLAY"
application/xhtml+xml; rekonq %s; test=test -n "$DISPLAY"
application/xml; rekonq %s; test=test -n "$DISPLAY"
image/gif; eom  %s; test=test -n "$DISPLAY"
image/JPG; eom %s; test=test -n "$DISPLAY"
image/jpeg; eom %s; test=test -n "$DISPLAY"
image/png; eom %s; test=test -n "$DISPLAY"
"

where, for each occurrence of rekonq, and, of eom, "arora" previously
was, except for the line

"
image/JPG; eom %s; test=test -n "$DISPLAY"
"

which I inserted.

Now, after all of that, this now seems to be an issue of how the Eye
Of MATE Image Viewer, is dealing with the file type .JPG, in applying
the /etc/mailcap file, rather than an issue of alpine and its
workings, so, I think that, at this stage, I shall take this matter to
the Ubuntu Users mailing list, for further assistance.

Thank you for your advice thus far, Eduardo; you led me to the
instantiations of arora in the /etc/mailcap file, from which I have
now eliminated reference to arora.

--



More information about the ubuntu-users mailing list