1XMESSAGE(1)                 General Commands Manual                XMESSAGE(1)
2
3
4

NAME

6       xmessage - display a message or query in a window (X-based /bin/echo)
7

SYNOPSIS

9       xmessage [ -buttons label1[:value1],label2[:value2], ...  ] [ options ]
10       -file filename
11       xmessage [ -buttons label1[:value1],label2[:value2], ...  ] [ options ]
12       message ...
13

DESCRIPTION

15       The  xmessage  program  displays a window containing a message from the
16       command line, a file, or standard input.  Along the lower edge  of  the
17       message  is  row  of  buttons; clicking the left mouse button on any of
18       these buttons will cause xmessage to exit.  Which button was pressed is
19       returned  in  the  exit status and, optionally, by writing the label of
20       the button to standard output.
21
22       The program is typically used by shell scripts to  display  information
23       to the user or to ask the user to make a choice.
24
25       Unless  a  size is specified, xmessage sizes itself to fit the message,
26       up to a maximum size.  If the message is too big for the window,  xmes‐
27       sage will display scroll bars.
28

OPTIONS

30       These  are the command line options that xmessage understands, in addi‐
31       tion to the standard ones listed in X(7).
32
33       -buttons button,button,...
34               This option will cause xmessage to create one button  for  each
35               comma-separated button argument.  The corresponding resource is
36               buttons.  Each button consists of a label  optionally  followed
37               by  a  colon  and  an exit value.  The label is the name of the
38               Command button widget created and will be the default text dis‐
39               played  to  the  user.  Since this is the name of the widget it
40               may be used to change any of the resources associated with that
41               button.   The  exit  value will be returned by xmessage if that
42               button is selected.  The default exit value  is  100  plus  the
43               button  number.   Buttons  are  numbered from the left starting
44               with one.  The default string if no -buttons option is given is
45               okay:0.
46
47       -default label
48               Defines the button with a matching label to be the default.  If
49               not specified there is no default.  The corresponding  resource
50               is  defaultButton.   Pressing  Return  anywhere in the xmessage
51               window will activate the default button.   The  default  button
52               has a wider border than the others.
53
54       -file filename
55               File  to display.  The corresponding resource is file.  A file‐
56               name of `-' reads from standard input.  If this option  is  not
57               supplied, xmessage will display all non-option arguments in the
58               style of echo.  Either -file or a message on the  command  line
59               should be provided, but not both.
60
61       -print  This  will  cause  the program to write the label of the button
62               pressed to standard output.  Equivalent to setting  the  print‐
63               Value  resource to TRUE.  This is one way to get feedback as to
64               which button was pressed.
65
66       -center Pop up the window at the center of the screen.   Equivalent  to
67               setting the center resource to TRUE.
68
69       -nearmouse
70               Pop up the window near the mouse cursor.  Equivalent to setting
71               the nearMouse resource to TRUE.
72
73       -timeout secs
74               Exit with status 0 after secs  seconds  if  the  user  has  not
75               clicked  on  a button yet.  The corresponding resource is time‐
76               out.
77

WIDGET HIERARCHY

79       Knowing the name and position in the hierarchy of each widget is useful
80       when  specifying resources for them.  In the following chart, the class
81       and name of each widget is given.
82
83       Xmessage (xmessage)
84            Form form
85                 Text message
86                 Command (label1)
87                 Command (label2)
88                 .
89                 .
90                 .
91

RESOURCES

93       The program has a few top-level application resources that  allow  cus‐
94       tomizations that are specific to xmessage.
95
96       file    A String specifying the file to display.
97
98       buttons A  String  specifying the buttons to display.  See the -buttons
99               command-line option.
100
101       defaultButton
102               A String specifying a default button by label.
103
104       printValue
105               A Boolean value specifying whether  the  label  of  the  button
106               pressed to exit the program is written to standard output.  The
107               default is FALSE.
108
109       center  A Boolean value specifying whether to pop up the window at  the
110               center of the screen.  The default is FALSE.
111
112       nearMouse
113               A  Boolean  value  specifying whether to pop up the window near
114               the mouse cursor.  The default is FALSE.
115
116       timeout The number of seconds after which to exit with status  0.   The
117               default is 0, which means never time out.
118
119       maxHeight (class Maximum)
120               The  maximum  height  of the text part of the window in pixels,
121               used if no size was specified in the geometry.  The default  is
122               0, which means use 70% of the height of the screen.
123
124       maxWidth (class Maximum)
125               The  maximum  width  of  the text part of the window in pixels,
126               used if no size was specified in the geometry.  The default  is
127               0, which means use 70% of the width of the screen.
128

ACTIONS

130       exit(value)
131               exit  immediately  with  an  exit  status of value (default 0).
132               This action can be used with translations to provide  alternate
133               ways of exiting xmessage.
134
135       default-exit()
136               exit  immediately with the exit status specified by the default
137               button.  If there is no default button, this action has no  ef‐
138               fect.
139

EXIT STATUS

141       If it detects an error, xmessage returns 1, so this value should not be
142       used with a button.
143

SEE ALSO

145       X(7), echo(1), cat(1)
146

AUTHORS

148       Chris Peterson, MIT Project Athena
149       Stephen Gildea, X Consortium
150
151
152
153X Version 11                    xmessage 1.0.6                     XMESSAGE(1)
Impressum