]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/sysinstall/menus.c
Oh bollocks, I really screwed up the "auto" check here. Time
[FreeBSD/FreeBSD.git] / release / sysinstall / menus.c
1 /*
2  * The new sysinstall program.
3  *
4  * This is probably the last program in the `sysinstall' line - the next
5  * generation being essentially a complete rewrite.
6  *
7  * $FreeBSD$
8  *
9  * Copyright (c) 1995
10  *      Jordan Hubbard.  All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer,
17  *    verbatim and that no modifications are made prior to this
18  *    point in the file.
19  * 2. Redistributions in binary form must reproduce the above copyright
20  *    notice, this list of conditions and the following disclaimer in the
21  *    documentation and/or other materials provided with the distribution.
22  *
23  * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29  * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33  * SUCH DAMAGE.
34  *
35  */
36
37 #include "sysinstall.h"
38
39 #ifdef __alpha__
40 #define _AS(str) str "alpha/"
41 #else   /* i386 */
42 #define _AS(str) str "i386/"
43 #endif
44 #define _AP(str) _AS(str "/pub/FreeBSD/releases/")
45
46 /* Miscellaneous work routines for menus */
47 static int
48 setSrc(dialogMenuItem *self)
49 {
50     Dists |= DIST_SRC;
51     SrcDists = DIST_SRC_ALL;
52     return DITEM_SUCCESS | DITEM_REDRAW;
53 }
54
55 static int
56 clearSrc(dialogMenuItem *self)
57 {
58     Dists &= ~DIST_SRC;
59     SrcDists = 0;
60     return DITEM_SUCCESS | DITEM_REDRAW;
61 }
62
63 static int
64 setX11All(dialogMenuItem *self)
65 {
66     XF86Dists = DIST_XF86_ALL;
67     XF86ServerDists = DIST_XF86_SERVER_ALL;
68     XF86FontDists = DIST_XF86_FONTS_ALL;
69     Dists |= DIST_XF86;
70     return DITEM_SUCCESS | DITEM_REDRAW;
71 }
72
73 static int
74 clearX11All(dialogMenuItem *self)
75 {
76     XF86Dists = 0;
77     XF86ServerDists = 0;
78     XF86FontDists = 0;
79     Dists &= ~DIST_XF86;
80     return DITEM_SUCCESS | DITEM_REDRAW;
81 }
82
83 static int
84 setX11Misc(dialogMenuItem *self)
85 {
86     XF86Dists |= DIST_XF86_MISC_ALL;
87     Dists |= DIST_XF86;
88     return DITEM_SUCCESS | DITEM_REDRAW;
89 }
90
91 static int
92 clearX11Misc(dialogMenuItem *self)
93 {
94     XF86Dists &= ~DIST_XF86_MISC_ALL;
95     if (!XF86ServerDists && !XF86FontDists)
96         Dists &= ~DIST_XF86;
97     return DITEM_SUCCESS | DITEM_REDRAW;
98 }
99
100 static int
101 setX11Servers(dialogMenuItem *self)
102 {
103     XF86Dists |= DIST_XF86_SERVER;
104     XF86ServerDists = DIST_XF86_SERVER_ALL;
105     return DITEM_SUCCESS | DITEM_REDRAW;
106 }
107
108 static int
109 clearX11Servers(dialogMenuItem *self)
110 {
111     XF86Dists &= ~DIST_XF86_SERVER;
112     XF86ServerDists = 0;
113     return DITEM_SUCCESS | DITEM_REDRAW;
114 }
115
116 static int
117 setX11Fonts(dialogMenuItem *self)
118 {
119     XF86Dists |= DIST_XF86_FONTS;
120     XF86FontDists = DIST_XF86_FONTS_ALL;
121     return DITEM_SUCCESS | DITEM_REDRAW;
122 }
123
124 static int
125 clearX11Fonts(dialogMenuItem *self)
126 {
127     XF86Dists &= ~DIST_XF86_FONTS;
128     XF86FontDists = 0;
129     return DITEM_SUCCESS | DITEM_REDRAW;
130 }
131
132 #define _IS_SET(dist, set) (((dist) & (set)) == (set))
133
134 #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \
135         _IS_SET(dist, _DIST_DEVELOPER | DIST_DES | extra))
136
137 #define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \
138         _IS_SET(dist, _DIST_USER | DIST_DES | extra))
139
140 static int
141 checkDistDeveloper(dialogMenuItem *self)
142 {
143     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL);
144 }
145
146 static int
147 checkDistXDeveloper(dialogMenuItem *self)
148 {
149     return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_ALL);
150 }
151
152 static int
153 checkDistKernDeveloper(dialogMenuItem *self)
154 {
155     return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS);
156 }
157
158 static int
159 checkDistXKernDeveloper(dialogMenuItem *self)
160 {
161     return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_SYS);
162 }
163
164 static int
165 checkDistUser(dialogMenuItem *self)
166 {
167     return IS_USER(Dists, 0);
168 }
169
170 static int
171 checkDistXUser(dialogMenuItem *self)
172 {
173     return IS_USER(Dists, DIST_XF86);
174 }
175
176 static int
177 checkDistMinimum(dialogMenuItem *self)
178 {
179     return Dists == DIST_BIN;
180 }
181
182 static int
183 checkDistEverything(dialogMenuItem *self)
184 {
185     return Dists == DIST_ALL && _IS_SET(SrcDists, DIST_SRC_ALL) && \
186         _IS_SET(XF86Dists, DIST_XF86_ALL) && \
187         _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) && \
188         _IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL);
189 }
190
191 static int
192 DESFlagCheck(dialogMenuItem *item)
193 {
194     return DESDists;
195 }
196
197 static int
198 srcFlagCheck(dialogMenuItem *item)
199 {
200     return SrcDists;
201 }
202
203 static int
204 x11FlagCheck(dialogMenuItem *item)
205 {
206     return Dists & DIST_XF86;
207 }
208
209 static int
210 checkTrue(dialogMenuItem *item)
211 {
212     return TRUE;
213 }
214
215 /* All the system menus go here.
216  *
217  * Hardcoded things like version number strings will disappear from
218  * these menus just as soon as I add the code for doing inline variable
219  * expansion.
220  */
221
222 DMenu MenuIndex = {
223     DMENU_NORMAL_TYPE,
224     "Glossary of functions",
225     "This menu contains an alphabetized index of the top level functions in\n"
226     "this program (sysinstall).  Invoke an option by pressing [ENTER].\n"
227     "Leave the index page by selecting Cancel [TAB-ENTER].",
228     "Use PageUp or PageDown to move through this menu faster!",
229     NULL,
230     { { "Anon FTP",             "Configure anonymous FTP logins.",      dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
231       { "Commit",               "Commit any pending actions (dangerous!)", NULL, installCustomCommit },
232       { "Console settings",     "Customize system console behavior.",   NULL, dmenuSubmenu, NULL, &MenuSyscons },
233       { "Configure",            "The system configuration menu.",       NULL, dmenuSubmenu, NULL, &MenuConfigure },
234       { "Defaults, Load",       "Load default settings.",               NULL, dispatch_load_floppy },
235       { "Device, Mouse",        "The mouse configuration menu.",        NULL, dmenuSubmenu, NULL, &MenuMouse },
236       { "Disklabel",            "The disk Label editor",                NULL, diskLabelEditor },
237       { "Dists, All",           "Root of the distribution tree.",       NULL, dmenuSubmenu, NULL, &MenuDistributions },
238       { "Dists, Basic",         "Basic FreeBSD distribution menu.",     NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
239       { "Dists, DES",           "DES distribution menu.",               NULL, dmenuSubmenu, NULL, &MenuDESDistributions },
240       { "Dists, Developer",     "Select developer's distribution.",     checkDistDeveloper, distSetDeveloper },
241       { "Dists, Src",           "Src distribution menu.",               NULL, dmenuSubmenu, NULL, &MenuSrcDistributions },
242       { "Dists, X Developer",   "Select X developer's distribution.",   checkDistXDeveloper, distSetXDeveloper },
243       { "Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper },
244       { "Dists, User",          "Select average user distribution.",    checkDistUser, distSetUser },
245       { "Dists, X User",        "Select average X user distribution.",  checkDistXUser, distSetXUser },
246       { "Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll },
247       { "Distributions, XFree86","XFree86 distribution menu.",          NULL, distSetXF86 },
248       { "Documentation",        "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
249       { "Doc, README",          "The distribution README file.",        NULL, dmenuDisplayFile, NULL, "README" },
250       { "Doc, Hardware",        "The distribution hardware guide.",     NULL, dmenuDisplayFile, NULL, "HARDWARE" },
251       { "Doc, Install",         "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" },
252       { "Doc, Copyright",       "The distribution copyright notices.",  NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
253       { "Doc, Release",         "The distribution release notes.",      NULL, dmenuDisplayFile, NULL, "RELNOTES" },
254       { "Doc, HTML",            "The HTML documentation menu.",         NULL, docBrowser },
255       { "Dump Vars",            "(debugging) dump out internal variables.", NULL, dump_variables },
256       { "Emergency shell",      "Start an Emergency Holographic shell.",        NULL, installFixitHoloShell },
257 #ifdef __i386__
258       { "Fdisk",                "The disk Partition Editor",            NULL, diskPartitionEditor },
259 #endif
260       { "Fixit",                "Repair mode with CDROM or fixit floppy.",      NULL, dmenuSubmenu, NULL, &MenuFixit },
261       { "FTP sites",            "The FTP mirror site listing.",         NULL, dmenuSubmenu, NULL, &MenuMediaFTP },
262       { "Gateway",              "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" },
263       { "HTML Docs",            "The HTML documentation menu",          NULL, docBrowser },
264       { "Install, Novice",      "A novice system installation.",        NULL, installNovice },
265       { "Install, Express",     "An express system installation.",      NULL, installExpress },
266       { "Install, Custom",      "The custom installation menu",         NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
267       { "Label",                "The disk Label editor",                NULL, diskLabelEditor },
268       { "Media",                "Top level media selection menu.",      NULL, dmenuSubmenu, NULL, &MenuMedia },
269       { "Media, Tape",          "Select tape installation media.",      NULL, mediaSetTape },
270       { "Media, NFS",           "Select NFS installation media.",       NULL, mediaSetNFS },
271       { "Media, Floppy",        "Select floppy installation media.",    NULL, mediaSetFloppy },
272       { "Media, CDROM",         "Select CDROM installation media.",     NULL, mediaSetCDROM },
273       { "Media, DOS",           "Select DOS installation media.",       NULL, mediaSetDOS },
274       { "Media, UFS",           "Select UFS installation media.",       NULL, mediaSetUFS },
275       { "Media, FTP",           "Select FTP installation media.",       NULL, mediaSetFTP },
276       { "Media, FTP Passive",   "Select passive FTP installation media.", NULL, mediaSetFTPPassive },
277       { "Network Interfaces",   "Configure network interfaces",         NULL, tcpMenuSelect },
278       { "Networking Services",  "The network services menu.",           NULL, dmenuSubmenu, NULL, &MenuNetworking },
279       { "NFS, client",          "Set NFS client flag.",                 dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
280       { "NFS, server",          "Set NFS server flag.",                 dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
281       { "NTP Menu",             "The NTP configuration menu.",          NULL, dmenuSubmenu, NULL, &MenuNTP },
282       { "Options",              "The options editor.",                  NULL, optionsEditor },
283       { "Packages",             "The packages collection",              NULL, configPackages },
284       { "Partition",            "The disk Slice (PC-style partition) Editor",   NULL, diskPartitionEditor },
285       { "PCNFSD",               "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
286       { "Root Password",        "Set the system manager's password.",   NULL, dmenuSystemCommand, NULL, "passwd root" },
287       { "Router",               "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router" },
288       { "Syscons",              "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons },
289       { "Syscons, Font",        "The console screen font.",       NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
290       { "Syscons, Keymap",      "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
291       { "Syscons, Keyrate",     "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
292       { "Syscons, Saver",       "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
293       { "Syscons, Screenmap",   "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
294       { "Time Zone",            "Set the system's time zone.",          NULL, dmenuSystemCommand, NULL, "tzsetup" },
295       { "Upgrade",              "Upgrade an existing system.",          NULL, installUpgrade },
296       { "Usage",                "Quick start - How to use this menu system.",   NULL, dmenuDisplayFile, NULL, "usage" },
297       { "User Management",      "Add user and group information.",      NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
298       { "XFree86, Fonts",       "XFree86 Font selection menu.",         NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
299       { "XFree86, Server",      "XFree86 Server selection menu.",       NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
300 #ifdef __i386__
301       { "XFree86, PC98 Server", "XFree86 PC98 Server selection menu.",  NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server },
302 #endif
303       { NULL } },
304 };
305
306 /* The initial installation menu */
307 DMenu MenuInitial = {
308     DMENU_NORMAL_TYPE,
309     "/stand/sysinstall Main Menu",                      /* title */
310     "Welcome to the FreeBSD installation and configuration tool.  Please\n" /* prompt */
311     "select one of the options below by using the arrow keys or typing the\n"
312     "first character of the option name you're interested in.  Invoke an\n"
313     "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", 
314     "Press F1 for Installation Guide",                  /* help line */
315     "install",                                          /* help file */
316     { { "Select" },
317       { "Exit Install", NULL, NULL, dmenuExit },
318       { "1 Usage",      "Quick start - How to use this menu system",    NULL, dmenuDisplayFile, NULL, "usage" },
319       { "2 Novice",     "Begin a novice installation (for beginners)",  NULL, installNovice },
320       { "3 Express",    "Begin a quick installation (for the impatient)", NULL, installExpress },
321       { "4 Custom",     "Begin a custom installation (for experts)",    NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
322       { "5 Configure",  "Do post-install configuration of FreeBSD",     NULL, dmenuSubmenu, NULL, &MenuConfigure },
323       { "D Doc",        "Installation instructions, README, etc.",      NULL, dmenuSubmenu, NULL, &MenuDocumentation },
324       { "K Keymap",     "Select keyboard type",                         NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
325       { "O Options",    "View/Set various installation options",        NULL, optionsEditor },
326       { "F Fixit",      "Enter repair mode with CDROM/floppy or start shell",   NULL, dmenuSubmenu, NULL, &MenuFixit },
327       { "U Upgrade",    "Upgrade an existing system",                   NULL, installUpgrade },
328       { "L Load Config","Load default install configuration",           NULL, dispatch_load_floppy },
329       { "I Index",      "Glossary of functions",                        NULL, dmenuSubmenu, NULL, &MenuIndex },
330       { NULL } },
331 };
332
333 /* The main documentation menu */
334 DMenu MenuDocumentation = {
335     DMENU_NORMAL_TYPE,
336     "FreeBSD Documentation Menu",
337     "If you are at all unsure about the configuration of your hardware\n"
338     "or are looking to build a system specifically for FreeBSD, read the\n"
339     "Hardware guide!  New users should also read the Install document for\n"
340     "a step-by-step tutorial on installing FreeBSD.  For general information,\n"
341     "consult the README file.",
342     "Confused?  Press F1 for help.",
343     "usage",
344     { { "1 README",     "A general description of FreeBSD.  Read this!", NULL, dmenuDisplayFile, NULL, "README" },
345       { "2 Hardware",   "The FreeBSD survival guide for PC hardware.",  NULL, dmenuDisplayFile, NULL, "HARDWARE" },
346       { "3 Install",    "A step-by-step guide to installing FreeBSD.",  NULL, dmenuDisplayFile, NULL, "INSTALL" },
347       { "4 Copyright",  "The FreeBSD Copyright notices.",               NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
348       { "5 Release"     ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" },
349       { "6 Shortcuts",  "Creating shortcuts to sysinstall.",            NULL, dmenuDisplayFile, NULL, "shortcuts" },
350       { "7 HTML Docs",  "Go to the HTML documentation menu (post-install).", NULL, docBrowser },
351       { "0 Exit",       "Exit this menu (returning to previous)",       NULL, dmenuExit },
352       { NULL } },
353 };
354
355 DMenu MenuMouseType = {
356     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
357     "Select a protocol type for your mouse",
358     "If you are not sure, choose \"Auto\".  It should always work for bus\n"
359     "and PS/2 style mice.  It may not work for the serial mouse if the mouse\n"
360     "does not support the PnP standard.  But, it won't hurt.  Many 2-button\n"
361     "serial mice are compatible with \"Microsoft\" or \"MouseMan\".  3-button\n"
362     "serial mice may be compatible with \"MouseSystems\" or \"MouseMan\".  If\n"
363     "the mouse has a wheel, it may be compatible with \"IntelliMouse\".",
364     NULL,
365     NULL,
366     { { "Auto",         "Bus mouse, PS/2 style mouse or PnP serial mouse",      
367         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" },
368       { "GlidePoint",   "ALPS GlidePoint pad (serial)",
369         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" },
370       { "Hitachi","Hitachi tablet (serial)",
371         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" },
372       { "IntelliMouse", "Microsoft IntelliMouse (serial)",
373         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" },
374       { "Logitech",     "Logitech protocol (old models) (serial)",
375         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" },
376       { "Microsoft",    "Microsoft protocol (serial)",
377         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" },
378       { "MM Series","MM Series protocol (serial)",
379         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" },
380       { "MouseMan",     "Logitech MouseMan/TrackMan models (serial)",
381         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" },
382       { "MouseSystems", "MouseSystems protocol (serial)",
383         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" },
384       { "ThinkingMouse","Kensington ThinkingMouse (serial)",
385         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" },
386       { NULL } },
387 };
388
389 DMenu MenuMousePort = {
390     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
391     "Select your mouse port from the following menu",
392     "The built-in pointing device of laptop/notebook computers is usually\n"
393     "a PS/2 style device.",
394     NULL,
395     NULL,
396     { { "COM1", "Serial mouse on COM1 (/dev/cuaa0)",
397         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" },
398       { "COM2", "Serial mouse on COM2 (/dev/cuaa1)",
399         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" },
400       { "COM3", "Serial mouse on COM3 (/dev/cuaa2)",
401         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" },
402       { "COM4", "Serial mouse on COM4 (/dev/cuaa3)", 
403         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" },
404       { "BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)", 
405         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
406       { "PS/2", "PS/2 style mouse (/dev/psm0)", 
407         dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
408       { NULL } },
409 };
410
411 DMenu MenuMouse = {
412     DMENU_NORMAL_TYPE,
413     "Please configure your mouse",
414     "You can cut and paste text in the text console by running the mouse\n"
415     "daemon.  Specify a port and a protocol type of your mouse and enable\n"
416     "the mouse daemon.  If you don't want this feature, select 4 to disable\n"
417     "the daemon.\n"
418     "Once you've enabled the mouse daemon, you can specify \"/dev/sysmouse\"\n"
419     "as your mouse device and \"SysMouse\" or \"MouseSystems\" as mouse\n"
420     "protocol when running the X configuration utility (see Configuration\n"
421     "menu).",
422     NULL,
423     NULL,
424     { { "1 Type",       "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType },
425       { "2 Port",       "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort },
426       { "3 Enable",     "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL },
427       { "4 Disable",    "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL },
428       { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuExit },
429       { NULL } },
430 };
431
432 DMenu MenuXF86Config = {
433     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
434     "Please select the XFree86 configuration tool you want to use.",
435 #ifdef __alpha__
436     "Due to problems with the VGA16 server right now, only the\n"
437     "text-mode configuration tool (xf86config) is currently supported.",
438 #else
439     "The first tool, XF86Setup, is fully graphical and requires the\n"
440     "VGA16 server in order to work (should have been selected by\n"
441     "default, but if you de-selected it then you won't be able to\n"
442     "use this fancy setup tool).  The second tool, xf86config, is\n"
443     "a more simplistic shell-script based tool and less friendly to\n"
444     "new users, but it may work in situations where the fancier one\n"
445     "does not.",
446 #endif
447     NULL,
448     NULL,
449 #ifdef __alpha__
450     { { "xf86config",   "Shell-script based XFree86 configuration tool.",
451         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
452 #else
453     { { "XF86Setup",    "Fully graphical XFree86 configuration tool.",
454         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" },
455       { "xf86config",   "Shell-script based XFree86 configuration tool.",
456         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" },
457       { "XF98Setup",    "Fully graphical XFree86 configuration tool (PC98).",
458         NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" },
459 #endif
460       { "XDesktop",     "X already set up, just do desktop configuration.",
461         NULL, dmenuSubmenu, NULL, &MenuXDesktops },
462       { NULL } },
463 };
464
465 DMenu MenuXDesktops = {
466     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
467     "Please select the default X desktop to use.",
468     "By default, XFree86 comes with a fairly vanilla desktop which\n"
469     "is based around the twm(1) window manager and does not offer\n"
470     "much in the way of features.  It does have the advantage of\n"
471     "being a standard part of X so you don't need to load anything\n"
472     "extra in order to use it.  If, however, you have access to a\n"
473     "reasonably full packages collection on your installation media,\n"
474     "you can choose any one of the following desktops as alternatives.",
475     NULL,
476     NULL,
477     { { "KDE",          "The K Desktop Environment.",
478         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" },
479       { "GNOME + Afterstep",    "GNOME + Afterstep window manager.",
480         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" },
481       { "GNOME + Enlightenment","GNOME + The E window manager",
482         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" },
483       { "Afterstep",    "The Afterstep window manager",
484         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" },
485       { "Windowmaker",  "The Windowmaker window manager",
486         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" },
487       { "fvwm2",        "The fvwm2 window manager",
488         NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm" },
489       { NULL } },
490 };
491
492 DMenu MenuMediaCDROM = {
493     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
494     "Choose a CDROM type",
495     "FreeBSD can be installed directly from a CDROM containing a valid\n"
496     "FreeBSD distribution.  If you are seeing this menu it is because\n"
497     "more than one CDROM drive was found on your system.  Please select one\n"
498     "of the following CDROM drives as your installation drive.",
499     "Press F1 to read the installation guide",
500     "install",
501     { { NULL } },
502 };
503
504 DMenu MenuMediaFloppy = {
505     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
506     "Choose a Floppy drive",
507     "You have more than one floppy drive.  Please chose which drive\n"
508     "you would like to use.",
509     NULL,
510     NULL,
511     { { NULL } },
512 };
513
514 DMenu MenuMediaDOS = {
515     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
516     "Choose a DOS partition",
517     "FreeBSD can be installed directly from a DOS partition\n"
518     "assuming, of course, that you have copied the relevant\n"
519     "distributions into your DOS partition before starting this\n"
520     "installation.  If this is not the case then you should reboot\n"
521     "DOS at this time and copy the distributions you wish to install\n"
522     "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n"
523     "Otherwise, please select the DOS partition containing the FreeBSD\n"
524     "distribution files.",
525     "Press F1 to read the installation guide",
526     "install",
527     { { NULL } },
528 };
529
530 DMenu MenuMediaFTP = {
531     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
532     "Please select a FreeBSD FTP distribution site",
533     "Please select the site closest to you or \"other\" if you'd like to\n"
534     "specify a different choice.  Also note that not every site listed here\n"
535     "carries more than the base distribution kits. Only the Primary site is\n"
536     "guaranteed to carry the full range of possible distributions.",
537     "Select a site that's close!",
538     "install",
539     { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
540         VAR_FTP_PATH _AS("=ftp://ftp.freebsd.org/pub/FreeBSD/releases/") },
541       { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL,
542         VAR_FTP_PATH "=other" },
543       { "4.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL,
544         VAR_FTP_PATH _AS("=ftp://current.freebsd.org/pub/FreeBSD/snapshots/") },
545       { "3.0 SNAP Server", "releng3.freebsd.org", NULL, dmenuSetVariable, NULL,
546         VAR_FTP_PATH _AS("=ftp://releng3.freebsd.org/pub/FreeBSD/snapshots/") },
547       { "Argentina",    "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL,
548         VAR_FTP_PATH _AP("=ftp://ftp.ar.freebsd.org") },
549       { "Australia",    "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL,
550         VAR_FTP_PATH _AP("=ftp://ftp.au.freebsd.org") },
551       { "Australia #2", "ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL,
552         VAR_FTP_PATH _AP("=ftp://ftp2.au.freebsd.org") },
553       { "Australia #3", "ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL,
554         VAR_FTP_PATH _AP("=ftp://ftp3.au.freebsd.org") },
555       { "Australia #4", "ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL,
556         VAR_FTP_PATH _AP("=ftp://ftp4.au.freebsd.org") },
557       { "Australia #5", "ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL,
558         VAR_FTP_PATH _AP("=ftp://ftp5.au.freebsd.org") },
559       { "Brazil",       "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL,
560         VAR_FTP_PATH _AP("=ftp://ftp.br.freebsd.org") },
561       { "Brazil #2",    "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL,
562         VAR_FTP_PATH _AP("=ftp://ftp2.br.freebsd.org") },
563       { "Brazil #3",    "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL,
564         VAR_FTP_PATH _AP("=ftp://ftp3.br.freebsd.org") },
565       { "Brazil #4",    "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL,
566         VAR_FTP_PATH _AP("=ftp://ftp4.br.freebsd.org") },
567       { "Brazil #5",    "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL,
568         VAR_FTP_PATH _AP("=ftp://ftp5.br.freebsd.org") },
569       { "Brazil #6",    "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL,
570         VAR_FTP_PATH _AP("=ftp://ftp6.br.freebsd.org") },
571       { "Brazil #7",    "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL,
572         VAR_FTP_PATH _AP("=ftp://ftp7.br.freebsd.org") },
573       { "Canada",       "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL,
574         VAR_FTP_PATH _AP("=ftp://ftp.ca.freebsd.org") },
575       { "Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL,
576         VAR_FTP_PATH _AP("=ftp://ftp.cz.freebsd.org") },
577       { "Denmark",      "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
578         VAR_FTP_PATH _AP("=ftp://ftp.dk.freebsd.org") },
579       { "Denmark #2",   "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL,
580         VAR_FTP_PATH _AP("=ftp://ftp2.dk.freebsd.org") },
581       { "Estonia",      "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL,
582         VAR_FTP_PATH _AP("=ftp://ftp.ee.freebsd.org") },
583       { "Finland",      "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL,
584         VAR_FTP_PATH _AP("=ftp://ftp.fi.freebsd.org") },
585       { "France",       "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
586         VAR_FTP_PATH _AP("=ftp://ftp.fr.freebsd.org") },
587       { "France #2",    "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
588         VAR_FTP_PATH _AP("=ftp://ftp2.fr.freebsd.org") },
589       { "France #3",    "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL,
590         VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") },
591       { "Germany",      "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL,
592         VAR_FTP_PATH _AP("=ftp://ftp.de.freebsd.org") },
593       { "Germany #2",   "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL,
594         VAR_FTP_PATH _AP("=ftp://ftp2.de.freebsd.org") },
595       { "Germany #3",   "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL,
596         VAR_FTP_PATH _AP("=ftp://ftp3.de.freebsd.org") },
597       { "Germany #4",   "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL,
598         VAR_FTP_PATH _AP("=ftp://ftp4.de.freebsd.org") },
599       { "Germany #5",   "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL,
600         VAR_FTP_PATH _AP("=ftp://ftp5.de.freebsd.org") },
601       { "Germany #6",   "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL,
602         VAR_FTP_PATH _AP("=ftp://ftp6.de.freebsd.org") },
603       { "Germany #7",   "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL,
604         VAR_FTP_PATH _AP("=ftp://ftp7.de.freebsd.org") },
605       { "Holland",      "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL,
606         VAR_FTP_PATH _AP("=ftp://ftp.nl.freebsd.org") },
607       { "Hong Kong",    "ftp.hk.super.net", NULL, dmenuSetVariable, NULL,
608         VAR_FTP_PATH _AP("=ftp://ftp.hk.super.net") },
609       { "Iceland",      "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL,
610         VAR_FTP_PATH _AP("=ftp://ftp.is.freebsd.org") },
611       { "Ireland",      "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL,
612         VAR_FTP_PATH _AP("=ftp://ftp.ie.freebsd.org") },
613       { "Israel",       "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL,
614         VAR_FTP_PATH _AP("=ftp://ftp.il.freebsd.org") },
615       { "Israel #2",    "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL,
616         VAR_FTP_PATH _AP("=ftp://ftp2.il.freebsd.org") },
617       { "Japan",        "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
618         VAR_FTP_PATH _AP("=ftp://ftp.jp.freebsd.org") },
619       { "Japan #2",     "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
620         VAR_FTP_PATH _AP("=ftp://ftp2.jp.freebsd.org") },
621       { "Japan #3",     "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
622         VAR_FTP_PATH _AP("=ftp://ftp3.jp.freebsd.org") },
623       { "Japan #4",     "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
624         VAR_FTP_PATH _AP("=ftp://ftp4.jp.freebsd.org") },
625       { "Japan #5",     "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
626         VAR_FTP_PATH _AP("=ftp://ftp5.jp.freebsd.org") },
627       { "Japan #6",     "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL,
628         VAR_FTP_PATH _AP("=ftp://ftp6.jp.freebsd.org") },
629       { "Korea",        "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
630         VAR_FTP_PATH _AP("=ftp://ftp.kr.freebsd.org") },
631       { "Korea #2",     "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
632         VAR_FTP_PATH _AP("=ftp://ftp2.kr.freebsd.org") },
633       { "Korea #3",     "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
634         VAR_FTP_PATH _AP("=ftp://ftp3.kr.freebsd.org") },
635       { "Korea #4",     "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
636         VAR_FTP_PATH _AP("=ftp://ftp4.kr.freebsd.org") },
637       { "Korea #5",     "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL,
638         VAR_FTP_PATH _AP("=ftp://ftp5.kr.freebsd.org") },
639       { "Poland",       "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL,
640         VAR_FTP_PATH _AP("=ftp://ftp.pl.freebsd.org") },
641       { "Portugal",     "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
642         VAR_FTP_PATH _AP("=ftp://ftp.pt.freebsd.org") },
643       { "Portugal #2",  "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL,
644         VAR_FTP_PATH _AP("=ftp://ftp2.pt.freebsd.org") },
645       { "Russia",       "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
646         VAR_FTP_PATH _AP("=ftp://ftp.ru.freebsd.org") },
647       { "Russia #2",    "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
648         VAR_FTP_PATH _AP("=ftp://ftp2.ru.freebsd.org") },
649       { "Russia #3",    "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
650         VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") },
651       { "Russia #4",    "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL,
652         VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") },
653       { "Slovak Republic",      "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL,
654         VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") },
655       { "South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL,
656         VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") },
657       { "South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL,
658         VAR_FTP_PATH _AP("=ftp://ftp2.za.freebsd.org") },
659       { "South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL,
660         VAR_FTP_PATH _AP("=ftp://ftp3.za.freebsd.org") },
661       { "South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL,
662         VAR_FTP_PATH _AP("=ftp://ftp4.za.freebsd.org") },
663       { "Spain",        "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL,
664         VAR_FTP_PATH _AP("=ftp://ftp.es.freebsd.org") },
665       { "Spain #2",     "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL,
666         VAR_FTP_PATH _AP("=ftp://ftp2.es.freebsd.org") },
667       { "Sweden",       "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL,
668         VAR_FTP_PATH _AP("=ftp://ftp.se.freebsd.org") },
669       { "Sweden #2",    "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL,
670         VAR_FTP_PATH _AP("=ftp://ftp2.se.freebsd.org") },
671       { "Sweden #3",    "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL,
672         VAR_FTP_PATH _AP("=ftp://ftp3.se.freebsd.org") },
673       { "Taiwan",       "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
674         VAR_FTP_PATH _AP("=ftp://ftp.tw.freebsd.org") },
675       { "Taiwan #2",    "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
676         VAR_FTP_PATH _AP("=ftp://ftp2.tw.freebsd.org") },
677       { "Taiwan #3",    "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL,
678         VAR_FTP_PATH _AP("=ftp://ftp3.tw.freebsd.org") },
679       { "Thailand",     "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL,
680         VAR_FTP_PATH _AS("=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/") },
681       { "UK",           "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
682         VAR_FTP_PATH _AP("=ftp://ftp.uk.freebsd.org") },
683       { "UK #2",        "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
684         VAR_FTP_PATH _AP("=ftp://ftp2.uk.freebsd.org") },
685       { "UK #3",        "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
686         VAR_FTP_PATH _AP("=ftp://ftp3.uk.freebsd.org") },
687       { "UK #4",        "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
688         VAR_FTP_PATH _AP("=ftp://ftp4.uk.freebsd.org") },
689       { "UK #5",        "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL,
690         VAR_FTP_PATH _AP("=ftp://ftp5.uk.freebsd.org") },
691       { "USA",          "ftp.freebsd.org", NULL, dmenuSetVariable, NULL,
692         VAR_FTP_PATH _AP("=ftp://ftp.freebsd.org") },
693       { "USA #2",       "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL,
694         VAR_FTP_PATH _AP("=ftp://ftp2.freebsd.org") },
695       { "USA #3",       "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL,
696         VAR_FTP_PATH _AP("=ftp://ftp3.freebsd.org") },
697       { "USA #4",       "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL,
698         VAR_FTP_PATH _AP("=ftp://ftp4.freebsd.org") },
699       { "USA #5",       "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL,
700         VAR_FTP_PATH _AP("=ftp://ftp5.freebsd.org") },
701       { "USA #6",       "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL,
702         VAR_FTP_PATH _AP("=ftp://ftp6.freebsd.org") },
703       { NULL } }
704 };
705
706 DMenu MenuMediaTape = {
707     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
708     "Choose a tape drive type",
709     "FreeBSD can be installed from tape drive, though this installation\n"
710     "method requires a certain amount of temporary storage in addition\n"
711     "to the space required by the distribution itself (tape drives make\n"
712     "poor random-access devices, so we extract _everything_ on the tape\n"
713     "in one pass).  If you have sufficient space for this, then you should\n"
714     "select one of the following tape devices detected on your system.",
715     "Press F1 to read the installation guide",
716     "install",
717     { { NULL } },
718 };
719
720 DMenu MenuNetworkDevice = {
721     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
722     "Network interface information required",
723     "If you are using PPP over a serial device, as opposed to a direct\n"
724     "ethernet connection, then you may first need to dial your Internet\n"
725     "Service Provider using the ppp utility we provide for that purpose.\n"
726     "If you're using SLIP over a serial device then the expectation is\n"
727     "that you have a HARDWIRED connection.\n\n"
728     "You can also install over a parallel port using a special \"laplink\"\n"
729     "cable to another machine running a fairly recent (2.0R or later)\n"
730     "version of FreeBSD.",
731     "Press F1 to read network configuration manual",
732     "network_device",
733     { { NULL } },
734 };
735
736 /* The media selection menu */
737 DMenu MenuMedia = {
738     DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
739     "Choose Installation Media",
740     "FreeBSD can be installed from a variety of different installation\n"
741     "media, ranging from floppies to an Internet FTP server.  If you're\n"
742     "installing FreeBSD from a supported CDROM drive then this is generally\n"
743     "the best media to use if you have no overriding reason for using other\n"
744     "media.",
745     "Press F1 for more information on the various media types",
746     "media",
747     { { "1 CDROM",              "Install from a FreeBSD CDROM",         NULL, mediaSetCDROM },
748       { "2 FTP",                "Install from an FTP server",           NULL, mediaSetFTPActive },
749       { "3 FTP Passive",        "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
750       { "4 DOS",                "Install from a DOS partition",         NULL, mediaSetDOS },
751       { "5 NFS",                "Install over NFS",                     NULL, mediaSetNFS },
752       { "6 File System",        "Install from an existing filesystem",  NULL, mediaSetUFS },
753       { "7 Floppy",             "Install from a floppy disk set",       NULL, mediaSetFloppy },
754       { "8 Tape",               "Install from SCSI or QIC tape",        NULL, mediaSetTape },
755       { "9 Options",            "Go to the Options screen",             NULL, optionsEditor },
756       { NULL } },
757 };
758
759 /* The distributions menu */
760 DMenu MenuDistributions = {
761     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
762     "Choose Distributions",
763     "As a convenience, we provide several \"canned\" distribution sets.\n"
764     "These select what we consider to be the most reasonable defaults for the\n"
765     "type of system in question.  If you would prefer to pick and choose the\n"
766     "list of distributions yourself, simply select \"Custom\".  You can also\n"
767     "pick a canned distribution set and then fine-tune it with the Custom item.\n\n"
768     "Choose an item by pressing [SPACE]. When you are finished, chose the Exit\n"
769     "item or press [ENTER].",
770     "Press F1 for more information on these options.",
771     "distributions",
772     { { "1 Developer",          "Full sources, binaries and doc but no games", 
773         checkDistDeveloper,     distSetDeveloper },
774       { "2 X-Developer",        "Same as above + X Window System",
775         checkDistXDeveloper,    distSetXDeveloper },
776       { "3 Kern-Developer",     "Full binaries and doc, kernel sources only",
777         checkDistKernDeveloper, distSetKernDeveloper },
778       { "4 X-Kern-Developer",   "Same as above + X Window System",
779         checkDistXKernDeveloper, distSetXKernDeveloper },
780       { "5 User",               "Average user - binaries and doc only",
781         checkDistUser,          distSetUser },
782       { "6 X-User",             "Same as above + X Window System",
783         checkDistXUser,         distSetXUser },
784       { "7 Minimal",            "The smallest configuration possible",
785         checkDistMinimum,       distSetMinimum },
786       { "8 Custom",             "Specify your own distribution set",
787         NULL,                   dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' },
788       { "8 All",                "All sources and binaries (incl X Window System)",
789         checkDistEverything,    distSetEverything },
790       { "9 Clear",              "Reset selected distribution list to nothing",
791         NULL,                   distReset, NULL, NULL, ' ', ' ', ' ' },
792       { "0 Exit",               "Exit this menu (returning to previous)",
793         checkTrue,              dmenuExit, NULL, NULL, '<', '<', '<' },
794       { NULL } },
795 };
796
797 DMenu MenuSubDistributions = {
798     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
799     "Select the distributions you wish to install.",
800     "Please check off the distributions you wish to install.  At the\n"
801     "very minimum, this should be \"bin\".  WARNING:  Do not export the\n"
802     "DES distribution out of the U.S.!  It is for U.S. customers only.",
803     NULL,
804     NULL,
805     { { "bin",          "Binary base distribution (required)",
806         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN },
807 #ifdef __i386__
808       { "compat1x",     "FreeBSD 1.x binary compatibility",
809         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X },
810       { "compat20",     "FreeBSD 2.0 binary compatibility",
811         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 },
812       { "compat21",     "FreeBSD 2.1 binary compatibility",
813         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 },
814       { "compat22",     "FreeBSD 2.2.x and 3.0 a.out binary compatibility",
815         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT22 },
816 #if __FreeBSD__ > 3
817       { "compat3x",     "FreeBSD 3.x binary compatibility",
818         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X },
819 #endif
820 #endif
821       { "DES",          "DES encryption code - NOT FOR EXPORT!",
822         DESFlagCheck,   distSetDES },
823       { "dict",         "Spelling checker dictionary files",
824         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT },
825       { "doc",          "Miscellaneous FreeBSD online docs",
826         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC },
827       { "games",        "Games (non-commercial)",
828         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
829       { "info",         "GNU info files",
830         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
831       { "man",          "System manual pages - recommended",
832         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
833       { "catman",       "Preformatted system manual pages",
834         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_CATPAGES },
835       { "proflibs",     "Profiled versions of the libraries",
836         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS },
837       { "src",          "Sources for everything but DES",
838         srcFlagCheck,   distSetSrc },
839       { "ports",        "The FreeBSD Ports collection",
840         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS },
841       { "local",        "Local additions collection",
842         dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL},
843       { "XFree86",      "The XFree86 3.3.5 distribution",
844         x11FlagCheck,   distSetXF86 },
845       { "All",          "All sources, binaries and X Window System binaries",
846         NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
847       { "Clear",        "Reset all of the above",
848         NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
849       { "Exit",         "Exit this menu (returning to previous)",
850         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
851       { NULL } },
852 };
853
854 DMenu MenuDESDistributions = {
855     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
856     "Select the encryption facilities you wish to install.",
857     "Please check off any special DES-based encryption distributions\n"
858     "you would like to install.  Please note that these services are NOT FOR\n"
859     "EXPORT from the United States.  For information on non-U.S. FTP\n"
860     "distributions of this software, please consult the release notes.",
861     NULL,
862     NULL,
863     { { "des",          "Basic DES encryption services",
864         dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_DES, },
865       { "krb4",         "KerberosIV authentication services",
866         dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_KERBEROS4 },
867       { "skerbero",     "Sources for Kerberos",
868         dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SKERBEROS },
869       { "ssecure",      "Sources for DES",
870         dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE },
871       { "scrypto",      "Export controlled crypto sources",
872         dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SCRYPTO },
873       { "Exit",         "Exit this menu (returning to previous)",
874         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
875       { NULL } },
876 };
877
878 DMenu MenuSrcDistributions = {
879     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS ,
880     "Select the sub-components of src you wish to install.",
881     "Please check off those portions of the FreeBSD source tree\n"
882     "you wish to install (remember to use SPACE, not ENTER!).",
883     NULL,
884     NULL,
885     { { "All",          "Select all of the below",
886         NULL,           setSrc, NULL, NULL, ' ', ' ', ' ' },
887       { "Clear",        "Reset all of the below",
888         NULL,           clearSrc, NULL, NULL, ' ', ' ', ' ' },
889       { "base",         "top-level files in /usr/src",
890         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE },
891       { "contrib",      "/usr/src/contrib (contributed software)",
892         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB },
893       { "gnu",          "/usr/src/gnu (software from the GNU Project)",
894         dmenuFlagCheck, dmenuSetFlag,   NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU },
895       { "etc",          "/usr/src/etc (miscellaneous system files)",
896         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC },
897       { "games",        "/usr/src/games (the obvious!)",
898         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES },
899       { "include",      "/usr/src/include (header files)",
900         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE },
901       { "lib",          "/usr/src/lib (system libraries)",
902         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB },
903       { "libexec",      "/usr/src/libexec (system programs)",
904         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC },
905       { "release",      "/usr/src/release (release-generation tools)",
906         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE },
907       { "bin",          "/usr/src/bin (system binaries)",
908         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN },
909       { "sbin",         "/usr/src/sbin (system binaries)",
910         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN },
911       { "share",        "/usr/src/share (documents and shared files)",
912         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE },
913       { "sys",          "/usr/src/sys (FreeBSD kernel)",
914         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS },
915       { "ubin",         "/usr/src/usr.bin (user binaries)",
916         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN },
917       { "usbin",        "/usr/src/usr.sbin (aux system binaries)",
918         dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
919       { "Exit",         "Exit this menu (returning to previous)",
920         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
921       { NULL } },
922 };
923
924 DMenu MenuXF86Select = {
925     DMENU_NORMAL_TYPE,
926     "XFree86 3.3.5 Distribution",
927     "Please select the components you need from the XFree86 3.3.5\n"
928     "distribution sets.",
929     NULL,
930     NULL,
931     { { "Basic",        "Basic component menu (required)",      NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore },
932       { "Server",       "X server menu",                        NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer },
933       { "Fonts",        "Font set menu",                        NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
934       { "All",          "Select all XFree86 distribution sets", NULL, setX11All },
935       { "Clear",        "Reset XFree86 distribution list",      NULL, clearX11All },
936       { "Exit",         "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' },
937       { NULL } },
938 };
939
940 DMenu MenuXF86SelectCore = {
941     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
942     "XFree86 3.3.5 base distribution types",
943     "Please check off the basic XFree86 components you wish to install.\n"
944     "Bin, lib, and set are recommended for a minimum installaion.",
945     NULL,
946     NULL,
947     { { "bin",          "Client applications and shared libs",
948         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN },
949       { "cfg",          "Configuration files",
950         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CFG },
951       { "doc",          "READMEs and release notes",
952         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC },
953       { "html",         "HTML documentation files",
954         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML },
955       { "lib",          "Data files needed at runtime",
956         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB },
957 #ifdef __i386__
958       { "lk98",         "Server link kit for PC98 machines",
959         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 },
960 #endif
961       { "lkit",         "Server link kit for all other machines",
962         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT },
963       { "man",          "Manual pages",
964         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN },
965       { "prog",         "Programmer's header and library files",
966         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG },
967       { "set",          "XFree86 Setup Utility",
968         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET },
969 #ifdef __i386__
970       { "9set",         "XFree86 Setup Utility for PC98 machines",
971         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET },
972 #endif
973       { "sources",      "XFree86 3.3.5 standard sources",
974         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
975       { "csources",     "XFree86 3.3.5 contrib sources",
976         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CSRC },
977       { "All",          "Select all of the above",
978         NULL,           setX11Misc, NULL, NULL, ' ', ' ', ' ' },
979       { "Clear",        "Reset all of the above",
980         NULL,           clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
981       { "Exit",         "Exit this menu (returning to previous)",
982         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
983       { NULL } },
984 };
985
986 DMenu MenuXF86SelectFonts = {
987     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS ,
988     "Font distribution selection.",
989     "Please check off the individual font distributions you wish to\n\
990 install.  At the minimum, you should install the standard\n\
991 75 DPI and misc fonts if you're also installing a server\n\
992 (these are selected by default).",
993     NULL,
994     NULL,
995     { { "fnts",         "Standard 75 DPI and miscellaneous fonts",
996         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC },
997       { "f100",         "100 DPI fonts",
998         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 },
999       { "fcyr",         "Cyrillic Fonts",
1000         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR },
1001       { "fscl",         "Speedo and Type scalable fonts",
1002         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE },
1003       { "non",          "Japanese, Chinese and other non-english fonts",
1004         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
1005       { "server",       "Font server",
1006         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
1007       { "All",          "All fonts",
1008         NULL,           setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1009       { "Clear",        "Reset font selections",
1010         NULL,           clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
1011       { "Exit",         "Exit this menu (returning to previous)",
1012         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
1013       { NULL } },
1014 };
1015
1016 DMenu MenuXF86SelectServer = {
1017     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1018     "X Server selection.",
1019     "Please check off the types of X servers you wish to install.\n"
1020     "If you are unsure as to which server will work for your graphics card,\n"
1021     "it is recommended that try the SVGA or VGA16 servers or, for PC98\n"
1022     "machines, the 9EGC or 9840 servers.",
1023     NULL,
1024     NULL,
1025     { { "SVGA",         "Standard VGA or Super VGA card",
1026         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA },
1027       { "VGA16",        "Standard 16 color VGA card",
1028         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 },
1029       { "Mono",         "Standard Monochrome card",
1030         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO },
1031       { "3DL",          "8, 16 and 24 bit color 3D Labs boards",
1032         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_3DL },
1033       { "8514",         "8-bit (256 color) IBM 8514 or compatible card",
1034         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 },
1035       { "AGX",          "8-bit AGX card",
1036         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX },
1037       { "I128",         "8, 16 and 24-bit #9 Imagine I128 card",
1038         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_I128 },
1039       { "Ma8",          "8-bit ATI Mach8 card",
1040         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 },
1041       { "Ma32",         "8 and 16-bit (65K color) ATI Mach32 card",
1042         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 },
1043       { "Ma64",         "8 and 16-bit (65K color) ATI Mach64 card",
1044         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 },
1045       { "P9K",          "8, 16, and 24-bit color Weitek P9000 based boards",
1046         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 },
1047       { "S3",           "8, 16 and 24-bit color S3 based boards",
1048         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 },
1049       { "S3V",          "8, 16 and 24-bit color S3 Virge based boards",
1050         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V },
1051       { "W32",          "8-bit ET4000/W32, /W32i and /W32p cards",
1052         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
1053 #ifdef __i386__
1054       { "PC98",         "Select an X server for a NEC PC98 [Submenu]",
1055         NULL,           dmenuSubmenu,  NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 },
1056 #elif __alpha__
1057       { "TGA",          "TGA cards (alpha architecture only)",
1058         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA },
1059 #endif
1060       { "All",          "Select all of the above",
1061         NULL,           setX11Servers, NULL, NULL, ' ', ' ', ' ' },
1062       { "Clear",        "Reset all of the above",
1063         NULL,           clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
1064       { "Exit",         "Exit this menu (returning to previous)",
1065         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
1066       { NULL } },
1067 };
1068
1069 #ifdef __i386__
1070 DMenu MenuXF86SelectPC98Server = {
1071     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1072     "PC98 X Server selection.",
1073     "Please check off the types of NEC PC98 X servers you wish to install.\n\
1074 If you are unsure as to which server will work for your graphics card,\n\
1075 it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\
1076 Mono servers are particularly well-suited to most LCD displays).",
1077     NULL,
1078     NULL,
1079     { { "9480",         "PC98 8-bit (256 color) PEGC-480 card",
1080         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9480 },
1081       { "9EGC",         "PC98 4-bit (16 color) EGC card",
1082         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9EGC },
1083       { "9GA9",         "PC98 GA-968V4/PCI (S3 968) card",
1084         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GA9 },
1085       { "9GAN",         "PC98 GANB-WAP (cirrus) card",
1086         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GAN },
1087       { "9LPW",         "PC98 PowerWindowLB (S3) card",
1088         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9LPW },
1089       { "9MGA",         "PC98 MGA (Matrox) card",
1090         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9MGA },
1091       { "9NKV",         "PC98 NKV-NEC (cirrus) card",
1092         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NKV },
1093       { "9NS3",         "PC98 NEC (S3) card",
1094         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NS3 },
1095       { "9SPW",         "PC98 SKB-PowerWindow (S3) card",
1096         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SPW },
1097       { "9SVG",         "PC98 generic SVGA card",
1098         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SVG },
1099       { "9TGU",         "PC98 Cyber9320 and TGUI9680 cards",
1100         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9TGU },
1101       { "9WEP",         "PC98 WAB-EP (cirrus) card",
1102         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WEP },
1103       { "9WS",          "PC98 WABS (cirrus) card",
1104         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WS },
1105       { "9WSN",         "PC98 WSN-A2F (cirrus) card",
1106         dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WSN },
1107       { "Exit",         "Exit this menu (returning to previous)",
1108         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
1109       { NULL } }
1110 };
1111 #endif
1112
1113 DMenu MenuDiskDevices = {
1114     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1115     "Select Drive(s)",
1116     "Please select the drive, or drives, on which you wish to perform\n"
1117     "this operation.  If you are attempting to install a boot partition\n"
1118     "on a drive other than the first one or have multiple operating\n"
1119     "systems on your machine, you will have the option to install a boot\n"
1120     "manager later.  To select a drive, use the arrow keys to move to it\n"
1121     "and press [SPACE].  To de-select it, press [SPACE] again.\n\n"
1122     "Select OK or Cancel to leave this menu.",
1123     "Press F1 for important information regarding disk geometry!",
1124     "drives",
1125     { { NULL } },
1126 };
1127
1128 DMenu MenuHTMLDoc = {
1129     DMENU_NORMAL_TYPE,
1130     "Select HTML Documentation pointer",
1131     "Please select the body of documentation you're interested in, the main\n"
1132     "ones right now being the FAQ and the Handbook.  You can also chose \"other\"\n"
1133     "to enter an arbitrary URL for browsing.",
1134     "Press F1 for more help on what you see here.",
1135     "html",
1136     { { "Handbook",     "The FreeBSD Handbook.",                                NULL, docShowDocument },
1137       { "FAQ",          "The Frequently Asked Questions guide.",                NULL, docShowDocument },
1138       { "Home",         "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument },
1139       { "Other",        "Enter a URL.",                                         NULL, docShowDocument },
1140       { NULL } },
1141 };
1142
1143 /* The main installation menu */
1144 DMenu MenuInstallCustom = {
1145     DMENU_NORMAL_TYPE,
1146     "Choose Custom Installation Options",
1147     "This is the custom installation menu. You may use this menu to specify\n"
1148     "details on the type of distribution you wish to have, where you wish\n"
1149     "to install it from and how you wish to allocate disk storage to FreeBSD.",
1150     "Press F1 to read the installation guide",
1151     "install",
1152     { { "1 Options",            "View/Set various installation options", NULL, optionsEditor },
1153 #ifdef __alpha__
1154       { "2 Label",              "Label disk partitions",                NULL, diskLabelEditor },
1155       { "3 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1156       { "4 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1157       { "5 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1158 #else
1159       { "2 Partition",          "Allocate disk space for FreeBSD",      NULL, diskPartitionEditor },
1160       { "3 Label",              "Label allocated disk partitions",      NULL, diskLabelEditor },
1161       { "4 Distributions",      "Select distribution(s) to extract",    NULL, dmenuSubmenu, NULL, &MenuDistributions },
1162       { "5 Media",              "Choose the installation media type",   NULL, dmenuSubmenu, NULL, &MenuMedia },
1163       { "6 Commit",             "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit },
1164 #endif
1165       { "0 Exit",               "Exit this menu (returning to previous)", NULL, dmenuExit },
1166       { NULL } },
1167 };
1168
1169 /* MBR type menu */
1170 DMenu MenuMBRType = {
1171     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1172     "overwrite me",             /* will be disk specific label */
1173     "FreeBSD comes with a boot selector that allows you to easily\n"
1174     "select between FreeBSD and any other operating systems on your machine\n"
1175     "at boot time.  If you have more than one drive and want to boot\n"
1176     "from the second one, the boot selector will also make it possible\n"
1177     "to do so (limitations in the PC BIOS usually prevent this otherwise).\n"
1178     "If you do not want a boot selector, or wish to replace an existing\n"
1179     "one, select \"standard\".  If you would prefer your Master Boot\n"
1180     "Record to remain untouched then select \"None\".\n\n"
1181     "  NOTE:  PC-DOS users will almost certainly require \"None\"!",
1182     "Press F1 to read about drive setup",
1183     "drives",
1184     { { "BootMgr",      "Install the FreeBSD Boot Manager",
1185         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr },
1186       { "Standard",     "Install a standard MBR (no boot manager)",
1187         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 },
1188       { "None",         "Leave the Master Boot Record untouched",
1189         dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 },
1190       { NULL } },
1191 };
1192
1193 /* Final configuration menu */
1194 DMenu MenuConfigure = {
1195     DMENU_NORMAL_TYPE,
1196     "FreeBSD Configuration Menu",       /* title */
1197     "If you've already installed FreeBSD, you may use this menu to customize\n"
1198     "it somewhat to suit your particular configuration.  Most importantly,\n"
1199     "you can use the Packages utility to load extra \"3rd party\"\n"
1200     "software not provided in the base distributions.",
1201     "Press F1 for more information on these options",
1202     "configure",
1203     { { "D Distributions", "Install additional distribution sets",
1204         NULL, distExtractAll },
1205       { "P Packages",   "Install pre-packaged software for FreeBSD",
1206         NULL, configPackages },
1207       { "R Root Password", "Set the system manager's password",
1208         NULL,   dmenuSystemCommand, NULL, "passwd root" },
1209       { "L Label",      "The disk Label editor",
1210         NULL, diskLabelEditor },
1211 #ifdef __i386__
1212       { "F Fdisk",      "The disk Slice (PC-style partition) Editor",
1213         NULL, diskPartitionEditor },
1214 #endif
1215       { "1 User Management",    "Add user and group information",
1216         NULL, dmenuSubmenu, NULL, &MenuUsermgmt },
1217       { "2 Console",    "Customize system console behavior",
1218         NULL,   dmenuSubmenu, NULL, &MenuSyscons },
1219       { "3 Time Zone",  "Set which time zone you're in",
1220         NULL,   dmenuSystemCommand, NULL, "tzsetup" },
1221       { "4 Media",      "Change the installation media type",
1222         NULL,   dmenuSubmenu, NULL, &MenuMedia  },
1223       { "5 Mouse",      "Configure your mouse",
1224         NULL,   dmenuSubmenu, NULL, &MenuMouse, NULL },
1225       { "6 Networking", "Configure additional network services",
1226         NULL,   dmenuSubmenu, NULL, &MenuNetworking },
1227       { "7 Startup",    "Configure system startup options",
1228         NULL,   dmenuSubmenu, NULL, &MenuStartup },
1229       { "8 Options",    "View/Set various installation options",
1230         NULL, optionsEditor },
1231       { "X XFree86",    "Configure XFree86 Server",
1232         NULL, configXSetup },
1233       { "D Desktop",    "Configure XFree86 Desktop",
1234         NULL, configXDesktop },
1235       { "H HTML Docs",  "Go to the HTML documentation menu (post-install)",
1236         NULL, docBrowser },
1237       { "E Exit",               "Exit this menu (returning to previous)",
1238         NULL,   dmenuExit },
1239       { NULL } },
1240 };
1241
1242 DMenu MenuStartup = {
1243     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1244     "Startup Services Menu",
1245     "This menu allows you to configure various aspects of your system's\n"
1246     "startup configuration.  Remember to use SPACE to select items!  The\n"
1247     "RETURN key will leave this menu (as with all checkbox menus).",
1248     NULL,
1249     NULL,
1250     { { "APM",          "Auto-power management services (typically laptops)",
1251         dmenuVarCheck,  dmenuToggleVariable, NULL, "apm_enable=YES" },
1252       { "pccard",       "Enable PCCARD (AKA PCMCIA) services (also laptops)",
1253         dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" },
1254       { "pccard mem",   "Set PCCARD memory address (if enabled)",
1255         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" },
1256       { "pccard ifconfig",      "List of PCCARD ethernet devices to configure",
1257         dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" },
1258       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1259       { "startup dirs", "Set the list of dirs to look for startup scripts",
1260         dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" },
1261       { "named",        "Run a local name server on this host",
1262         dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" },
1263       { "named flags",  "Set default flags to named (if enabled)",
1264         dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" },
1265       { "nis client",   "This host wishes to be an NIS client.",
1266         dmenuVarCheck, dmenuToggleVariable, NULL, "nis_client_enable=YES" },
1267       { "nis domainname",       "Set NIS domainname (if enabled)",
1268         dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" },
1269       { "nis server",   "This host wishes to be an NIS server.",
1270         dmenuVarCheck, dmenuToggleVariable, NULL, "nis_server_enable=YES" },
1271       { " ",            " -- ", NULL,   NULL, NULL, NULL, ' ', ' ', ' ' },
1272       { "accounting",   "This host wishes to run process accounting.",
1273         dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" },
1274       { "lpd",          "This host has a printer and wants to run lpd.",
1275         dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" },
1276 #ifdef __i386__
1277       { "linux",        "This host wants to be able to run linux binaries.",
1278         dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" },
1279 #endif
1280       { "quotas",       "This host wishes to check quotas on startup.",
1281         dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" },
1282       { "SCO",          "This host wants to be able to run IBCS2 binaries.",
1283         dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" },
1284       { "Exit",         "Exit this menu (returning to previous)",
1285         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
1286       { NULL } },
1287 };
1288
1289 DMenu MenuNetworking = {
1290     DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS,
1291     "Network Services Menu",
1292     "You may have already configured one network device (and the other\n"
1293     "various hostname/gateway/name server parameters) in the process\n"
1294     "of installing FreeBSD.  This menu allows you to configure other\n"
1295     "aspects of your system's network configuration.",
1296     NULL,
1297     NULL,
1298     { { "Interfaces",   "Configure additional network interfaces",
1299         NULL, tcpMenuSelect },
1300       { "NFS client",   "This machine will be an NFS client",
1301         dmenuVarCheck,  dmenuToggleVariable, NULL, "nfs_client_enable=YES" },
1302       { "NFS server",   "This machine will be an NFS server",
1303         dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
1304       { "AMD",  "This machine wants to run the auto-mounter service",
1305         dmenuVarCheck, dmenuToggleVariable, NULL, "amd_enable=YES" },
1306       { "AMD Flags",    "Set flags to AMD service (if enabled)",
1307         dmenuVarCheck, dmenuISetVariable, NULL, "amd_flags" },
1308       { "TCP Extensions",       "Allow RFC1323 and RFC1644 TCP extensions?",
1309         dmenuVarCheck, dmenuToggleVariable, NULL, "tcp_extensions=YES" },
1310       { "Gateway",      "This machine will route packets between interfaces",
1311         dmenuVarCheck,  dmenuToggleVariable, NULL, "gateway_enable=YES" },
1312       { "Ntpdate",      "Select a clock-synchronization server",
1313         dmenuVarCheck,  dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
1314       { "router",       "Select routing daemon (default: routed)",
1315         dmenuVarCheck, configRouter, NULL, "router" },
1316       { "Rwhod",        "This machine wants to run the rwho daemon",
1317         dmenuVarCheck,  dmenuToggleVariable, NULL, "rwhod_enable=YES" },
1318       { "Anon FTP",     "This machine wishes to allow anonymous FTP.",
1319         dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" },
1320       { "PCNFSD",       "Run authentication server for clients with PC-NFS.",
1321         dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
1322       { "Exit",         "Exit this menu (returning to previous)",
1323         checkTrue,      dmenuExit, NULL, NULL, '<', '<', '<' },
1324       { NULL } },
1325 };
1326
1327 DMenu MenuNTP = {
1328     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1329     "NTPDATE Server Selection",
1330     "There are a number of time synchronization servers available\n"
1331     "for public use around the Internet.  Please select one reasonably\n"
1332     "close to you to have your system time synchronized accordingly.",
1333     "These are the primary open-access NTP servers",
1334     NULL,
1335     { { "None",                 "No ntp server",
1336         dmenuVarsCheck, dmenuSetVariables, NULL, 
1337         "ntpdate_enable=NO,ntpdate_flags=none" },
1338       { "Other",                "Select a site not on this list",
1339         dmenuVarsCheck, configNTP, NULL, NULL },
1340       { "Australia",            "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
1341         dmenuVarsCheck, dmenuSetVariables, NULL, 
1342         "ntpdate_enable=YES,ntpdate_flags=ntp.syd.dms.csiro.au" },
1343       { "Canada",               "tick.usask.ca (GOES clock)",
1344         dmenuVarsCheck, dmenuSetVariables, NULL, 
1345         "ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" },
1346       { "France",               "canon.inria.fr (TDF clock)",
1347         dmenuVarsCheck, dmenuSetVariables, NULL, 
1348         "ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" },
1349       { "Germany",              "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
1350         dmenuVarsCheck, dmenuSetVariables, NULL, 
1351         "ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" },
1352       { "Germany #2",           "ntps1-0.cs.tu-berlin.de (GPS)",
1353         dmenuVarsCheck, dmenuSetVariables, NULL, 
1354         "ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" },
1355       { "Japan",                "clock.nc.fukuoka-u.ac.jp (GPS clock)",
1356         dmenuVarsCheck, dmenuSetVariables, NULL, 
1357         "ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" },
1358       { "Japan #2",             "clock.tl.fukuoka-u.ac.jp (GPS clock)",
1359         dmenuVarsCheck, dmenuSetVariables, NULL, 
1360         "ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" },
1361       { "Netherlands",          "ntp0.nl.net (GPS clock)",
1362         dmenuVarsCheck, dmenuSetVariables, NULL, 
1363         "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" },
1364       { "Norway",               "timehost.ifi.uio.no (NTP clock)",
1365         dmenuVarsCheck, dmenuSetVariables, NULL, 
1366         "ntpdate_enable=YES,ntpdate_flags=timehost.ifi.uio.no" },
1367       { "Sweden",               "Time1.Stupi.SE (Cesium/GPS)",
1368         dmenuVarsCheck, dmenuSetVariables, NULL, 
1369         "ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" },
1370       { "Switzerland",          "swisstime.ethz.ch (DCF77 clock)",
1371         dmenuVarsCheck, dmenuSetVariables, NULL, 
1372         "ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" },
1373       { "U.S. East Coast",      "bitsy.mit.edu (WWV clock)",
1374         dmenuVarsCheck, dmenuSetVariables, NULL, 
1375         "ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" },
1376       { "U.S. East Coast #2",   "otc1.psu.edu (WWV clock)",
1377         dmenuVarsCheck, dmenuSetVariables, NULL, 
1378         "ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" },
1379       { "U.S. West Coast #1",   "clepsydra.dec.com (GOES clock)",
1380         dmenuVarsCheck, dmenuSetVariables, NULL, 
1381         "ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" },
1382       { "U.S. West Coast #2",   "clock.llnl.gov (WWVB clock)",
1383         dmenuVarsCheck, dmenuSetVariables, NULL, 
1384         "ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" },
1385       { "U.S. Midwest",         "ncar.ucar.edu (WWVB clock)",
1386         dmenuVarsCheck, dmenuSetVariables, NULL, 
1387         "ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" },
1388       { NULL } },
1389 };
1390
1391 DMenu MenuSyscons = {
1392     DMENU_NORMAL_TYPE,
1393     "System Console Configuration",
1394     "The default system console driver for FreeBSD (syscons) has a\n"
1395     "number of configuration options which may be set according to\n"
1396     "your preference.\n\n"
1397     "When you are done setting configuration options, select Cancel.",
1398     "Configure your system console settings",
1399     NULL,
1400     { { "Font",         "Choose an alternate screen font",      NULL, dmenuSubmenu, NULL, &MenuSysconsFont },
1401       { "Keymap",       "Choose an alternate keyboard map",     NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap },
1402       { "Repeat",       "Set the rate at which keys repeat",    NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate },
1403       { "Saver",        "Configure the screen saver",           NULL, dmenuSubmenu, NULL, &MenuSysconsSaver },
1404       { "Screenmap",    "Choose an alternate screenmap",        NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap },
1405       { "Exit",         "Exit this menu (returning to previous)", NULL, dmenuExit },
1406       { NULL } },
1407 };
1408
1409 DMenu MenuSysconsKeymap = {
1410     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1411     "System Console Keymap",
1412     "The default system console driver for FreeBSD (syscons) defaults\n"
1413     "to a standard \"American\" keyboard map.  Users in other countries\n"
1414     "(or with different keyboard preferences) may wish to choose one of\n"
1415     "the other keymaps below.\n"
1416     "Note that sysinstall itself only uses the part of the keyboard map\n"
1417     "which is required to generate the ANSI character subset, but your\n"
1418     "choice of keymap will also be saved for later (fuller) use.",
1419     "Choose a keyboard map",
1420     NULL,
1421     { { "Belgian",      "Belgian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" },
1422       { "Brazil CP850", "Brazil CP850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" },
1423       { "Brazil ISO (accent)",  "Brazil ISO keymap (accent keys)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" },
1424       { "Brazil ISO",   "Brazil ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" },
1425       { "Croatian ISO", "Croatian ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" },
1426       { "Danish CP865", "Danish Code Page 865 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" },
1427       { "Danish ISO",   "Danish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" },
1428       { "Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" },
1429       { "Finnish ISO",  "Finnish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
1430       { "French ISO (accent)", "French ISO keymap (accent keys)",       dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
1431       { "French ISO",   "French ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
1432       { "German CP850", "German Code Page 850 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850"        },
1433       { "German ISO",   "German ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
1434       { "Hungarian 101", "Hungarian ISO keymap (101 key)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" },
1435       { "Hungarian 102", "Hungarian ISO keymap (102 key)",      dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" },
1436       { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" },
1437       { "Icelandic",    "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" },
1438       { "Italian",      "Italian ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" },
1439       { "Latin American", "Latin American ISO keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=lat-amer" },
1440       { "Japanese 106", "Japanese 106 keymap",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" },
1441       { "Norway ISO",   "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" },
1442       { "Polish ISO",   "Polish ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO_8859-2" },
1443       { "Portuguese (accent)",  "Portuguese ISO keymap (accent keys)",  dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" },
1444       { "Portuguese",   "Portuguese ISO keymap",        dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" },
1445       { "Russia CP866", "Russian CP866 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.cp866" },
1446       { "Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" },
1447       { "Slovenian", "Slovenian ISO keymap",    dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso.acc" },
1448       { "Spanish (accent)", "Spanish ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" },
1449       { "Spanish",      "Spanish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" },
1450       { "Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" },
1451       { "Swedish ISO",  "Swedish ISO keymap",   dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" },
1452       { "Swiss French", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" },
1453       { "Swiss German", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" },
1454       { "U.K. CP850",   "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" },
1455       { "U.K. ISO",     "United Kingdom ISO keymap", dmenuVarCheck,     dmenuSetKmapVariable, NULL, "keymap=uk.iso" },
1456       { "U.S. Dvorak",  "United States Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" },
1457       { "U.S. ISO",     "United States ISO keymap",     dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" },
1458       { NULL } },
1459 };
1460
1461 DMenu MenuSysconsKeyrate = {
1462     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1463     "System Console Keyboard Repeat Rate",
1464     "This menu allows you to set the speed at which keys repeat\n"
1465     "when held down.",
1466     "Choose a keyboard repeat rate",
1467     NULL,
1468     { { "Slow", "Slow keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=slow" },
1469       { "Normal", "\"Normal\" keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=normal" },
1470       { "Fast", "Fast keyboard repeat rate",    dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=fast" },
1471       { "Default", "Use default keyboard repeat rate",  dmenuVarCheck,  dmenuSetVariable, NULL, "keyrate=NO" },
1472       { NULL } },
1473 };
1474
1475 DMenu MenuSysconsSaver = {
1476     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1477     "System Console Screen Saver",
1478     "By default, the console driver will not attempt to do anything\n"
1479     "special with your screen when it's idle.  If you expect to leave your\n"
1480     "monitor switched on and idle for long periods of time then you should\n"
1481     "probably enable one of these screen savers to prevent phosphor burn-in.",
1482     "Choose a nifty-looking screen saver",
1483     NULL,
1484     { { "Blank",        "Simply blank the screen",
1485         dmenuVarCheck, configSaver, NULL, "saver=blank" },
1486       { "Daemon",       "\"BSD Daemon\" animated screen saver (text)",
1487         dmenuVarCheck, configSaver, NULL, "saver=daemon" },
1488       { "Fade",         "Fade out effect screen saver",
1489         dmenuVarCheck, configSaver, NULL, "saver=fade" },
1490       { "Fire",         "Flames effect screen saver",
1491         dmenuVarCheck, configSaver, NULL, "saver=fire" },
1492       { "Green",        "\"Green\" power saving mode (if supported by monitor)",
1493         dmenuVarCheck, configSaver, NULL, "saver=green" },
1494       { "Logo",         "\"BSD Daemon\" animated screen saver (graphics)",
1495         dmenuVarCheck, configSaver, NULL, "saver=logo" },
1496       { "Rain",         "Rain drops screen saver",
1497         dmenuVarCheck, configSaver, NULL, "saver=rain" },
1498       { "Snake",        "Draw a FreeBSD \"snake\" on your screen",
1499         dmenuVarCheck, configSaver, NULL, "saver=snake" },
1500       { "Star", "A \"twinkling stars\" effect",
1501         dmenuVarCheck, configSaver, NULL, "saver=star" },
1502       { "Warp", "A \"stars warping\" effect",
1503         dmenuVarCheck, configSaver, NULL, "saver=warp" },
1504       { "Timeout",      "Set the screen saver timeout interval",
1505         NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' },
1506       { NULL } },
1507 };
1508
1509 DMenu MenuSysconsScrnmap = {
1510     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1511     "System Console Screenmap",
1512     "Unless you load a specific font, most PC hardware defaults to\n"
1513     "displaying characters in the IBM 437 character set.  However,\n"
1514     "in the Unix world, this character set is very rarely used.  Most\n"
1515     "Western European countries, for example, prefer ISO 8859-1.\n"
1516     "American users won't notice the difference since the bottom half\n"
1517     "of all these character sets is ANSI anyway.\n"
1518     "If your hardware is capable of downloading a new display font,\n"
1519     "you should probably choose that option.  However, for hardware\n"
1520     "where this is not possible (e.g. monochrome adapters), a screen\n"
1521     "map will give you the best approximation that your hardware can\n"
1522     "display at all.",
1523     "Choose a screen map",
1524     NULL,
1525     { { "None",                 "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" },
1526       { "KOI8-R to IBM866",     "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" },
1527       { "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" },
1528       { NULL } },
1529 };
1530
1531 DMenu MenuSysconsFont = {
1532     DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
1533     "System Console Font",
1534     "Most PC hardware defaults to displaying characters in the\n"
1535     "IBM 437 character set.  However, in the Unix world, this\n"
1536     "character set is very rarely used.  Most Western European\n"
1537     "countries, for example, prefer ISO 8859-1.\n"
1538     "American users won't notice the difference since the bottom half\n"
1539     "of all these charactersets is ANSI anyway.  However, they might\n"
1540     "want to load a font anyway to use the 30- or 50-line displays.\n"
1541     "If your hardware is capable of downloading a new display font,\n"
1542     "you can select the appropriate font below.",
1543     "Choose a font",
1544     NULL,
1545     { { "None", "Use default font",     dmenuVarCheck,  dmenuSetVariables, NULL,
1546         "font8x8=NO,font8x14=NO,font8x16=NO" },
1547       { "IBM 437", "English",   dmenuVarCheck,  dmenuSetVariables, NULL,
1548         "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" },
1549       { "IBM 850", "Western Europe, IBM encoding",      dmenuVarCheck,  dmenuSetVariables, NULL,
1550         "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" },
1551       { "IBM 865", "Norwegian, IBM encoding",   dmenuVarCheck,  dmenuSetVariables, NULL,
1552         "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" },
1553       { "IBM 866", "Russian, IBM encoding",     dmenuVarCheck,  dmenuSetVariables, NULL,
1554         "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" },
1555       { "ISO 8859-1", "Western Europe, ISO encoding",   dmenuVarCheck,  dmenuSetVariables, NULL,
1556         "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" },
1557       { "KOI8-R", "Russian, KOI8-R encoding",   dmenuVarCheck,  dmenuSetVariables, NULL,
1558         "font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" },
1559       { "SWISS", "English, better resolution",  dmenuVarCheck,  dmenuSetVariables, NULL,
1560         "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" },
1561       { NULL } },
1562 };
1563
1564 DMenu MenuUsermgmt = {
1565     DMENU_NORMAL_TYPE,
1566     "User and group management",
1567     "The submenus here allow to manipulate user groups and\n"
1568     "login accounts.\n",
1569     "Configure your user groups and users",
1570     NULL,
1571     { { "Add user",     "Add a new user to the system.",        NULL, userAddUser },
1572       { "Add group",    "Add a new user group to the system.",  NULL, userAddGroup },
1573       { "Exit",         "Exit this menu (returning to previous)", NULL, dmenuExit },
1574       { NULL } },
1575 };
1576
1577 DMenu MenuFixit = {
1578     DMENU_NORMAL_TYPE,
1579     "Please choose a fixit option",
1580     "There are three ways of going into \"fixit\" mode:\n"
1581     "- you can use the 2nd FreeBSD CDROM, in which case there will be\n"
1582     "  full access to the complete set of FreeBSD commands and utilities,\n"
1583     "- you can use the more limited (but perhaps customized) fixit floppy,\n"
1584     "- or you can start an Emergency Holographic Shell now, which is\n"
1585     "  limited to the subset of commands that is already available right now.",
1586     "Press F1 for more detailed repair instructions",
1587     "fixit",
1588 { { "1 CDROM",  "Use the 2nd \"live\" CDROM from the distribution",     NULL, installFixitCDROM },
1589   { "2 Floppy", "Use a floppy generated from the fixit image",          NULL, installFixitFloppy },
1590   { "3 Shell",  "Start an Emergency Holographic Shell",                 NULL, installFixitHoloShell },
1591   { NULL } },
1592 };
1593