Re: MIME support
Hi folks!
>>>>> "Brian C White" writes:
>> It would also be (very) nice if install-info produced a mailcap
>> file that works under both X and the console. Packages could then
>> register themselves as supporting type image/gif (say) under X or
>> the console or both.
>
> That would be much more difficult. I don't see how, as a plain
> file, "mailcap" could differentiate.
There exists a 'test' clause in the mailcap syntax. To my knowledg
only NCSA Mosaic does not implement it (Look at the mailcap example
from Lynx!), but that can be handled if the X11 entries come first!
So the mailcap could look like:
-------------------------------------------------------------------------
# Image viewers
image/*; xv %s; test=test -n "$DISPLAY"
image/*; zgv %s; test=test -z "$DISPLAY"
# MPEG viewer:
video/mpeg; mpeg_play %s; test=test -n "$DISPLAY"
video/mpeg; vgamp %s; test=test -z "$DISPLAY"
# Quicktime viewer:
video/quicktime; xanim +Ae +Ss2 %s; test=test -n "$DISPLAY"
# AVI viewer:
video/x-msvideo; xanim +Ae +Ss2 %s; test=test -n "$DISPLAY"
# Audio player:
audio/basic; auplay %s; test=test -n "$AUDIOSERVER"
audio/x-aiff; auplay %s; test=test -n "$AUDIOSERVER"
audio/x-mpeg; maplay %s
audio/x-pn-realaudio; raplayer %s; test=test -n "$DISPLAY"
audio/x-wav; auplay %s; test=test -n "$AUDIOSERVER"
# Xing StreamWorks Audio/Video Viewer
application/x-xdma; xnetview %s; test=test -n "$DISPLAY"
# MBONE Sessions
application/x-sd; sd-launch %s; test=test -n "$DISPLAY"
# Postscript viewer
application/postscript; ghostview -DSAFER %s; test=test -n "$DISPLAY"
application/postscript; gs -DSAFER %s; test=test -z "$DISPLAY"
--------------------------------------------------------------------------
Cheers,
Dominik
Reply to: