xmailbox - mailbox checker for X using XPM icons
...] [-option ...]
program displays, by default, an image of a mailbox. When
there is no mail, the image shown is that of a mailbox with its flag down.
When new mail arrives, the image changes to that of a mailbox with the flag
up, its door open and a letter visible inside. It can also optionally play a
sound through the SUN workstation's internal speaker or a PC equipped with a
sound-card running Linux. The NCD audio server, the rplay sound package, the
standard SUN audio driver, Linux and FreeBSD Sun-compatible audio drivers, and
an external sound player program are supported. By default, pressing any mouse
button in the image forces xmailbox
to remember the current size of the
mail file as being the ``empty'' size and to change its image accordingly. In
addition, the user can optionally invoke his/her favorite mail retrieving
This program is nothing more than a wrapper around the Mailbox
included with the program's source distribution.
accepts all of the standard X Toolkit command line options along
with the additional options listed below:
- This option indicates that a brief summary of the allowed options should
be printed on the standard error.
- -update seconds
- This option specifies the frequency in seconds at which xmailbox
should update its display. If the mailbox is obscured and then exposed, it
will be updated immediately. The default is 30 seconds.
- -file filename
- This option specifies the name of the file which should be monitored. By
default, it watches /usr/spool/mail/ username, where
username is your login name.
- -volume percentage
- This option specifies how loud the bell should be rung when new mail comes
in, or, if the sound option is used, how high the playing volume should
be. The default is 33 percent.
The following standard X Toolkit command line arguments are commonly used with
- -display display
- This option specifies the X server to contact.
- -xrm resourcestring
- This option specifies a resource string to be used. This is especially
useful for setting resources that do not have separate command line
The application class name is XMailbox. This program uses the Mailbox
widget. It understands all of the core resource names and classes as well as:
- checkCommand (class CheckCommand)
- Specifies a shell command to be executed to check for new mail rather than
examining the size of file. The specified string value is used as
the argument to a system(3) call and may therefore contain i/o
redirection. An exit status of 0 indicates that new mail is waiting, 1
indicates that there has been no change in size, and 2 indicates that the
mail has been cleared. By default, no shell command is provided.
- file (class File)
- Specifies the name of the file to monitor. The default is to watch
/usr/spool/mail/ username, where username is your login
- onceOnly (class Boolean)
- Specifies that the bell is only rung the first time new mail is found and
is not rung again until at least one interval has passed with no mail
waiting. The window will continue to indicate the presence of new mail
until it has been retrieved. The default is false.
- update (class Interval)
- Specifies the frequency in seconds at which the mail should be checked.
The default is 30.
- volume (class Volume)
- Specifies how loud the bell should be rung, or, if the sound option is
used, how high the playing volume should be. The default is 33
- mailXpmFile (class MailXpmFile)
- Specifies the XPM file used when mail exists in the mailbox.
- nomailXpmFile (class NomailXpmFile)
- Specifies the XPM file used when there is no mail (or no new mail) in the
- mailSndFile (class MailSndFile)
- Specifies the sound file used when mail exists in the mailbox. If no file
is specified, the standard X Window beep sound is used.
- mailSndComm (class MailSndComm)
- Specifies an external sound player program to execute when new mail exists
in the mailbox. You can use "%s" in the command to include the
sound file defined in mailSndFile. In the following example,
"%s" will be replaced by "/usr/lib/sounds/ugotmail.au"
when xmailbox executes.
xmailbox*mailSndComm: /usr/bin/play %s
- mailapp (class MailApp)
- Specifies the mail retrieving application to run when the user clicks on
the mailbox image. The specified string value is used as the argument to a
- mailNumOfXpmFile (class MailNumOfXpmFile)
- Specifies the number of Xpm files to be used for animation. The range of
values can be between 1 and 8. The default value is 1 = no animation. See
ANIMATION section below for details.
- mailAnimUpdate (class MailAnimUpdate)
- Specifies the interval of displaying a series of Xpm icons in
milliseconds. The default is 1000 milliseconds or 1 second. See ANIMATION
section below for details.
- mailAnimOnce (class MailAnimOnce)
- Specifies the whether the XPM icon animation sequence is repeated
continuously or only once. The default is "false", that is,
repeat until the user clicks on the icon.
widget provides the following actions for use in event
- This action causes the widget to check for new mail and display the flag
- This action causes the widget to lower the flag until new mail comes
- This action causes the widget to lower the flag until new mail comes in,
and to start any mail-reading application defined via the mailapp
- This action causes the widget to raise the flag until the user resets
The default translation is
i.e. with a double click you lower the flag and start your mail-reading
application, while with a single click you only acknowledge the mail in your
mailbox, lowering the flag.
has built-in support for eye-catching animation when new mail
comes in, in addition to the optional sound support. Animation can be achieved
by displaying a sequence of XPM icons with slight differences in each icon.
The interval of displaying different icons is controlled by
measured in milliseconds. Values between 500 and 1000
seems to provide smooth animation. However, you should experiment with this
parameter on your system.
In order to use this feature, you have to create a series of XPM icons with a
base name such as "xmail.xpm" in a directory such as
"/usr/X11/lib/icons/pixmap". Now, for each XPM icon created, prepend
a number before the base name starting from 0. For example, you've created
"0xmail.xpm", "1xmail.xpm", "2xmail.xpm", and
"3xmail.xpm". Now, set the mailNumOfXpmFile
entry to a value
of "4" since there are four XPM icons created. Finally, set the
entry to "/usr/X11/lib/icons/pixmap/xmail.xpm".
Note that "xmail.xpm" does not have any numbers prepended. When you
and a new mail comes in, xmailbox
will show the
icons "0xmail.xpm", ..., "3xmail.xpm",
"0xmail.xpm", ..., "3xmail.xpm", ... in that sequence
until you've pressed the icon.
If you do not specify mailXpmFile
but set a value other than
1 to mailNumOfXpmFile
will toggle between the internal
"mail" and "nomail" icons.
- to get the default host and display number.
- to get the name of a resource file that overrides the global resources
stored in the RESOURCE_MANAGER property.
Dimitrios P. Bouras (firstname.lastname@example.org)
The first version of xmailbox was a hack based on the X11R5 XBiff written by Jim
Fulton, MIT X Consortium, and Ralph Swick, DEC/MIT Project Athena.
William K. W. Cheung (email@example.com)
Added optional sound output using the standard SUN audio driver, Linux's
Sun-compatible audio driver, the rplay sound package, or the NCD audio server,
as well as optional mail application execution upon clicking on the mail icon.
Added the capability to show a series of XPM icons when new mail arrives.
Brian Clapper (firstname.lastname@example.org)
Added extra compiling options to allow sound support under FreeBSD 2.0.5 and
Laurent Martin (martin@@isia.cma.fr)
Added the capability to use an external sound player application to play a sound
when new mail arrives.
Xbiff is Copyright 1988, X Consortium. See X(1)
for a full statement of
rights and permissions.