Setting Up For An X Window System Display

For an X Window System display, it's better to create a separate mhn-specific profile in addition to your .mh_profile, and to refer to that separate profile with the environment variable $MHN. This allows you to keep different profiles for displays with different capabilities.

One simple way to set the MHN environment variable for different displays is to use this command:

% setenv MHN ~/.mhn_profile.`hostname`

This causes mhn to look for its defaults in the named file. The `hostname` part in backticks turns into the name of your host.

If you're using an X terminal separate from your host, then you'll need to use the name of the X terminal instead.

If it hasn't been done for you already, you need to initialize your environment to use the X Window System. Methods vary from system to system, but might be as simple as typing this command:

% setenv DISPLAY `hostname`:0
...or this:
% xinit

If your host is named fungus, and the $MHN variable is set as shown in a previous example above, then you can define an mhn profile in your home directory named .mhn_profile.fungus. The contents of that file might be specific to the console display of a Sun SPARCstation IPC, designated as X Window System display fungus:0, and could look like this:

mhn-show-image: xv -geometry =-0+0 -imap -igeom =-0+0 '%f'
mhn-compose-audio/basic:         audiotool '%f' && raw2audio -F < '%f'
mhn-compose-audio/x-next:        audiotool '%f' && adpcm_enc < '%f'
mhn-show-audio/basic:            raw2audio 2>/dev/null | play
mhn-show-audio/x-next:           audiotool -p '%f'
mhn-show-application/PostScript: pageview '%F'
mhn-show-text/richtext:          richtext -p '%F'
mhn-show-video/mpeg:             mpeg_play -quiet -loop '%F'
mhn-cache:                       /r/mhn-cache

The programs specific to the Sun SPARCstation in the example above are the audio-related programs, raw2audio, play, adpcm_enc, and audiotool; and the PostScript display tool, pageview.

Which audio programs to use and how to set up to use them is highly dependent on the type of workstation you have. An explanation is given in appendix [*].

Here is an explanation of each line in the previous mhn profile:


\begin{comdesc}
% latex2html id marker 331\item[mhn-show-image:\ xv -geometry ...
...ssages created with {\tt mhn} do have the
necessary information.)
\end{comdesc}

As you may have guessed from the ``pipe'' symbols and other UNIX shell metacharacters in the example above, mhn invokes /bin/sh to interpret the commands.

The difference between ``%F'' (upper case) and ``%f'' (lower case) elsewhere is that for ``%F,'' mhn runs only one program at a time, and leaves the program's standard input connected to the terminal.

There are other ``%'' escape codes used by mhn. These are described in section [*].