Opened 11 years ago

Closed 11 years ago

#9427 closed bug (fixed)

FirstBootPrompt appears after installation when you first start.

Reported by: Premislaus Owned by: mmadia
Priority: normal Milestone: R1
Component: Applications/FirstBootPrompt Version: R1/Development
Keywords: Cc: stippi
Blocked By: Blocking:
Platform: x86

Description (last modified by mmadia)

FirstBootPrompt appears after installation when you first start. This happening in the nightly builds. Just click on the Boot to Desktop. After that this no longer occurs.

I run Haiku from the CD. Because I do not have installed BootManager.

Change History (7)

comment:1 by mmadia, 11 years ago

Component: Applications/ReadOnlyBootPromptApplications/FirstBootPrompt
Description: modified (diff)
Summary: ReadOnlyBootPrompt appears after installation when you first start.FirstBootPrompt appears after installation when you first start.

comment:2 by mmadia, 11 years ago

Owner: changed from stippi to mmadia
Status: newin-progress

comment:3 by mmadia, 11 years ago

stippi, would having FirstBootPrompt write the settings immediately upon launch be proper? The following "works", but i'm not sure if the Locale settings file should be written prior to running PopulateLanguages() and _PopulateKeymaps().

diff --git a/src/apps/firstbootprompt/BootPromptWindow.cpp b/src/apps/firstbootprompt/BootPromptWindow.cpp
index 113a7d7..b819133 100644
--- a/src/apps/firstbootprompt/BootPromptWindow.cpp
+++ b/src/apps/firstbootprompt/BootPromptWindow.cpp
@@ -171,7 +171,7 @@ BootPromptWindow::BootPromptWindow()
 	fKeymapsMenuField = new BMenuField("", "", new BMenu(""));
 	fKeymapsMenuField->Menu()->SetLabelFromMarked(true);
 
-	_InitCatalog(false);
+	_InitCatalog(true);
 	_PopulateLanguages();
 	_PopulateKeymaps();

If so, then Bootscript could be changed to launch FirstBootPrompt always on read-only mediums and whenever the Locale settings file does not exist.

diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript
index a49439d..fa96901 100644
--- a/data/system/boot/Bootscript
+++ b/data/system/boot/Bootscript
@@ -117,8 +117,8 @@ if [ "$SAFEMODE" != "yes" ]; then
 fi
 
 # Now ask the user if he wants to run the Installer or continue to the Desktop.
-freshInstallIndicator=/boot/common/settings/fresh_install
-if [ "$isReadOnly" = "yes" -o -e $freshInstallIndicator ]; then
+localeSettings=/boot/home/config/settings/Locale\ settings
+if [ "$isReadOnly" = "yes" -a ! -e "$localeSettings" ]; then
 	/bin/FirstBootPrompt
 	if [ $? -eq 0 ]; then
 		launchscript $SCRIPTS/Bootscript.cd
@@ -190,6 +190,7 @@ if [ "$SAFEMODE" != "yes" ]; then
 fi
 
 # Check for fresh install and run post install scripts.
+freshInstallIndicator=/boot/common/settings/fresh_install
 postInstallDir=/boot/common/boot/post_install
 if [ -e $freshInstallIndicator ]; then
 	# wait a moment for things to calm down a bit

comment:4 by mmadia, 11 years ago

Cc: stippi added

comment:5 by stippi, 11 years ago

The idea was always that FirstBootPrompt *writes* the settings, even on read-only media, and actually relies on the presence of the write overlay so that the virtually written settings are then copied by the Installer as a real file in the target installation, thereby carrying over the choice that the user made for language and keyboard layout. It's been too long and I cannot really comment on the patch.

comment:6 by mmadia, 11 years ago

Currently FirstBootPrompt will only write the settings if the default values are changed. If a user simply clicks the 'Installer' or 'desktop' buttons, the Locale settings will not be written.

comment:7 by mmadia, 11 years ago

Resolution: fixed
Status: in-progressclosed

A tweaked version of my diff in comment:3 was applied in hrev45286. Now, FirstBootPrompt will write the settings upon launch (in addition to whenever they're changed by the user). FirstBootPrompt will always launch on read-only mediums. For non-read-only medium, FirstBootPrompt will launch only if "Locale settings" does not exist.

Note: See TracTickets for help on using tickets.