Subject: Trouble Viewing Attachment in 3.94

From: Paul O Bartlett <[email-masked]>
Date: Sat, 6 Jul 1996 21:42:33 -0400

I have run into a problem I have never encountered before.  Any
suggestions from superior wisdom and experience will be welcome.

System: Pine 3.94 under SunOS 4.1.4 (a flavor of Un*x)
Config file character-set value: ISO-8859-1

    A bit ago I sent an email with a message body to several recipients
and also specified an attachment in the email header.  Everything
looked fine.  The attachment was actually plain text with ISO-8859-1
(8-bit European) letters in it.  I wanted to send the second file along
as an attachment partly because of the 8-bit letters and partly to keep
it separate from the main message.

    After I sent the email, I decided to look at the Fcc, because I
have rarely had occasion to use attachments.  The only problem is that
I cannot view the attachment.

    If I exit Pine and actually look at the whole mail folder with a
text editor, the attachment is there, MIME header and all, in BASE64
format.  Back in Pine, from the attachment index screen I can
successfully save the attachment as a external file and look at it with
an independent text editor, and everything is fine: the file gets
converted out of BASE64 into real text, and even the 8-bit letter are
intact.  The 'A' command from the attachment index screen tells me
things about the attachment.  For example, it tells me that the
attachment is Text/PLAIN, and the Display Method is "shownonascii
iso-8859-1 <datafile>".

    However, if I issue the 'V' command actually to view the attachment
from within Pine, nothing happens.  The "Displaying attachment" message
breifly flashes at the bottom of the screen, followed by the message
"VIEWER command launched."  But nothing happens.  No view.  Just back to
where I was.

    Anybody else run into something like this and have a solution?  Am
I missing something in my config, perhaps?

Thanks very much.
Paul                             <[email-masked]>
----------------------------------------------------------
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP 2.6.2 public key 
Home Page:  URL: http://www.access.digex.net/~pobart

---

From: Richard Gering <[email-masked]>
Date: Sun, 7 Jul 1996 15:47:28 +0100 (WET)

On Sat, 6 Jul 1996, Paul O Bartlett wrote:

> [snip]

Hi Paul.

Maybe you are running into a similar type of problem as I am experiencing. 

I am trying to help someone out in getting Pine to understand a new MIME
type, and created a ~/.mailcap file with an appropriate entry. When I
tried to view the attachment with the newly installed viewer, I also saw
the "VIEWER command launched" message being displayed without anything
else happening. Assuming you also have a mailcap file installed, your
problem could very well be identical.

If you try long enough you can sometimes view the attachment, but the
chances of this happening are slim. Also, if you press View in rapid
succession, Pine locks up (did you also noticed this?)  When Pine is
locked up like that, a check of the running processes sometimes reveals a
number of spawned viewers running in the background (all with PPID 1).
They never stay around for long, though.

When I added the option "needsterminal" for the given attachment in
~/.mailcap, the attachments would always be displayed properly. By the
very definition of that option, the attachment is then being displayed
outside Pine's standard scrolling text window (do-it-yourself).

Perhaps there is a problem with Pine's code that handles the bidirectional
pipe to the viewer running in the background. You could try the option
needsterminal just mentioned, or uncomment the iso-8859-1 entries from the
mailcap file(s) all together. 

I'm trying to figure out what exactly is going wrong, but I'm a little
short on time right now. Just thought the current info might be useful to
you. 

Kind regards,

- Richard Gering.

+-----------------------------------------------------------------------------+
| Richard Gering ([email-masked]) | Let me make one thing perfectly clear:  |
| CI International B.V. Netherlands | I never explain anything! (Mary Poppins)| 
+-----------------------------------------------------------------------------+

---

From: Terry Gray <[email-masked]>
Date: Mon, 8 Jul 1996 09:58:29 -0700 (PDT)

Paul,
The symptoms you describe suggest that Pine has found an entry in your
system mailcap file for text/plain charset=8859-1, and is attempting to
invoke the program specified in the mailcap file, "shownonascii".  I'm
guessing that you are not using an X terminal at the moment, and since
"shownonascii" is an X-11 program, it might be having trouble talking to
your display. :)

In looking into this, Mike S. actually found a real bug in the testing of
mailcap entry parameters (which will be fixed in 3.95), but I think the
above explanation covers your situation. 

Your choices include: removing the text/plain mailcap entry, changing it
to invoke some other program, changing it to test for a DISPLAY variable
so it only invokes "shownonascii" if you are using X.

-teg

---

From: [email-masked] (Jungshik Shin)
Date: 9 Jul 1996 07:21:50 GMT

Paul O Bartlett ([email-masked]) wrote:
: On 8 Jul 1996, Terry Gray wrote:
: 
: > The symptoms you describe suggest that Pine has found an entry in your
: > system mailcap file for text/plain charset=8859-1, and is attempting to
: > invoke the program specified in the mailcap file, "shownonascii".  I'm
: 
:     There is *no* mailcap file in any directory in the PATH defined to
: my Un*x shell.  Digging around, I found one mailcap file in a directory
: with 'X11' as part of the directory path, so I am guessing that that
: one has to do with X-terms, and I am using VT100 emulation.  There is
: another, almost 2 1/2 years old, mailcap file in /usr/local/etc, which
: is not in my PATH.  I don't know whether Pine can find a mailcap file
: (or any other file) not in my PATH -- I'm guessing not -- so Pine as I
: use it may be running without a mailcap at all, if that's possible.

 /usr/local/etc is one of standard directories($HOME,/etc, /usr/etc, and
/usr/local/etc) searched for by MIME-capable programs. I'm not sure
whether or not Pine refer to mailcap in /usr/local/etc, though.  Anyway,
mailcap search path has nothing to do with your PATH variable. 'man
mailcap' will give you more detail. BTW, I guess you can change 'mailcap
search path' to be used by Pine not to include /usr/local/etc.

   Jungshik Shin

---

From: Paul O Bartlett <[email-masked]>
Date: Mon, 8 Jul 1996 21:03:33 -0400

On 8 Jul 1996, Terry Gray wrote:

> [...]

    There is *no* mailcap file in any directory in the PATH defined to
my Un*x shell.  Digging around, I found one mailcap file in a directory
with 'X11' as part of the directory path, so I am guessing that that
one has to do with X-terms, and I am using VT100 emulation.  There is
another, almost 2 1/2 years old, mailcap file in /usr/local/etc, which
is not in my PATH.  I don't know whether Pine can find a mailcap file
(or any other file) not in my PATH -- I'm guessing not -- so Pine as I
use it may be running without a mailcap at all, if that's possible.

    If a sample mailcap is included with the Pine distribution, my
service provider's Technical Staff seem to have hidden it when they
installed 3.94 recently.  They didn't even announce the installation --
it just magically showed up one day when I went to start Pine.  I
suppose I could copy that old mailcap in /usr/local/etc into $HOME and
play around with it.