Subject: Re: External viewer for HTML messages

From: Peter Karlsson <[email-masked]>
Date: Mon, 3 Feb 1997 23:23:35 +0100

On Sun, 2 Feb 1997, Martin Struwe wrote:

> My mailcap file has the entry:
> text/html; lynx -dump -force_html %s; needsterminal; copiousoutput

Thanks. I'll try that and see how it works!

\\//
Peter - http://www.mds.mdh.se/~dat95pkn/

---

From: Peter Karlsson <[email-masked]>
Date: Wed, 5 Feb 1997 22:09:53 +0100

> Thanks. I'll try that and see how it works!

I tried that, but it didn't work very well. First of all, when I tried to
view a HTML document, nothing happened (except that I got tons of files in
/tmp), and second of all, when I tried to start lynx from the command
line, it spawned of hundreds of sessions, and the only way to stop it was
to remove the .mailcap entry.

Still open for suggestions, though.

\\//

---

From: "Robin S. Socha" <[email-masked]>
Date: Sun, 9 Feb 1997 11:54:10 +0100 (CET)

>Still open for suggestions, though.

Fine;-)

# Sets the search path for the mailcap cofiguration file.
# NOTE: colon delimited under UNIX, semi-colon delimited under
DOS/Windows/OS2.
mailcap-search-path=/etc/mailcap
		    ^^^^^^^^^^^^
# Sets the search path for the mimetypes cofiguration file.
# NOTE: colon delimited under UNIX, semi-colon delimited under
DOS/Windows/OS2.
mimetype-search-path=/etc/mailcap
		     ^^^^^^^^^^^^ 
		     
Make sure those are correct, otherwise...

Cheers,
Robin

++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++
   Robin S. Socha	 Political Incorrectness Dept.	Tel: +49(0228)22217-8
   Bonner Talweg 56	 Bonn University		Fax: +49(0228)22217-9
   53113 Bonn		 email: [email-masked]
++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++
       On the package it said: "Requires MS Windows 3.11 or better"  
	       			      ...  so I got myself Linux. 
++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++

---

From: "Robin S. Socha" <[email-masked]>
Date: Sun, 9 Feb 1997 14:47:44 +0100 (CET)

>  >> On Sun, 2 Feb 1997, Martin Struwe wrote:

Don't we all love follow-ups by the very same person? Sorry for that, but I
toyed around a bit more and found something else...

  >  >> > text/html; lynx -dump -force_html %s; needsterminal; copiousoutput
  						^^^^^^^^^^^^^  ^^^^^^^^^^^^^
At least "copiousoutput" *might* suck:

       needsterminal 
        If this flag is given, the named interpreter needs to interact with
	the user on a terminal. In some environments (e.g. a window-oriented
	mail reader under X11) this will require the creation of a new
	terminal emulation window, while in most environments it will not.
	If the mailcap entry specifies "needsterminal" and metamail is not
	running on a terminal (as determined by isatty(3), the -x option,
	and the MM_NOTTTY environment variable) then metamail will try to
	run the command in a new terminal emulation window. Currently,
	metamail knows how to create new windows under the X11, SunTools,
	and WM window systems.

       copiousoutput 
        This flag should be given whenever the interpreter is capable of
	producing more than a few lines of output on stdout, and does no
	interaction with the uer. If the mailcap entry specifies
	copiousoutput, and pagination has been requested via the "-p"
	command, then the output of the command being executed will be piped
	through a pagination program ("more" by default, but this can be
	overridden with the METAMAIL_PAGER environment variable).
             
Now, copiousoutput seems unneccessary with lynx. So I dropped it and ended
up with this entry:
	
# In the samples given   test=test -n "$DISPLAY"   is used to determine if
# the current session is X capible by checking for the existance of a
# DISPLAY environment variable.
#
# any system (VMS included) without the DISPLAY environment variable
# will be assumed to be Non-X

[..]

# A common problem with the mailcap mechanism is getting differential
# behavior from different programs. This problem is compounded by the fact
# that some programs, notably Mosaic, do not implement the "test" clause in
# mailcap files. If you are using Lynx and X Mosaic together you should
# place all X-centric entries before non-X entries. X Mosaic will use
# whichever entry is defined first so further entries will be ignored.
#
# Lynx exports the environment variable LYNX_VERSION, so if you wish to test
# if Lynx is running or not you can use 'test -n "LYNX_VERSION"'

	test=test -z "$DISPLAY" -a -z "$LYNX_VERSION"; needsterminal
	text/html; lynx  -force_html %s; needsterminal;

The following is, of course, from my .pinerc (I forgot to mention that, but
you sure knew...).

Cheers,
Robin