Re: MIME RasMol on SGI

Robin Stephenson (ubcgs7l@mail.cryst.bbk.ac.uk)
Tue, 30 May 1995 13:48:26 +0100 (BST)

On Sat, 27 May 1995, Iddo Friedberg wrote:

> Hi,
> I've been trying to MIME RasMol on SGI from Netscape. My .mailcap entry
> is:
>
> chemical/x-pdb; rasmol %s
>
> The problem: when running rasmol from a Unix shell, a window opens with
> the graphical display, and the command line is in the unix shell from
> which I typed the rasmol command. Now when firing up rasmol MIMEd from
> Netscape, I only get the graphical display. I tried running it in
> a new shell, but it doesn't seem to work. Any advice?
>
> Thanks,
> Iddo
>

I include my ~/.mailcap file - this works fine for me.
Robin

# Example .mailcap file for SGI machines
#
# First a note about syntax:
# The first token in a configuration line represents a mime type.
# A mime type is of the form "SubGroup/Item" and either token
# can be replaced by the wildcard character "*"
#
# the second token is the command that you would run
# when the specified mime type is encountered. An example
# would be "xv %s" where %s will be replaced by a filename
#
# remaining tokens represent name value pairs.
#
# the "test=" pair invokes the test command
# specified and checks the UNIX shell return code to see if the
# test passed. If the test passes the mime mapping is made, otherwise
# the mapping is not made.
#
# the "stream-buffer-size=" pair tells the application
# to use a popen command to invoke the program specified and to
# pipe all data into the command. Only programs that can handle
# piped input can use this method. When this method is used
# a "%s" should not be included in the command. You should
# make sure that the program you wish to use can accept piped
# data by trying something like this before using it:
# cat "YOUR_DATA_FILE_HERE" | COMMAND_TO_TEST
#
# You may continue lines by using the backslash character "\"

# plays AIFF files
audio/x-aiff; sfplay %s

# plays AIFC files
audio/x-aifc; sfplay %s

# use this preferentially to do streaming audio if you have
# the playulaw program
#audio/basic; playulaw; stream-buffer-size=2000

# otherwise, if you don't have playulaw, use this
audio/basic; sfplay %s

# use this to play MPEG audio if you have maplay installed
#audio/x-mpeg; maplay -; stream-buffer-size=2000

# default movie player
video/*; movieplayer -l0 %s

# use this to play MPEG video files if you have mpeg_play installed
video/mpeg; mpeg_play -dither 2x2 -loop %s

# here is an interesting command that enables you to sit
# in front of a different UNIX machine than the one where
# you are running the Netscape Navigator and still here audio.
#
#audio/basic; rsh YOUR_HOST_HERE /usr/local/bin/playulaw; \
# test=test `hostname`x != YOUR_HOST_HEREx; stream-buffer-size=2000

# use this to display postscript files
application/postscript; ghostview -a4 %s

# this is the default for non GIF or JPEG images
image/*; /local/IRIX52/bin/xv %s

# if you would prefer an external viewer for GIF and JPEG images
# uncomment the following lines for XV to act as your external viewer.
image/gif; /local/IRIX52/bin/xv %s
image/jpg; /local/IRIX52/bin/xv %s
image/jpeg; /local/IRIX52/bin/xv %s

# chemical mime
chemical/x-pdb; xterm -bg black -fg powderblue -fn Screen15 -T RasMol -e /cr/c2a/user1/ubcgs7l/bin/rasmol %s
chemical/x-peak; ~/bin/sendras %s
chemical/x-csml; ~/bin/csml %s
chemical/x-kinemage; /cr/c2a/user1/ubcgs7l/bin/mage %s

--
Robin Stephenson                                                  ____/|
email mailto:ubcgs7l@mail.cryst.bbk.ac.uk                         \ o.O|
WWW   http://www.cryst.bbk.ac.uk/~ubcgs7l/home.html                =(_)=
pgp   http://www.cryst.bbk.ac.uk/~ubcgs7l/pgpkey.html                U
tel   +44(0)181 3481793 home
      +44(0)831 509073  mobile
Offer Good While Supplies Last