Command-line Options

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

You'll make most changes to xmh with resource entries; Section Changing How Commands Work explains that. This section explains xmh command-line options.

MH Directory Path

As explained in the Chapter Key Parts of the UNIX Filesystem, MH keeps messages, folders, and other files in a directory. By default, xmh looks for a subdirectory named Mail in your home directory. You can change that by changing the Path: entry in your MH profile. Or, you can use the -path option to xmh (but see the NOTE in the Section Conflicts Between xmh and MH Customization). For example, to use a directory named .Mail (the dot at the start of the directory name hides the directory from the ls command), you might start xmh this way:
xmh -path /xxx/yyy/.Mail &
where /xxx/yyy is your home directory.

NOTE: As explained in Section Sharing Other Users' Folders, everyone in a group can share an MH directory if they have UNIX filesystem permission to read and write to the directory. But this might not be a good idea with xmh, because xmh keeps a "snapshot" of each folder in a hidden file named .xmhcache. If one xmh user changes the contents of a folder (packing it, moving messages, and so on) the other user won't see the changes until xmh rebuilds its .xmhcache file -- or the user selects Rescan Folder.

Worse, if a folder isn't writable, you can mark messages for deletion, copying, and so on -- when you use Commit Changes, xmh gives you an error but can also update the table of contents to show that the changes have been made!

The Rescan Folder command will usually get you back to reality. But, if you need to use unwritable folders, think about using MH instead.

Initial Folder

Normally, xmh begins with a view of your inbox folder. You can change that with the -initial command-line option. For instance, to start with your project folder, use a line such as:
xmh -initial project &

Toolkit Options

Because xmh is built with the X Toolkit, it recognizes standard toolkit command-line options. For a complete list, see your online X(1) manual page.

Here are a few of the options:

-iconic
Starts xmh as an icon instead of an open window. The icon will have the folder name (like inbox) in it. See the -flag option, too.
-flag
Tries to change the xmh icon into a mailbox. The icon can look different if there's new mail. The new icon with xmh Release 5 was more neatly drawn. I like the older one, shown in the Figure below.

Figure: Old-fashioned xmh -flag mailbox icons

xfmiwwmw.gif

-bw
Sets the border width in pixels. For example:
xmh -bw 15 &
sets a 15-pixel-wide border.
-fg, -bg
Set the foreground and background colors, respectively. -bd is the border color. For instance, the following command would make red text on a dark blue background, with a yellow border and lines (don't tell my artistic friends that I said you could do this!):
xmh -fg red -bg navyblue -bd yellow &
-xrm
Lets you use other resource entries without typing them in your resource file. For a partial list of these, see the Section Changing How Commands Work. Here are a couple of useful examples.
  1. To make a pick window that's wider than it is tall (you might do this to get room for lots of Or buttons), type:
    xmh -xrm '*PickGeometry:600x450' &
    
  2. You can use more than one -xrm switch. For instance, to set the PickGeometry (as in the previous example) and also disable the default HideBoringHeaders feature (which scrolls off header fields like Received:), use:
    xmh -display :0.1 -xrm '*PickGeometry:600x450' -xrm '*HideBoringHeaders:off' &
    

[Table of Contents] [Index] [Previous: Command-line Settings] [Next: Changing How Commands Work]


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

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 <jpeek@jpeek.com>