Subject: Mailcap question

From: [email-masked] (Vikas Agnihotri)
Date: 11 Nov 1996 14:56:47 GMT

This is a mailcap/MIME question but it concerns Pine so here goes.

o How do I view a text/HTML attachment in one of my mails in my Netscape
browser? Here is what I tried

 + Added the following line to my $HOME/.mime-types file
text/html                      html

 + Added the following line to my $HOME/.mailcap  file
text/html;netscape -remote 'openFile (%s)'

  I used the 'remote' option because I want it to display the HTML file in a
already running Netscape process. 

 Here is what happens when I say View Attachment in Pine:

It raises  up my Netscape window all right  but gives some error message
about 'Unable to open file....., etc.

Here is what shows in my Pine 'About Attachment' command about this attachment:

Details about Attachment #2 :

                Type            : Text
                Subtype         : HTML
                Encoding        : 7BIT
                Parameters      : CHARSET = us-ascii
                                  NAME = index.html
                Approx. Size    : 32,321 bytes
                Display Method  : "netscape -remote 'openFile (<datafile>)'"

So it is picking up my .mailcap entry but still does not work..

HELP,

--Vikas

---

From: [email-masked] (Vikas Agnihotri)
Date: 14 Nov 1996 21:09:40 GMT

Rick,
 Thanks for responding. I had already tried what you suggested but after
a few mails with David Miller (one of the Pine authors), here is what my
problem was;
  My 'netscape' was not the ACTUAL executable but a shell script wrapper
written by our sys-admins which did some house-keeping and and then invoked
the actual netscape. But Pine launches it like this
 (netscape -remote .... ; rm /var/tmp/<myfile>)

So, you see, by the time the actual netscape is invoked, the file is GONE :)

Duh.. I felt quite foolish at how trivial the solution turned out to be i.e.
calling the actual netscape executable from my mailcap file :)

Thanks,
--Vikas

On 14 Nov 1996 17:52:54 GMT, Rick Troxel <[email-masked]> wrote:

>I think I got these mailcap entries by replying to the author of a post,
>rather than seeing them posted here.  I believe they will meet your
>needs.
>
># HTML Support, courtesy Glenn A Malling
># Try to use an existing netscape instantiation; if not, start one
>text/html; netscape -remote "openFile(%s)" || netscape %s; \
>        test=test -n "$DISPLAY" -a -z "$LYNX_VERSION"
># When display is not set and lynx isn't already running
># Don't know whether a URL can be passed to a running lynx instantiation
>text/html; lynx -force_html %s; \
>        test=test -z "$DISPLAY" -a -z "$LYNX_VERSION"; needsterminal
>

---

From: [email-masked] (Rick Troxel)
Date: 14 Nov 1996 17:52:54 GMT

In article <[email-masked]> [email-masked] (Orjan
Johansen) writes:

   In article <[email-masked]>, Vikas
   Agnihotri <[email-masked]> wrote:
   [snip]   
   >  I used the 'remote' option because I want it to display the HTML
   >file in a already running Netscape process.

   Someone somewhere posted a script which would detect if Netscape was
   already running and start a new one only if it wasn't. That could be
   useful here.

Regards,
--
   Rick Troxel     [email-masked]     [email-masked]
     http://www.dc-sage.org/bios/rick_troxel  301/435-2983
/////////////////////////////////////////////////////////////////
All effort and exertion put forth by man from the fullness of his
heart is worship, if it  is prompted  by the  highest motives and
the will to do service to humanity.                 --Abdu'l-Baha