Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xmessage(1) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X(1)

xmessage(1)  —  USER COMMANDS

NAME

xmessage − X window system message display program

SYNOPSIS

xmessage [−options ...] −buttons button-list −message message
xmessage [−options ...] −buttons button-list file
xmessage [−options ...] −timeout seconds [−buttons button-list] −message message
xmessage [−options ...] −timeout seconds [−buttons button-list] file

DESCRIPTION

xmessage opens a window on the screen that will contain the text of a message from either the command line (−message form) or from a file.  In the latter case, if the file is specified as “−”, stdin is used. 

Along the lower edge of the message is a list of command buttons that, when selected with the mouse, cause xmessage to go away.  If the −timeout option is specified, then there may be no buttons present. 

xmessage can be used as a method for shell scripts to present the user with information much as the echo command allows in a tty environment.  xmessage also allows the recipient (the user’s display where xmessage is sent) to answer simple questions.  xmessage communicates the recipients answer to the sender by printing the name of a selected button on the sender’s standard output and by the exit status code. 

It should be noted that this program is intended for short messages, and will be quite slow when asked to handle long files from stdin. 

COMMAND LINE OPTIONS

In addition to the standard toolkit options, xmessage accepts the following:

−buttons string This option creates one button for each comma-separated argument string, where string is a comma-separated list composed of button_name[:exitcode] button_name specifies the name of the button. If exitcode is specified, then xmessage will exit with that exit status; otherwise, it will exit with an exit status of zero.  As an example, to create a button labeled "Yes" which will cause xmessage to exit with a status of 0, and a button labeled "No" which will cause xmessage to exit with a status of 1, specify: xmessage −buttons "Yes:0,No:1" Since button_name becomes the name of the Command widget, it may be used to change any of the X resources associated with that button. 

−message string
This option displays the string.  If the string contains spaces or tabs, it should be enclosed in quotes.

−print This option prints on standard output the name of the button that was selected.  This is the default. 

−noprint This option suppresses printing of the name of the selected button. 

−timeout seconds
This option specifies the number of seconds that the xmessage window should wait for a button to be pushed before exiting.  If you use −timeout, then −buttons is optional.  When xmessage exits because of a timeout, it exits with a status of zero. 

WIDGET TREE

In order to specify resources, it is useful to know the hierarchy of the widgets which compose xmessage.  In the notation below, indentation indicates hierarchical structure.  The widget class name is given first, followed by the widget instance name. 

The following example shows the widget tree when invoked with -buttons "Yes,No":

XMessage xmessage
Form  form
Text  text
Command  Yes
Command  No

EXIT STATUS

See the descriptions of the -buttons and -timeout options. 

SEE ALSO

X(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026