d9a156ccd92bbb2124ab34ac8bf2aba637238879
[profile/ivi/syslinux.git] / README.menu
1 There are two menu systems included with SYSLINUX, the advanced menu
2 system, and the simple menu system.
3
4
5 +++ THE ADVANCED MENU SYSTEM +++
6
7 The advanced menu system, written by Murali Krishnan Ganapathy, is
8 located in the menu/ subdirectly.  It allows the user to create
9 hierarchial submenus, dynamic options, checkboxes, and just about
10 anything you want.  It requires that the menu is compiled from a
11 simple C file, see menu/simple.c and menu/complex.c for examples.
12
13 The advanced menu system doesn't support serial console at this time.
14
15 See menu/README for more information.
16
17
18 +++ THE SIMPLE MENU SYSTEM +++
19
20 The simple menu system is a single module located at
21 com32/modules/vesamenu.c32 (graphical) or com32/modules/menu.c32 (text
22 mode only).  It uses the same configuration file as the regular
23 SYSLINUX command line, and displays all the LABEL statements.
24
25 To use the menu system, simply make sure [vesa]menu.c32 is in the
26 appropriate location for your boot medium (the same directory as the
27 configuration file for SYSLINUX, EXTLINUX and ISOLINUX, and the same
28 directory as pxelinux.0 for PXELINUX), and put the following options
29 in your configuration file:
30
31 DEFAULT menu.c32
32 PROMPT 0
33
34
35 There are a few menu additions to the command line, all starting with
36 the keywords MENU or TEXT; like the rest of the SYSLINUX config file
37 language, it is case insensitive:
38
39 MENU TITLE title
40
41         Give the menu a title.  The title is presented at the top of
42         the menu.
43
44 MENU HIDDEN
45
46         Do not display the actual menu unless the user presses a key.
47         All that is displayed is a timeout message.     
48      
49 MENU LABEL label
50
51         (Only valid after a LABEL statement.)
52         Changes the label displayed for a specific entry.  This allows
53         you to have a label that isn't suitable for the command line,
54         for example:
55
56         # Soft Cap Linux
57         LABEL softcap
58                 MENU LABEL Soft Cap ^Linux 9.6.36
59                 KERNEL softcap-9.6.36.bzi
60                 APPEND whatever
61
62         # A very dense operating system
63         LABEL brick
64                 MENU LABEL ^Windows CE/ME/NT
65                 KERNEL chain.c32
66                 APPEND hd0 2
67
68         The ^ symbol in a MENU LABEL statement defines a hotkey.
69         The hotkey will be highlighted in the menu and will move the
70         menu cursor immediately to that entry.
71
72         Reusing hotkeys is disallowed, subsequent entries will not be
73         highlighted, and will not work.
74
75         Keep in mind that the LABELs, not MENU LABELs, must be unique,
76         or odd things will happen to the command-line.
77
78
79 MENU HIDE
80
81         (Only valid after a LABEL statement.)
82         Suppresses a particular LABEL entry from the menu.
83
84
85 MENU DEFAULT
86
87         (Only valid after a LABEL statement.)
88         Indicates that this entry should be the default.  If no
89         default is specified, use the first one.
90
91
92 TEXT HELP
93 Help text ...
94 ... which can span multiple lines
95 ENDTEXT
96
97         (Only valid after a LABEL statement.)
98         Specifies a help text that should be displayed when a particular
99         selection is highlighted.
100
101
102 MENU PASSWD passwd
103
104         (Only valid after a LABEL statement.)
105         Sets a password on this menu entry.  "passwd" can be either a
106         cleartext password or a SHA-1 encrypted password; use the
107         included Perl script "sha1pass" to encrypt passwords.
108         (Obviously, if you don't encrypt your passwords they will not
109         be very secure at all.)
110
111         If you are using passwords, you want to make sure you also use
112         the settings "NOESCAPE 1", "PROMPT 0", and either set
113         "ALLOWOPTIONS 0" or use a master password (see below.)
114
115         If passwd is an empty string, this menu entry can only be
116         unlocked with the master password.
117
118
119 MENU MASTER PASSWD passwd
120
121         Sets a master password.  This password can be used to boot any
122         menu entry, and is required for the [Tab] and [Esc] keys to
123         work.
124
125
126 MENU BACKGROUND background
127
128         For vesamenu.c32, sets the background image.  The background
129         can either be a color (see MENU COLOR) or the name of an image
130         file, which should be 640x480 pixels and either in PNG or JPEG
131         format.
132
133
134 INCLUDE filename
135 MENU INCLUDE filename
136
137         Include the contents of the configuration file filename at
138         this point.
139
140         In the case of MENU INCLUDE, the included data is only seen by
141         the menu system; the core syslinux code does not parse this
142         command, so any labels defined in it are unavailable.
143
144
145 MENU AUTOBOOT message
146
147         Replaces the message "Automatic boot in # seconds".  The
148         symbol # is replaced with the number of seconds remaining.
149
150
151 MENU TABMSG message
152
153         Replaces the message "Press [Tab] to edit options".
154
155
156 MENU NOTABMSG message
157
158         Takes the place of the TABMSG message if option editing is
159         disabled.  Defaults to blank.
160
161
162 MENU PASSPROMPT message
163
164         Replaces the message "Password required".
165
166
167 MENU COLOR element ansi foreground background shadow
168
169         Sets the color of element "element" to the specified color
170         sequence:
171
172         screen          Rest of the screen
173         border          Border area
174         title           Title bar
175         unsel           Unselected menu item
176         hotkey          Unselected hotkey
177         sel             Selection bar
178         hotsel          Selected hotkey
179         scrollbar       Scroll bar
180         tabmsg          Press [Tab] message
181         cmdmark         Command line marker
182         cmdline         Command line
183         pwdborder       Password box border
184         pwdheader       Password box header
185         pwdentry        Password box contents
186         timeout_msg     Timeout message
187         timeout         Timeout counter
188         help            Help text
189         msgXX           Message (F-key) file attribute XX
190
191         ... where XX is two hexadecimal digits (the "plain text" is 07).
192
193         "ansi" is a sequence of semicolon-separated ECMA-48 Set
194         Graphics Rendition (<ESC>[m) sequences:
195
196         0     reset all attributes to their defaults
197         1     set bold
198         4     set underscore (simulated with color on a color display)
199         5     set blink
200         7     set reverse video
201         22    set normal intensity
202         24    underline off
203         25    blink off
204         27    reverse video off
205         30    set black foreground
206         31    set red foreground
207         32    set green foreground
208         33    set brown foreground
209         34    set blue foreground
210         35    set magenta foreground
211         36    set cyan foreground
212         37    set white foreground
213         38    set underscore on, set default foreground color
214         39    set underscore off, set default foreground color
215         40    set black background
216         41    set red background
217         42    set green background
218         43    set brown background
219         44    set blue background
220         45    set magenta background
221         46    set cyan background
222         47    set white background
223         49    set default background color
224
225         These are used (a) in text mode, and (b) on the serial
226         console.
227
228         "foreground" and "background" are color codes in #AARRGGBB
229         notation, where AA RR GG BB are hexadecimal digits for alpha
230         (opacity), red, green and blue, respectively.  #00000000
231         represents fully transparent, and #ffffffff represents opaque
232         white.
233
234         "shadow" controls the handling of the graphical console text
235         shadow.  Permitted values are "none" (no shadowing), "std" or
236         "standard" (standard shadowing - foreground pixels are
237         raised), "all" (both background and foreground raised), and
238         "rev" or "reverse" (background pixels are raised.)
239
240         If any field is set to "*" or omitted (at the end of the line)
241         then that field is left unchanged.
242
243
244         The current defaults are:
245
246         menu color screen       37;40      #80ffffff #00000000 std
247         menu color border       30;44      #40000000 #00000000 std
248         menu color title        1;36;44    #c00090f0 #00000000 std
249         menu color unsel        37;44      #90ffffff #00000000 std
250         menu color hotkey       1;37;44    #ffffffff #00000000 std
251         menu color sel          7;37;40    #e0000000 #20ff8000 all
252         menu color hotsel       1;7;37;40  #e0400000 #20ff8000 all
253         menu color scrollbar    30;44      #40000000 #00000000 std
254         menu color tabmsg       31;40      #90ffff00 #00000000 std
255         menu color cmdmark      1;36;40    #c000ffff #00000000 std
256         menu color cmdline      37;40      #c0ffffff #00000000 std
257         menu color pwdborder    30;47      #80ffffff #20ffffff std
258         menu color pwdheader    31;47      #80ff8080 #20ffffff std
259         menu color pwdentry     30;47      #80ffffff #20ffffff std
260         menu color timeout_msg  37;40      #80ffffff #00000000 std
261         menu color timeout      1;37;40    #c0ffffff #00000000 std
262         menu color help         37;40      #c0ffffff #00000000 std
263         menu color msg07        37;40      #90ffffff #00000000 std
264
265
266 MENU MSGCOLOR fg_filter bg_filter shadow
267
268         Sets *all* the msgXX colors to a color scheme derived from the
269         fg_filter and bg_filter values.  Background color zero is
270         always treated as transparent.  The default corresponds to:
271
272         menu msgcolor #90ffffff #80ffffff std
273
274         This directive should come before any directive that
275         customizes individual msgXX colors.
276
277
278 MENU WIDTH 80
279 MENU MARGIN 10
280 MENU PASSWORDMARGIN 3
281 MENU ROWS 12
282 MENU TABMSGROW 18
283 MENU CMDLINEROW 18
284 MENU ENDROW -1
285 MENU PASSWORDROW 11
286 MENU TIMEOUTROW 20
287 MENU HELPMSGROW 22
288 MENU HELPMSGENDROW -1
289 MENU HIDDENROW -2
290 MENU HSHIFT 0
291 MENU VSHIFT 0
292
293         These options control the layout of the menu on the screen.
294         The values above are the defaults.
295
296         A negative value is relative to the calculated length of the
297         screen (25 for text mode, 28 for VESA graphics mode.)
298
299
300 F1 textfile background
301 ...
302 F12 textfile background
303
304         Displays full-screen help (also available at the command line.)
305         The same control code sequences as in the command line
306         interface are supported, although some are ignored.
307
308         Additionally, a second argument allows a different background
309         image (see MENU BACKGROUND for supported formats) to be displayed.
310
311
312 The menu system honours the TIMEOUT command; if TIMEOUT is specified
313 it will execute the ONTIMEOUT command if one exists, otherwise it will
314 pick the default menu option.
315
316 Normally, the user can press [Tab] to edit the menu entry, and [Esc]
317 to return to the SYSLINUX command line.  However, if the configuration
318 file specifies ALLOWOPTIONS 0, these keys will be disabled, and if
319 MENU MASTER PASSWD is set, they require the master password.
320
321 The simple menu system supports serial console, using the normal
322 SERIAL directive.  However, it can be quite slow over a slow serial
323 link; you probably want to set your baudrate to 38400 or higher if
324 possible.  It requires a Linux/VT220/ANSI-compatible terminal on the
325 other end.
326
327
328         +++ USING AN ALTERNATE CONFIGURATION FILE +++
329
330
331 It is also possible to load a secondary configuration file, to get to
332 another menu.  To do that, invoke menu.c32 with the name of the
333 secondary configuration file.
334
335 LABEL othermenu
336         MENU LABEL Another Menu
337         KERNEL menu.c32
338         APPEND othermenu.conf
339
340 If you specify more than one file, they will all be read, in the order
341 specified.  The dummy filename ~ (tilde) is replaced with the filename
342 of the main configuration file.
343
344 # The file graphics.conf contains common color and layout commands for
345 # all menus.
346 LABEL othermenu
347         MENU LABEL Another Menu
348         KERNEL vesamenu.c32
349         APPEND graphics.conf othermenu.conf
350
351 # Return to the main menu
352 LABEL mainmenu
353         MENU LABEL Return to Main Menu
354         KERNEL vesamenu.c32
355         APPEND graphics.conf ~
356
357 See also the MENU INCLUDE directive above.