
   [USEMAP]
   
                                  [INLINE]
                                      
                     A Generic Plugin for Unix Netscape
                                      
What is it

   X Swallow is a plugin i've cobbled together to allow any X program to
   be used as an inline viewer for any appropiate mime type. So a mime
   type like vrml for which there does not exist, as of the moment, a
   plugin for linux netscape can be viewed inline to netscape with
   ordinary vrml viewers such as vrweb/liquid reality. Also it has all
   the abilities of mimeplugin by Carl Shimer & Michael J Long on which
   Xswallow is based and can be therefore be used to handle mimetypes
   that are handled by programs with no graphical interface, audio
   formats for the most part.
   
   The mimetypes i use it for myself are vrml/mpeg and audio formats, you
   might find Plugger, UMP(for midi really) and MpegTV (mpeg, but
   troublesome with netscape 4) more appropiate for other types.
   
   Ive heard reports that with mad amounts of hacking with java
   converters, you can get xswallow to view flash animations, but theres
   no need, theres a linux flash plugin available here.
   
   Last bug fix was to add a patch to explain why xswallow couldnt work
   without a cache dir.
   
   (btw i know that running netscape -install will make the plugin use
   wrong colors and stuff, ill have that all working soon, soon i tell
   you)
   
   Im feeling pretty confident now that this thing works reliably, so if
   it crashes, does something particularly silly or doesnt compile on
   your platform, tell me, (sending me fixes is good)
   
What do i need

   An X viewer or interfaceless program for that mimetype and the
   xswallow plugin for your platform.
   Netscape3.01 (watch out for a netscape 3 bug though) and the entire 4
   series to date (<=4.5) all work without problems
   Heres a picture of it doing its thing.
   
How do i set it up

     * 1) Get the ordinary viewers, make sure they work
     * 2) copy the plugin to your .netscape/plugins directory
       if you are copying the plugin to the systemwide directory make
       sure that your NPX_PLUGIN_PATH variable is set appropiately, or
       you may have difficulties, also remember to set MOZILLA_HOME
       appropiately e.g for tcsh
setenv NPX_PLUGIN_PATH /usr/local/netscape4/plugins/
setenv MOZILLA_HOME /usr/local/netscape4/
       this can be set systemwide by placing those lines in
       /etc/csh.cshrc
     * 3) copy the xswallow.conf to your .netscape directory (or
       systemwide e.g /usr/local/netscape4) and edit it appropiately.
     * 4) if you use dispatch-vrml-c, edit the first couple of lines to
       reflect your site's setup
     * 5) you must have a cache directory, i.e ~/.netscape/cache,
       reportedly if that doesnt exist, then netscape wont give the
       plugin a filename to use.
       
   Each mime type in the file is as follows.
   
   [INLINE]
# MIME type      Extensions     Command
SwallowName                             Description
x-world/x-vrml;  vr,wrl;        /home/caolan/bin/dispatch-vrml-c %s %u &w %h ;
"VRweb Scene Viewer" "Applet Viewer" ;  Embedded Vrml

   [USEMAP]
   First the mime type section, then the extensions section, Thats all
   fairly handy and straightforward. Then theres the command to be run to
   handle that type.
     * %s is replaced by the plugin with the filename to run the
       application on
     * %u is replaced with the url thats being accesses
     * %w is the width that netscape has provided for the plugin
     * %h is the height that netscape has provided for the plugin
       
   For the most part the only one of these you probably need to use
   usually is %s and maybe %u on ocassion
   See problems for why i have dispatch-vrml-c as my vrml viewer.
   
   Now the catchy bit. The SwallowName is the name that your
   windowmanager displays in the title bar of the application that you
   will be running, The xswallow plugin will match the word shown here
   against the beginning of the string displayed in the titlebar so for
   example. the swallowname "VRweb Scene Viewer" will match against the
   displayed "VRweb Scene Viewer: random.wrl". There can be multiple
   names listed in this section seperated by spaces. If the program to be
   used is not an X program or you dont want the X program to be
   relocated then leave this section blank. As an example if you use an X
   program to handle sound, you really shouldnt fill in the swallowname,
   as many pages put embedded midi etc in a nominally sized plugin-space,
   e.g 1x1 and if swallowed most X programs will be pretty useless at
   such a size.
   The last field is just a description field to be displayed in the
   about:plugins display of netscape.
   
   My xswallow.conf
   
   Basically it will now all work happily. You may have to go to the
   netscape preferences window and manually set netscape to use the
   plugin for the various embedded type as well. And if you add new types
   to the xswallow.conf you'll have to delete plugin-list and
   plugin-list.BAK to get netscape to reregister the new types. Another
   point is that if you dont have a xswallow.conf, Xswallow will appear
   not to exist at all, i.e it wont show up on the about:plugins
   Now on to some more details to make the setup easier to live with.
     _________________________________________________________________
   
Fixes for Annoyances with XSwallow

   The plugin runs the application, waits for the a window with the
   swallowname title to appear, and then relocates it into the space
   provided in netscape. The issues relating to this are
   
     * 1)
       If for instance you have vrweb as the command then vrweb will
       popup on screen for a sec and then relocate, which is a highly
       annoying behaviour, especially if you have a windowmanager that
       makes you place an application on screen when it first appears. To
       overcome this use
       vrweb -geometry 80x80+9000+9000
       This makes vrweb popup automatically without having to locate the
       box on screen manually for all windowmangers i am aware of, also
       it is located way off to the right and down, off screen. For most
       windowmangers this means that you'll not see the original popup of
       the application. So that'll avoid the annonyance of the
       reshuffling that xswallow does. Also for most users
       vrweb -iconic
       would start it as an icon, so if you have a windowmanger that
       doesnt allow a application to be started off screen, i suggest you
       try this method, (note for fvwm95 users that the iconic method
       should not be used, instead use the geometry method, due to some
       wierdness i havent worked out)
     * 2)
       Because the plugin searches for an app with the registered title
       to swallow, if a currently running application has that name then
       it will be swallowed instead !!, thats bad, but this can be
       overcome for most X apps by adding a -name commandline option e.g
       xv -name barf &
       and then setting the swallowname to barf (or some other unique
       name), nullifying the issue of xswallow relocating the incorrect
       window.
       
Some problems I havent got fixes for (and think aren't my fault)

     * 1) Alas the applications that i personally use for the plugins are
       vrweb/liquid reality and xanim. None of which allow me to change
       the name of the title bar via the -name method. So i run the risk
       of swallowing the wrong window if im already running vrweb/lr or
       xanim and xswallow suddenly needs to find one of these window
       names, but i find in practice that for me it all works out pretty
       ok.
     * 2) There doesnt appear to be a vrml viewer for linux that does
       vrml1 and vrml2, there one for each, so i use a script called
       dispatch-vrml-c to distinguish between the two types and to run
       the appropiate program. Its based on dispatch-vrml by Johan Hagman
       (Johan.Hagman@mailbox.swipnet.se), and tweaked to suit the
       architecture of the plugin. It does some useful stuff, sets the
       size of the appletviewer that lr uses to the size of the space
       provided and sorts out a few other issues. You'll have to edit the
       first 3 lines or so for your site.
     * 3) If you use netscape 3 and load a page with embedded audio that
       uses the hidden flag, then for some fool reason the plugin doesnt
       even get loaded to deal with the audio, under netscape4 everything
       is hunky-dory. Why ?, i havent a notion, The plugin doesnt even
       get loaded so i am tentively claiming that its not my fault.
     _________________________________________________________________
   
Download Plugin

   version 1.0.10 failed with redirection as part of the command e.g. cat
   %s > /dev/audio
   version 1.0.11 will hang without explanation if the netscape cache dir
   doesnt exist
   version 1.0.12 works fine.
     * Linux compiled version 1.0.12
     * Linux intel architecture compiled rpm version 1.0.10
     * Src rpm version 1.0.11, courtesy Michael J. Long
     * FreeBSD compiled version 1.0.10, courtesy Vladimir Kushnir
     * hpux 10.20 compiled version 1.0.10, courtesy Bjorn Wennberg
     * OSF/1 compiled version 1.0.10, courtesy Stephen Childs
     * SGI compiled version 1.0.10, courtesy Oliver Kiddle
     * Unixware 2.1.2 version 1.0.10, courtesy Geoff Clare, probably good
       for all unixware 2.x.x
     * SCO's Unixware distribution 1.0.10, courtesy sco
     * Solaris 2.6 sparc version 1.0.12, courtesy Jason H. Reeves
     * Solaris 2.6 x86 version 1.0.12, courtesy Jason H. Reeves
     * Source for everyone else (1.0.12).
       If you compile it for a platform not listed here, could you mail
       me that compiled version, and whatever fixes had to be made to the
       makefile/source (if any)
       
Test Plugin

     * vrml1 test
     * vrml2 test
     * midi test
     * sun audio test
     * mpeg test
     * avi test
       
The apps i use for XSwallow

     * Vrweb 1.5 for vrml1, which seems to be out of date now, try vrwave
     * once upon a time there was a company called dimensionx that made
       liquid reality, lr ran on unix and windows, microsoft bought
       dimensionx, and lr was on their site here, now this link points to
       someother rubbish, and liquid reality appears as dead as the dodo,
       this is just one example of the many ideas and companies that ms
       has bought and buried
       Nonetheless i've mirrored the liquid reality browser here. also
       you can get this little script to enable lr Anchor and AudioClip
     * dispatch-vrml-c to run the above, included in plugins distribution
     * Playmidi for midi
     * xanim for mpeg and other video formats
       
   more info on this swallowing jazz.
     _________________________________________________________________
   
                             Skynet Home Page 
