Technical article 109056

How to set up Mosaic to use a viewer other than xloadimage.

OpenServer 5.0.0

Written · Last revised

Problem

I want to set up Mosaic to use image and movie players other than the xloadimage xclient.

Solution

The mailcap file is a configuration file that maps MIME
(Multipurpose Internet Mail Extensions) types to external
viewers (MIME is defined by RFC 1521). An example would be
mapping MIME type image/gif to the image viewer "xv".  By
default, the systemwide mailcap file is
/usr/lib/scomail/mailcap; user specific mailcap files
are $HOME/.mailcap.  However, Mosaic uses its own mailcap
file, /usr/lib/X11/Mosaic/mailcap.  The format for this
file is the same as for the scomail mailcap file.  You
can point Mosaic to use the same file as scomail by setting
the resource:
Mosaic*globalTypeMap:    /usr/lib/scomail/mailcap
in the file /usr/lib/X11/app-defaults/Mosaic (this is the
default resource definition file for Mosaic).  By editing
/usr/lib/scomail/mailcap, you can redefine the systemwide
MIME extension mappings as shown below:
# This is a simple example mailcap file.
# Lines starting with '#' are comments.
# This maps all types of audio data (audio/basic, audio/x-aiff,
# etc.) to the viewer 'showaudio'.  Note that '%s' means 'put
# the datafile name here when the viewer is executed'.
audio/*; showaudio %s
# This maps all types of images (image/gif, image/jpeg, etc.)
# to the viewer 'xv'.
image/*; /usr/bin/X11/xv %s
# This maps MPEG video data to the viewer 'mpeg_play'.
video/mpeg; mpeg_play %s
# This maps all types of video *other than MPEG* to the viewer
# 'genericmovie'.
video/*; genericmovie %s
application/postscript; ghostview %s
application/x-dvi; xdvi %s
NOTE: You may need to specify the entire path to the viewer,
as in the example for the xv viewer above.  If you wish to
make these changes ONLY for Mosaic, do not change the
/usr/lib/X11/app-defaults/Mosaic resource file.  Instead,
edit the file /usr/lib/X11/Mosaic/mailcap as described above.

From the Xinuos technical article database, record 109056. Reproduced with permission. The original is at www.sco.com/ta/109056, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.