Configuring Xmosaic

You'll find life on the Web easier if you take a little time to customize your environment:

Reset some of your X Defaults by adding these to your ~/.Xdefaults file:

  • Mosaic*homeDocument: Put a pointer to your own Home Page here
  • Mosaic*defaultWidth:, Mosaic*defaultHeight: I like to use a larger window
  • Mosaic*geometry: I like it to be in the same place every time
  • Mosaic*PlainFont, Mosaic*Font: Use fonts that support foreign characters
  • Mosaic*background: Change the background color?
  • Mosaic*visitedAnchorColor: Make the "visited" color something other than BLACK (e.g., RED)
  • Mosaic*documentsMenuSpecfile: Add useful documents to your menu bar, if your webmaster hasn't already
  • Mosaic*globalExtensionMap: Declare types for file extensions
  • XTerm*charClass: Make it easier to cut and paste URLs from an xterm
  • For Example:
    Mosaic*homeDocument: /afs/cs/user/mwm/www/home.html 
    Mosaic*defaultWidth:800 
    Mosaic*defaultHeight:875 
    Mosaic*geometry: +0+0 
    Mosaic*PlainFont: -adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1 
    Mosaic*Font: -adobe-times-medium-r-normal-*-17-*-*-*-*-*-iso8859-1 
    Mosaic*background: LightCyan 
    Mosaic*visitedAnchorColor: #b0b000000000 
    Mosaic*documentsMenuSpecfile: /afs/cs.cmu.edu/Web/documents.menu
    Mosaic*globalExtensionMap: /afs/cs/misc/mosaic/common/omega/lib/mime.types
    XTerm*charClass:33:48,35-43:48,45-47:48,58:48,61:48,63-64:48,126:48 
    
    Making Changes If you make any changes to these resources, you'll have to quit XMosaic, load the changes into the X server (using xrdb -merge ~/.Xdefaults), and restart XMosaic for them to take effect.

    Define the display tools in the MIME-derived .mailcap file.

    Your ~/.mailcap file defines the tools that will be used to display the data downloaded from the Net. On the IUS Suns you will probably want to use a .mailcap file like the one below.

    Displaying Images For TIFF images you should use xv, but for almost any other format xli is much faster. However, for URT images it's not clear which program to use. To be consistent with other image formats you might prefer xli, but sometimes URT image files are really animations, and then only getx11 can display them. It's up to you, if you prefer xli then delete the line that begins image/x-urt. ( [BINARY] xli source is available)

    Feel free to change this file to suit your needs, but be aware that Mailcap files are parsed from top to bottom. So make sure you put any generic patterns (e.g., image/*) after the list of exceptions. Otherwise the exceptions will never match, and your special viewers will not be used.

    x-world/x-vrml; /IUS/sin_www/bin/vrweb-mesa %s
    application/pdf; /IUS/sin_www/bin/run-acrobat %s
    application/postscript; /usr/local/bin/gv %s
    application/x-dvi; /usr/local/bin/xdvi %s
    audio/basic; /usr/local/pkg/openwin3.0/bin/audiotool %s
    audio/*; /IUS/sin_www/bin/run-audio %s
    image/tiff; /usr/local/bin/xv %s
    image/x-urt; /usr/local/pkg/img_utils/bin/getx11 -m %s
    image/*; /usr/local/pkg/img_utils/bin/xli -quiet %s
    message/rfc822; xterm -e /usr/local/pkg/img_utils/bin/metamail %s	
    video/x-gl; /usr/local/pkg/img_utils/bin/xviewgl %s
    video/mpeg; /usr/local/pkg/img_utils/bin/mpeg_play -quiet %s
    video/*; /usr/local/pkg/img_utils/bin/xanim %s
    
    Source code for those viewers without Web pages: our run-audio script uses sox to convert to .au format, getx11 is a small part of the Utah Raster Toolkit (look for urt- files), and xviewgl.

    Making Changes You won't need to quit XMosaic, but you will have to select the Reload Config Files choice from the Options menu for these changes to take effect.

    Adding special-purpose datafiles to the Web

    If you want to add locally-developed data files and display tools to Mosaic's knowledge, you'll need an Extention Map file in addition to the .mailcap entries. You might also like to read about Audio file formats and Movie file formats. See the CICA Web Server Info for many more useful tidbits.
    Carnegie Mellon Computer Science mwm@cs.cmu.edu
    Next, Up, Prev,