Remove support for configuring the X server from sysinstall. General
concensus seems to be that is best left for doing post-install. Discussed on: freebsd-current@ Tested with: make release Approved by: re@ MFC after: 3 days
This commit is contained in:
parent
08bbe9ff04
commit
83c7f6e5de
@ -634,145 +634,6 @@ gotit(char *fname)
|
||||
return file_executable(tmp);
|
||||
}
|
||||
|
||||
int
|
||||
configXDesktop(dialogMenuItem *self)
|
||||
{
|
||||
char *desk;
|
||||
int ret = DITEM_SUCCESS;
|
||||
WINDOW *w = savescr();
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuXDesktops, FALSE) || !(desk = variable_get(VAR_DESKSTYLE))) {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
if (!strcmp(desk, "kde")) {
|
||||
ret = package_add("kde-lite");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("startkde"))
|
||||
write_root_xprofile("exec startkde\n");
|
||||
}
|
||||
else if (!strcmp(desk, "gnome2")) {
|
||||
ret = package_add("gnome2-lite");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("gnome-session"))
|
||||
write_root_xprofile("exec gnome-session\n");
|
||||
}
|
||||
else if (!strcmp(desk, "afterstep")) {
|
||||
ret = package_add("afterstep");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("afterstep"))
|
||||
write_root_xprofile("exec afterstep\n");
|
||||
}
|
||||
else if (!strcmp(desk, "windowmaker")) {
|
||||
ret = package_add("windowmaker");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("wmaker.inst")) {
|
||||
write_root_xprofile("xterm &\n[ ! -d $HOME/GNUstep/Library/WindowMaker ] && /usr/X11R6/bin/wmaker.inst\nexec /usr/X11R6/bin/wmaker\n");
|
||||
}
|
||||
}
|
||||
else if (!strcmp(desk, "fvwm2")) {
|
||||
ret = package_add("fvwm");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm"))
|
||||
write_root_xprofile("exec fvwm\n");
|
||||
}
|
||||
if (DITEM_STATUS(ret) == DITEM_FAILURE)
|
||||
msgConfirm("An error occurred while adding the package(s) required\n"
|
||||
"by this desktop type. Please change installation media\n"
|
||||
"and/or select a different, perhaps simpler, desktop\n"
|
||||
"environment and try again.");
|
||||
restorescr(w);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
configXSetup(dialogMenuItem *self)
|
||||
{
|
||||
char *config, *execfile, *execcmd, *style, *tmp;
|
||||
#ifdef WITH_MICE
|
||||
char *moused;
|
||||
#endif
|
||||
WINDOW *w = savescr();
|
||||
|
||||
setenv("XWINHOME", "/usr/X11R6", 1);
|
||||
tryagain:
|
||||
variable_unset(VAR_DESKSTYLE);
|
||||
variable_unset(VAR_XORG_CONFIG);
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuXOrgConfig, FALSE)) {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
config = variable_get(VAR_XORG_CONFIG);
|
||||
style = variable_get(VAR_DESKSTYLE);
|
||||
if (!config) {
|
||||
if (style)
|
||||
goto config_desktop;
|
||||
else {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_readable("/var/run/ld-elf.so.hints"))
|
||||
vsystem("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
|
||||
else
|
||||
vsystem("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
|
||||
|
||||
vsystem("/sbin/ifconfig lo0 127.0.0.1");
|
||||
|
||||
/*
|
||||
* execcmd may have been passed in as a command name with
|
||||
* arguments. Therefore, before determining if it is suitable for
|
||||
* execution, we must split off the filename component from the
|
||||
* command line arguments.
|
||||
*/
|
||||
|
||||
execcmd = string_concat("/usr/X11R6/bin/", config);
|
||||
execfile = strdup(execcmd);
|
||||
if ((tmp = strchr(execfile, ' ')))
|
||||
*tmp = '\0';
|
||||
if (file_executable(execfile)) {
|
||||
free(execfile);
|
||||
#ifdef WITH_MICE
|
||||
moused = variable_get(VAR_MOUSED);
|
||||
while (!moused || strcmp(moused, "YES")) {
|
||||
if (msgYesNo("The X server may access the mouse in two ways: direct access\n"
|
||||
"or indirect access via the mouse daemon. You have not\n"
|
||||
"configured the mouse daemon. Would you like to configure it\n"
|
||||
"now? If you intend to let the X server access the mouse\n"
|
||||
"directly, choose \"No\" at this time."))
|
||||
break;
|
||||
dialog_clear_norefresh();
|
||||
dmenuOpenSimple(&MenuMouse, FALSE);
|
||||
moused = variable_get(VAR_MOUSED);
|
||||
}
|
||||
if (moused && !strcmp(moused, "YES"))
|
||||
msgConfirm("You have configured and are now running the mouse daemon.\n"
|
||||
"Choose \"/dev/sysmouse\" as the mouse port and \"SysMouse\" or\n"
|
||||
"\"MouseSystems\" as the mouse protocol in the X configuration\n"
|
||||
"utility.");
|
||||
#endif
|
||||
Mkdir("/etc/X11"); /* XXX:Remove this later after we are happy mtree will have created this for us. */
|
||||
systemExecute(execcmd);
|
||||
if (!file_readable("/etc/X11/xorg.conf")) {
|
||||
if (!msgYesNo("The X.Org configuration process seems to have\nfailed. Would you like to try again?"))
|
||||
goto tryagain;
|
||||
else {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
config_desktop:
|
||||
configXDesktop(self);
|
||||
restorescr(w);
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
else {
|
||||
free(execfile);
|
||||
msgConfirm("The X.Org setup utility you chose does not appear to be installed!\n"
|
||||
"Please install this before attempting to configure X.Org.");
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
configResolv(dialogMenuItem *ditem)
|
||||
{
|
||||
|
@ -59,8 +59,6 @@ static struct _word {
|
||||
{ "configPCNFSD", configPCNFSD },
|
||||
{ "configPackages", configPackages },
|
||||
{ "configUsers", configUsers },
|
||||
{ "configXSetup", configXSetup },
|
||||
{ "configXDesktop", configXDesktop },
|
||||
#ifdef WITH_SLICES
|
||||
{ "diskPartitionEditor", diskPartitionEditor },
|
||||
#endif
|
||||
|
@ -696,12 +696,6 @@ nodisks:
|
||||
configRC_conf();
|
||||
sync();
|
||||
|
||||
if (directory_exists("/usr/X11R6")) {
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("Would you like to configure your X server at this time?"))
|
||||
(void)configXSetup(self);
|
||||
}
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("The FreeBSD package collection is a collection of thousands of ready-to-run\n"
|
||||
"applications, from text editors to games to WEB servers and more. Would you\n"
|
||||
|
@ -1339,10 +1339,6 @@ DMenu MenuConfigure = {
|
||||
NULL, configEtcTtys, NULL, "ttys" },
|
||||
{ " Options", "View/Set various installation options",
|
||||
NULL, optionsEditor },
|
||||
{ " X.Org", "Configure X.Org Server",
|
||||
NULL, configXSetup },
|
||||
{ " Desktop", "Configure X Desktop",
|
||||
NULL, configXDesktop },
|
||||
{ " HTML Docs", "Go to the HTML documentation menu (post-install)",
|
||||
NULL, docBrowser },
|
||||
{ " Load KLD", "Load a KLD from a floppy",
|
||||
|
@ -242,16 +242,6 @@ Add users and/or groups to the system.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It configXSetup
|
||||
Configure the X display subsystem.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It configXDesktop
|
||||
Configure the X desktop.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It diskPartitionEditor
|
||||
Invokes the disk partition (MBR) editor.
|
||||
.Pp
|
||||
|
@ -526,8 +526,6 @@ extern int configNTP(dialogMenuItem *self);
|
||||
extern int configOSF1(dialogMenuItem *self);
|
||||
#endif
|
||||
extern int configUsers(dialogMenuItem *self);
|
||||
extern int configXSetup(dialogMenuItem *self);
|
||||
extern int configXDesktop(dialogMenuItem *self);
|
||||
extern int configRouter(dialogMenuItem *self);
|
||||
extern int configPCNFSD(dialogMenuItem *self);
|
||||
extern int configInetd(dialogMenuItem *self);
|
||||
|
@ -634,145 +634,6 @@ gotit(char *fname)
|
||||
return file_executable(tmp);
|
||||
}
|
||||
|
||||
int
|
||||
configXDesktop(dialogMenuItem *self)
|
||||
{
|
||||
char *desk;
|
||||
int ret = DITEM_SUCCESS;
|
||||
WINDOW *w = savescr();
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuXDesktops, FALSE) || !(desk = variable_get(VAR_DESKSTYLE))) {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
if (!strcmp(desk, "kde")) {
|
||||
ret = package_add("kde-lite");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("startkde"))
|
||||
write_root_xprofile("exec startkde\n");
|
||||
}
|
||||
else if (!strcmp(desk, "gnome2")) {
|
||||
ret = package_add("gnome2-lite");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("gnome-session"))
|
||||
write_root_xprofile("exec gnome-session\n");
|
||||
}
|
||||
else if (!strcmp(desk, "afterstep")) {
|
||||
ret = package_add("afterstep");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("afterstep"))
|
||||
write_root_xprofile("exec afterstep\n");
|
||||
}
|
||||
else if (!strcmp(desk, "windowmaker")) {
|
||||
ret = package_add("windowmaker");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("wmaker.inst")) {
|
||||
write_root_xprofile("xterm &\n[ ! -d $HOME/GNUstep/Library/WindowMaker ] && /usr/X11R6/bin/wmaker.inst\nexec /usr/X11R6/bin/wmaker\n");
|
||||
}
|
||||
}
|
||||
else if (!strcmp(desk, "fvwm2")) {
|
||||
ret = package_add("fvwm");
|
||||
if (DITEM_STATUS(ret) != DITEM_FAILURE && gotit("fvwm"))
|
||||
write_root_xprofile("exec fvwm\n");
|
||||
}
|
||||
if (DITEM_STATUS(ret) == DITEM_FAILURE)
|
||||
msgConfirm("An error occurred while adding the package(s) required\n"
|
||||
"by this desktop type. Please change installation media\n"
|
||||
"and/or select a different, perhaps simpler, desktop\n"
|
||||
"environment and try again.");
|
||||
restorescr(w);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
configXSetup(dialogMenuItem *self)
|
||||
{
|
||||
char *config, *execfile, *execcmd, *style, *tmp;
|
||||
#ifdef WITH_MICE
|
||||
char *moused;
|
||||
#endif
|
||||
WINDOW *w = savescr();
|
||||
|
||||
setenv("XWINHOME", "/usr/X11R6", 1);
|
||||
tryagain:
|
||||
variable_unset(VAR_DESKSTYLE);
|
||||
variable_unset(VAR_XORG_CONFIG);
|
||||
dialog_clear_norefresh();
|
||||
if (!dmenuOpenSimple(&MenuXOrgConfig, FALSE)) {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
config = variable_get(VAR_XORG_CONFIG);
|
||||
style = variable_get(VAR_DESKSTYLE);
|
||||
if (!config) {
|
||||
if (style)
|
||||
goto config_desktop;
|
||||
else {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_readable("/var/run/ld-elf.so.hints"))
|
||||
vsystem("/sbin/ldconfig -m /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
|
||||
else
|
||||
vsystem("/sbin/ldconfig /usr/lib /usr/X11R6/lib /usr/local/lib /usr/lib/compat");
|
||||
|
||||
vsystem("/sbin/ifconfig lo0 127.0.0.1");
|
||||
|
||||
/*
|
||||
* execcmd may have been passed in as a command name with
|
||||
* arguments. Therefore, before determining if it is suitable for
|
||||
* execution, we must split off the filename component from the
|
||||
* command line arguments.
|
||||
*/
|
||||
|
||||
execcmd = string_concat("/usr/X11R6/bin/", config);
|
||||
execfile = strdup(execcmd);
|
||||
if ((tmp = strchr(execfile, ' ')))
|
||||
*tmp = '\0';
|
||||
if (file_executable(execfile)) {
|
||||
free(execfile);
|
||||
#ifdef WITH_MICE
|
||||
moused = variable_get(VAR_MOUSED);
|
||||
while (!moused || strcmp(moused, "YES")) {
|
||||
if (msgYesNo("The X server may access the mouse in two ways: direct access\n"
|
||||
"or indirect access via the mouse daemon. You have not\n"
|
||||
"configured the mouse daemon. Would you like to configure it\n"
|
||||
"now? If you intend to let the X server access the mouse\n"
|
||||
"directly, choose \"No\" at this time."))
|
||||
break;
|
||||
dialog_clear_norefresh();
|
||||
dmenuOpenSimple(&MenuMouse, FALSE);
|
||||
moused = variable_get(VAR_MOUSED);
|
||||
}
|
||||
if (moused && !strcmp(moused, "YES"))
|
||||
msgConfirm("You have configured and are now running the mouse daemon.\n"
|
||||
"Choose \"/dev/sysmouse\" as the mouse port and \"SysMouse\" or\n"
|
||||
"\"MouseSystems\" as the mouse protocol in the X configuration\n"
|
||||
"utility.");
|
||||
#endif
|
||||
Mkdir("/etc/X11"); /* XXX:Remove this later after we are happy mtree will have created this for us. */
|
||||
systemExecute(execcmd);
|
||||
if (!file_readable("/etc/X11/xorg.conf")) {
|
||||
if (!msgYesNo("The X.Org configuration process seems to have\nfailed. Would you like to try again?"))
|
||||
goto tryagain;
|
||||
else {
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
config_desktop:
|
||||
configXDesktop(self);
|
||||
restorescr(w);
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
else {
|
||||
free(execfile);
|
||||
msgConfirm("The X.Org setup utility you chose does not appear to be installed!\n"
|
||||
"Please install this before attempting to configure X.Org.");
|
||||
restorescr(w);
|
||||
return DITEM_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
configResolv(dialogMenuItem *ditem)
|
||||
{
|
||||
|
@ -59,8 +59,6 @@ static struct _word {
|
||||
{ "configPCNFSD", configPCNFSD },
|
||||
{ "configPackages", configPackages },
|
||||
{ "configUsers", configUsers },
|
||||
{ "configXSetup", configXSetup },
|
||||
{ "configXDesktop", configXDesktop },
|
||||
#ifdef WITH_SLICES
|
||||
{ "diskPartitionEditor", diskPartitionEditor },
|
||||
#endif
|
||||
|
@ -696,12 +696,6 @@ nodisks:
|
||||
configRC_conf();
|
||||
sync();
|
||||
|
||||
if (directory_exists("/usr/X11R6")) {
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("Would you like to configure your X server at this time?"))
|
||||
(void)configXSetup(self);
|
||||
}
|
||||
|
||||
dialog_clear_norefresh();
|
||||
if (!msgYesNo("The FreeBSD package collection is a collection of thousands of ready-to-run\n"
|
||||
"applications, from text editors to games to WEB servers and more. Would you\n"
|
||||
|
@ -1339,10 +1339,6 @@ DMenu MenuConfigure = {
|
||||
NULL, configEtcTtys, NULL, "ttys" },
|
||||
{ " Options", "View/Set various installation options",
|
||||
NULL, optionsEditor },
|
||||
{ " X.Org", "Configure X.Org Server",
|
||||
NULL, configXSetup },
|
||||
{ " Desktop", "Configure X Desktop",
|
||||
NULL, configXDesktop },
|
||||
{ " HTML Docs", "Go to the HTML documentation menu (post-install)",
|
||||
NULL, docBrowser },
|
||||
{ " Load KLD", "Load a KLD from a floppy",
|
||||
|
@ -242,16 +242,6 @@ Add users and/or groups to the system.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It configXSetup
|
||||
Configure the X display subsystem.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It configXDesktop
|
||||
Configure the X desktop.
|
||||
.Pp
|
||||
.Sy Variables :
|
||||
None
|
||||
.It diskPartitionEditor
|
||||
Invokes the disk partition (MBR) editor.
|
||||
.Pp
|
||||
|
@ -526,8 +526,6 @@ extern int configNTP(dialogMenuItem *self);
|
||||
extern int configOSF1(dialogMenuItem *self);
|
||||
#endif
|
||||
extern int configUsers(dialogMenuItem *self);
|
||||
extern int configXSetup(dialogMenuItem *self);
|
||||
extern int configXDesktop(dialogMenuItem *self);
|
||||
extern int configRouter(dialogMenuItem *self);
|
||||
extern int configPCNFSD(dialogMenuItem *self);
|
||||
extern int configInetd(dialogMenuItem *self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user