FACES(1)

NAME
faces - visual mail, and list face server.

SYNOPSIS
faces [ -A ] [ -B soundfile ] [ -C audiocmd ] [ -I ] [ -M ] [ -P ] [ -S spooldir ] [ -a ] [ -b background ] [ -bg color ] [ -c columns ] [ -d display ] [ -e program ] [ -f facepath ] [ -fg color ] [ -fn font ] [ -g geometry ] [ -h height ] [ -iconic ] [ -i ] [ -l label ] [ -n ] [ -p period ] [ -rv ] [ -s spoolfile ] [ -t ] [ -u ] [ -v ] [ -w width ]

DESCRIPTION
Faces is a window based tool for visual monitoring lists. Typically it is used to monitor mail, but it is also capable of running a user supplied program or shell script. It contains a graphical interface for Gtk. It has three different modes of operation:

The default (no -a or -e arguments) will monitor for new mail. By default, only the last ten messages are displayed. Using the left mouse button it is possible to toggle the text in the faces window. This will either be the username or the time the mail message arrived. You can clear this area to the background pattern by hitting the Delete key (but see below, under set button1clear). The icon shows the image of the last message to arrive.

The second choice (-a) is to monitor the whole of a mail file. The open window will automatically adjust its size to correctly show the face icons. The open window options are the username or the timestamp and number of message from that user. The icon will display the image of the last message, and a count of the total number of messages in the spool file or mail folder.

Finally you can specify a program or shell script to run (-e). The standard output from this program will be read by the faces program, and the appropriate faces displayed using the information provided. The format of this face information is given in the faces manual page.

There are special displays for no mail, no faces found, no print jobs, no paper in the printer, and no users logged into a machine.

OPTIONS

-A  Enable audio support (where applicable).

-B soundfile
    The name of the sound file to play instead of making the bell sound. Audio support has to be enabled.

-C audiocmd
    An alternative command to use to play the audio files. Audio support has be be enabled.

-I  Read mail from an IMAP mail server. As faces starts, a popup will be displayed. The user will need to supply their IMAP server name, and their username and password. If this information is valid, faces will connect to that IMAP server, and display the faces associated with the user mail as described above. Note that faces needs to be build with IMAP support enabled for this option to work.

-M  Used when the user is using a mail reader which is capable of shrinking the mail spoolfile (Elm and MH mail being two such examples) and the default mail monitoring facility within faces adjusts accordingly.

-P  Read mail from a POP mail server. As faces starts, a popup will be displayed. The user will need to supply their POP server name, and their username and password. If this information is valid, faces will connect to that POP server, and display the faces associated with the user mail as described above. Note that faces needs to be build with POP support enabled for this option to work.

-S spooldir
    Specify an alternate mail spool directory. The folder that will be monitored will then be spooldir/username where username is the name of the user currently logged in.

-a  Monitor the whole of the specified mail file. The icon and open window display the appropriate faces, and dynamically change size as a new check is made and if the mail file has altered size.

-b background
    X11 bitmap file containing an alternate background pattern. The default is root grey.

-bg color
    The background pixel color to use.

-c columns
    Number of columns of face images in each row. By default this is 10.

-d display
    The X11 display name to use.

-e program
    Name of the user program to run. This program or shell script will generate lines which the faces program will read, and then display the appropriate face images. The format of these input records is described in a later section.

-f facepath
    If specified, this is a colon-separated list of paths to be searched for face images. A null entry in the path will be replaced by the compiled in default face directory. If not specified, the directories specified by the FACEPATH environment variable will be used. If there is no FACEPATH environment variable, the default face directory will be searched. The default face directory is normally /usr/local/share/faces. Note that in previous versions of faces, a -f option added the directory to the search path, which already consisted of the system default faces. Using the -f option now, supercedes the system default faces, and you must include a trailing colon in the list of paths, in order to have them included.

-fg color
    The foreground pixel color to use.

-fn font
    The font to use for displaying face names and timestamps.

-g geometry
    Geometry information to use.

-h height
    The height of each face image in pixels. Note that this is the height of the area allocated to each image, and not necessarily the height of the displayed image inside.

-iconic
    Start the faces program up in iconic form.

-i  Invert the faces images before displaying them.

-l label
    The label to be used in the title line of the faces window.

-n  Do not display the number of messages from this person. The default is to display, and a count is shown at the bottom right corner of the face for this person.

-p period
    The period in seconds before the mail spool file or the print queue is scanned again for new mail. The default is 60 seconds.

-rv Displays the faces in pseudo-reverse video by reversing the foreground and background colors.

-s spoolfile
    Use an alternate mail spool file to monitor. The default is /var/mail/username where username is the name of the user currently logged in.

-t  Do not display a timestamp of the last message from this person. The default is to display, and a timestamp is shown at the bottom left corner of the face for this person.

-u  Do not display the username on the face icon. The default is to display, and the username will appear over the face icon, when the window is opened.

-v  Print the version number of this release of the faces program.

-w width
    The width of each face image in pixels. Note that this is the width of the area allocated to each image, and not necessarily the width of the displayed image inside.

AUDIO SUPPORT
Faces is capable of playing sounds for each user when monitoring for new mail. Audio support needs to have been compiled in, and also needs to be enabled, and there must be a face.au file present for that user (see FACE FORMATS below). A special command is used to play the sounds. This can be overridden by a command line option or an X resource.

FACE FORMATS
There is a special faces directory containing a multi-level hierarchy, which by default is /usr/local/share/faces. The first few levels are the machine name, where each part of the machine name is at a separate level. One level below this is the user name, and one level below that is the actual face image, which can be stored in four formats. If the file is named face.xpm then it is an X11 pixmap file. If it is called face.xbm then it is an X11 bitmap formatted image. Multiple formats can be stored in the same username directory, and the one used will depend upon which graphics interface is currently being used.

For example, the face.xbm file for user joe at host machine.att.com would be stored in the hierarchy:
/com/att/machine/joe/face.xbm

It is also possible to store audio files in the faces directory. These files are called face.au, and should be stored under the appropriate user directory.

To access the face for the mail name machine.dom.ain!uid take the result of the first successful open from the following list of files (where $DIR represents iteration over the list of directories in FACEPATH):
    $DIR/ain/dom/machine/uid/iconname
    $DIR/ain/dom/uid/iconname
    $DIR/ain/uid/iconname
    $DIR/MISC/uid/iconname
    $DIR/ain/dom/machine/unknown/iconname
    $DIR/ain/dom/unknown/iconname
    $DIR/ain/unknown/iconname
    $DIR/MISC/unknown/iconname
If the -f argument is specified the given directory is searched instead of /usr/local/share/faces. The iconname above, consists of the following choices, in the given order:
Gtk | - | face.xpm, | face.xbm
Domain names are fully supported. For example, if mail arrives from foo@a.b.c then faces will use the directories c/b/a, c/b and c for the machine name. The directory MISC hold faces for generic users such as root and uucp. If the faces directory hierarchy is not found, then a blank face image will be used.

Faces information is administered by a pair of ASCII files in the faces directory that associate related machines and faces. The machine table machine.tab attaches machines to communities; the line
    stard=sunaus
puts the machine stard in community sunaus. The machine table may be used to alias entire communities; the line
    wseng.sun.com=eng.sun.com
will cause the wseng.sun.com domain to be mapped to the eng.sun.com community. The people table associates a community/alias pair, with a real username.
    sunaus/rburridge=richb
causes the alias rburridge to be translated into the real username richb for the community sunaus

Note that you still need to use mailtool or some other mail reading utility to actually read the mail that this program monitors; faces simply displays who the mail is from.

When new mail arrives, faces will beep and flash appropriately, depending upon the set parameters in the user's faces startup file. This is looked for in the user's home directory; first the file .facesrc is tried, and if that file is not found, .mailrc is looked for. The file, if found, will be examined for lines in the following form:

set bell = number
    Give the number of times faces will ring the bell when new mail arrives.

set flash = number
    Give the number of times faces will flash the window when new mail arrives.

set raise
    faces will raise the window when new mail arrives.

set lower
    faces will lower the window when there is no mail left in the monitored spoolfile.

set button1clear
    For those who liked the behaviour of previous versions of faces, this causes button 1 to clear the window (like typing Delete). The ``toggling'' function of button 1 is moved to button 2 if this option is set. If you are using the X11 version, these parameters may be set via your X resources rather than the faces startup file. See the X DEFAULTS section for more details.

If you are using the NeWS version and creating face images of the face.ps form, then the following points should be noted: All graphics operations should be performed on the unit square; and the final image will be translated to a 64 x 64 square image at the appropriate position in the faces display.

If you are using the -e option, then the user program or shell script needs to generate a set of records which are interpreted by the faces program. The first record should be in the following fixed format, beginning at column 1:
    Cols=mm Rows=nn
where mm is the size in columns for the faces window and icon, and nn is the size in rows. A window will be generated with these dimensions.

This record is followed by the face information records. These records can have upto six fields, each one TAB separated. As well as providing the username and hostname, there are four other fields which can be filled in, which denote what is displayed on the left or the right sides of the bottom area of each face image in the normal display and the alternate display (normally selectable by clicking the left mouse button).

The fields are:

    username
    hostname
    normal left
    normal right
    alternate left
    alternate right

Any of these fields may be left blank. There are also four special usernames, which will display the appropriate standard icons. These are NOMAIL, NOPAPER, NOPRINT and NOUSERS.

There can also be one optional information record for the faces icon display. This uses the first four of these fields, and if this record is present, it should be before the Cols record. If not present, then the icon will contain the same display and text as the last window unformation record.

XFACE SUPPORT
Faces is capable of recognising a compressed face image in the mail message header. It uses special X-Face: lines to do this. It is very simple to add your compressed face image to a mail header.

The following method works for Berkeley Mail (aka /usr/ucb/mail), Open Windows mailtool and mush. It probably works for others too.

It is suggested that each user store the compressed image (generated by compface ) in a file called .face in their home directory. See the compface manual page for more information on how to generate the compressed face image. The first line should have the X-Face: prepended; second and subsequent lines should have a preceding tab, and there should be a trailing blank line. Here is a typical .face file:

X-Face: *7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
	VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
	qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4@L

Each user should add the line:

set sendmail=/usr/local/bin/faces.sendmail

to their ~/.mailrc file, where /usr/local/bin is the directory where your faces binaries were installed.

A similar method exists with the Elm mailer. The user's compressed face image should be setup in a ~/.face file, but without the initial "X-Face:", and leading spaces removed from each line. There is also no trailing blank line. Here's an example:

*7O.<19S{MCsaxxe=iCc*y5!i:>e,K40m^btp"<`~gNx5>o?eJMzUng=j]%KybY
VaZ/3a4pD%#rGu7D<M$.TDpaDN8#8eJC&^^&Mr]@~}Pa,*F-ePrMg5.}e,,bu
qROdT{Vzn{!ouXy.&*#V#Q&Zf7a8lX2Kb}"$UT^VhnsJ?){wFU5r+,duO>4@L

To automatically include this into a header into an Elm mail message, just add the following line to your .elm/elmheaders file:

X-Face: `cat $HOME/.face`

X DEFAULTS

The Gtk version of faces uses the following X resources. Faces will now initially try to read resources from whatever the environment variable FACESDEFAULTS points to. If that's not set, it will try to read resources from $HOME/.facesdefaults

audioCommand
    The name of the command to use to play audio files.

audioSupport
    Enable audio support (where applicable).

background
    The window's background color. The default value is white.

backgroundPixmap
    The pixel map to use for tiling the background of the faces window or icon. The default value is the default X11 root background pattern.

bell
    The number of times to ring the bell when new mail arrives.

bellAudioFile
    The name of an audio file to play instead of sounding the bell.

button1clear
    A boolean (default: false), if set, causes faces to revert to the old button behavior, namely, button 1 clears the window, and button two toggles the display.

displayHostname
    A boolean (default: false), if set, causes faces to display the hostname rather than the username if the icon represents a username rather than a hostname.

flash
    Give the number of times to flash the window when new mail arrives.

font
    The text font. The default value is fixed.

foreground
    The foreground color. The default value is black.

geometry (class Geometry)
    The size and location of the faces window.

iconGeometry (class Geometry)
    The size and location of the faces window.

imap
    Read users mail from an IMAP mail server.

lower
    A boolean (default: false), if true causes to lower it's window when there is no mail left in the monitored spoolfile.

pop Read users mail from a POP mail server.

raise
    A boolean (default: false), if true caused to raise it's window when new mail arrives.

SEE ALSO
mail(1), elm(1), mush(1), aliases(7).

FILES

/var/mail
    directory for system mailboxes

$HOME/.facesrc
    faces startup file

$HOME/.mailrc
    mail startup file (examined if .facesrc doesn't exist)

/usr/local/share/faces
    main directory containing the face icons.

/usr/local/share/faces/people.tab
    people/file equivalences

/usr/local/share/faces/machine.tab
    machine/community equivalences

ENVIRONMENT VARIABLES

DISPLAY
    The X11 server to be used by the Gtk faces program to display the face icons on.

FACEDEFAULTS
    Name of the file containing the X resource information for faces.

FACEPATH
    A colon separated list of directory paths to search for machine/user face icons.

HOME
    The home directory of the current user. Used to locate the .facesrc or .mailrc file.

MAIL
    The complete pathname of the mail spool file to monitor.

HISTORY
faces is based on the Bell Labs Edition 8 program vismon(9). This program is not derived from vismon source.

BUGS
The machine and people table lookup is hopelessly inefficient and will need to be improved as the faces database gets larger.

AUTHOR
Rich Burridge, | (rich.burridge@Sun.COM)