lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Minor XLOADIMAGE quirk


From: Thomas Dickey
Subject: Re: [Lynx-dev] Minor XLOADIMAGE quirk
Date: Sun, 20 Jul 2008 13:09:54 -0400 (EDT)

On Sun, 20 Jul 2008, Patrick wrote:

[...]
MIME_LIBDIR                         "/etc/"
[...]
and a few lines from the trace look like it's reading
from /etc/mailcap .

That would be the GLOBAL_MAILCAP setting (see lynx.cfg).
There is a compiled-in value for it, but it doesn't show up as
a compile-time option (since it's "owned" by userdefs.h, and
not set by the configure-script).

MIME_LIBDIR is set by the configure script, and is used in the
default (unpatched/unedited) userdefs.h like this:

#define GLOBAL_MAILCAP MIME_LIBDIR "mailcap"


In /etc/mailcap ;
[...]
image/png; /usr/X11R6/bin/xli '%s'; test=test -n "$DISPLAY"; description=PNG 
Image; nametemplate=%s.png
image/x-ms-bmp; /usr/X11R6/bin/xli '%s'; test=test -n "$DISPLAY"; 
description=BMP Image; nametemplate=%s.bmp
image/x-cmu-raster; /usr/X11R6/bin/xli '%s'; test=test -n "$DISPLAY"; 
description=CMU-RasterFile Image; nametemplate=%s.ras
[...]

[Please excuse the long lines.]


And in the trace file;
[...]
../HTInit.c: 465: ProcessMailcapEntry Setting up conversion image/png : 
/usr/X11R6/bin/xli '%s'
../HTInit.c: 430: ProcessMailcapEntry: Found testcommand:test -n "$DISPLAY"
../HTInit.c: 452: ProcessMailcapEntry: Ignoring mailcap flag 'nametemplate'.
../HTInit.c: 853: PassesTest: Testing for XWINDOWS environment.
../HTInit.c: 855: PassesTest: Test passed!
../HTInit.c: 465: ProcessMailcapEntry Setting up conversion image/x-ms-bmp : 
/usr/X11R6/bin/xli '%s'
../HTInit.c: 430: ProcessMailcapEntry: Found testcommand:test -n "$DISPLAY"
../HTInit.c: 452: ProcessMailcapEntry: Ignoring mailcap flag 'nametemplate'.
../HTInit.c: 853: PassesTest: Testing for XWINDOWS environment.
../HTInit.c: 855: PassesTest: Test passed!
[...]

Just two of many tests, of course.  Those are the first two
entries that mention xli, in both files.

That looks consistent

That seems more or less as it should be, except I don't see why
it's being so stubborn.  Are these values compiled in, or does it
re-read /etc/mailcap whenever it runs?  Changing it between
launches didn't seem to have any effect.

It reads the data from mailcap - mostly.  In lynx.cfg, you can specify
your own mailcap as well as the location of the global one.

Again, userdefs.h defines a symbol:

#define XLOADIMAGE_COMMAND "xli %s &"

However, you can override this in lynx.cfg:

# Unix:
# =====
# XLOADIMAGE_COMMAND will be used as a default in src/HTInit.c for
# viewing image content types when the DISPLAY environment variable
# is set.  Make it the full path and name of the xli (also know as
# xloadimage or xview) command, or other image viewer.  It can be
# anything that will handle GIF, TIFF and other popular image formats
# (xli does).  The freeware distribution of xli is available in the
# ftp://ftp.x.org/contrib subdirectory.  The shareware, xv, also is
# suitable.  You must also have a "%s" for the filename; "&" for
# background is optional.  The default is defined in userdefs.h and can be
# overridden here, or via the global or personal mailcap files (see below).
# Make this empty (but not commented out) if you don't have such a
# viewer or don't want to disable the built-in default viewer
# mappings for image types.
# Note that open is used as the default for NeXT, instead of the
# XLOADIMAGE_COMMAND definition.
# If you use xli, you may want to add the -quiet flag.
#
#XLOADIMAGE_COMMAND:xli %s &

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]