ALERT(1)

NAME
alert - display a warning message in a window

SYNOPSIS
alert [ -z ] [ -standard X Toolkit options ... ] "TITLE" text to be displayed

DESCRIPTION
Alert is a utility to issue a warning message to the user. It displays a warning symbol, some justified text and a button in a window. The button should be clicked with the mouse to acknowledge the alert and close the window.

If the connection to the X server cannot be established, the title and text is printed on alert's standard output and the user is requested to press RETURN to acknowledge the message.

Alert can take the following option:

-z  No Zoom. The window will attempt to by pass the window manager and appear immediately, rather than going through the window manager's placement and sizing scheme.

Alert additionally recognizes the following standard X Toolkit command line arguments:

-bg colour or -background colour
    This option specifies the colour to use for the background of the window and widgets. The default is `white.'

-bd colour or -bordercolor colour
    This option specifies the colour to use for the border of the main window. The default is `black.'

-bw number or -borderwidth number
    This option specifies the width in pixels of the border surrounding the main window.

-fg colour or -foreground colour
    This option specifies the colour to use for all text and symbols. The default is `black'.

-fn font
    This option specifies the font to be used for displaying the text warning message. The default is `serif10'.

-name name
    This option specifies the application name under which resources are to be obtained, rather than the default executable file name, `alert'.

-geometry geometry
    This option specifies the preferred size and position of the alert window; see X(1);

-display display
    This option specifies the X server to contact; see X(1).

-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 options.

X DEFAULTS
Alert is implemented using the Athena widgets. Each widget can individually or in groups have various visual and operational aspects changed via a `.Xdefaults' file on the client machine or the `RESOURCE_MANAGER' property on the server. All widgets have a common set of resources (background, backgroundPixmap, etc.) and resources unique to each type of widget; a `command button' widget, for example, also has a cursor resource. For a full list see the document X Toolkit Widgets - C Language X Interface.

The path names and types of all widgets used by alert are as follows:

XXX.alert/yorn
    The widget that is a child of root. All the other widgets used by the alert box are children or grand children of this widget.

XXX.alert/yorn.contents
    A form widget that manages the layout of the alert box. Normally completely covers the alert/yorn widget.

XXX.alert/yorn.contents.symbol
    A widget to display the alert symbol.

XXX.alert/yorn.contents.ok/yes button
    A command button widget to obtain an acknowledgement from the user, normally displaying an `equals' symbol.

XXX.alert/yorn.contents.message
    A widget to display and format the text message.

The `XXX' may be replaced by either alert's classname, `Xopentop', or its application name, `alert'.

Additionally, the following items are also fetched from the resource database:

alertsym
    The pathname of a bitmap file to use as an alternative to the `exclamation-mark-in-a-triangle' symbol displayed in the `symbol' widget.

oksym
    The pathname of a bitmap file to use as an alternative to the `equals' symbol displayed in the `ok/yes button' widget.

backgroundPixmap.foreground
    One of two colours (the other is the widget's background colour) required when converting a bitmap file into a pixmap for use as the widget's background pixmap.

RETURN CODES

    0 - Termination via the acknowledge box.

    2 - Termination due to some internal error.

ENVIRONMENT

DISPLAY - the default host name and display number of the X server.

XENVIRONMENT - the name of the Xdefaults file to use, normally
    $HOME/.Xdefaults.

EXAMPLES

    alert "Low disk space" Warning: There are less than 200 free disk blocks

Will open an alert box with the title Low disk space and containing the text Warning: There are less than 200 free disk blocks

FILES
$HOME/.Xdefaults /usr/lib/X11/app-defaults/Xopentop

SEE ALSO
gs(1), yorn(1)

BUGS

If the font is too large or the message too long, the text will be clipped.

The title may not be displayed if the window manager does not provide title bars around windows or the -z option is used.

AUTHOR
Gary Henderson & Mark E. Howells, Torch Computers Ltd.