[18796] in Athena Bugs

home help back first fref pref prev next nref lref last post

linux 8.4.20: htmlview

daemon@ATHENA.MIT.EDU (Jacob Morzinski)
Tue Feb 20 13:47:08 2001

Message-Id: <200102201847.NAA01649@well.mit.edu>
To: bugs@MIT.EDU
Date: Tue, 20 Feb 2001 13:47:03 -0500
From: "Jacob Morzinski" <jmorzins@MIT.EDU>

System name:		well.mit.edu
Type and version:	i686 8.4.20
Display type:		XFree86 3.3.6 Mach64

Shell:			/bin/sh
Window manager:		fvwm2

What were you trying to do?
	Use pine and htmlview to view a text/html email attachment.

What's wrong:
	Pine consults the mailcap for the rule to use.  It saves
	the attachment data to a file, "/tmp/img-HTM001438", and
	then runs htmlview on that file.  If I have no DISPLAY
	set, htmlview uses lynx.  But because the file does not
	have a ".html" suffix, lynx renders it as text/plain data
	rather than text/html data.

	Since we're running "htmlview", we can probably assume
	that we know that the file is text/html.  It would make
	sense to force lynx to assume html as well.

What should have happened:
	If /usr/athena/bin/htmlview invoked lynx with the
	"-force_html" command-line option, lynx would render html
	properly, even if the filename did not end in .html.

Please describe any relevant documentation references:
	Here's a possible patch:


--- htmlview.orig	Tue Feb 20 13:41:24 2001
+++ htmlview	Tue Feb 20 13:40:38 2001
@@ -63,7 +63,7 @@
 # If $DISPLAY is not set, just start lynx
 case "$DISPLAY" in
   "")
-    exec /bin/athena/attachandrun infoagents lynx lynx "$url"
+    exec /bin/athena/attachandrun infoagents lynx lynx -force_html "$url"
     ;;
 esac
 
@@ -100,7 +100,7 @@
 echo "$0: Could not run Netscape.  Will try Lynx." >&2
 
 # Start Lynx
-/bin/athena/attachandrun infoagents lynx lynx "$url"
+/bin/athena/attachandrun infoagents lynx lynx -force_html "$url"
 
 echo "$0: Could not find or start any WWW browser." >&2
 exit 1

home help back first fref pref prev next nref lref last post