Changing the MH Environment

[previous] [next] [table of contents] [index]

As the Section Settings from the Environment explains, some MH commands add environment variables that are passed to environments of their child processes. MH commands also read their own environments, set by their parent processes. For example, if the variable MHCONTEXT is set, MH commands will use that pathname for the MH context file instead of the file named context in the MH directory.

The Table below was adapted from the mh-profile(5) manual page. For more description of each environment variable, see that manual page. This table doesn't include environment variables used by parts of MH (like BBoards) which this book doesn't cover.

Table: Environment Variables that MH Checks

HOME (checked by all commands)
Full pathname of your home directory.
MAILDROP (checked by inc)
Default maildrop (like /usr/spool/mail/ehuser).
MH (checked by all commands)
Pathname of MH profile (default: .mh_profile in home directory). (See NOTE after table.)
MHCONTEXT (checked by all commands)
Pathname of context file.
NOMHNPROC (checked by show, next, prev)
Don't run mhnproc (usually mhn) for MIME messages.
SIGNATURE (checked by send, post)
Your name, for From: field (for example, "Emma H. User").
TERM, TERMCAP (checked by scan, mhl)
Terminal information; see the environ(5) manual page.

NOTE: xmh Release 4, and possibly earlier versions too, ignore the MH environment variable at startup time. It always reads the .mh_profile in your home directory to find the Path: of your MH directory. There's a workaround in Section Conflicts Between xmh and MH Customization.

[Table of Contents] [Index] [Previous: Settings from the Environment] [Next: Writing Your Own Draft Message Editor(s)]


Last change $Date: 1996/06/06 15:09:10 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jerry@ora.com>

Questions or problems regarding this web site should be directed to Steve Gielda.
Copyright 1999 www.cotse.com.  All rights reserved.
Last modified: Friday April 02, 1999.