Opened 6 years ago

Closed 6 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:
Has a Patch: no 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 Changed 6 years ago by mmadia

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 Changed 6 years ago by mmadia

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

comment:3 Changed 6 years ago by mmadia

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(""));
-	_InitCatalog(false);
+	_InitCatalog(true);

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
 # Now ask the user if he wants to run the Installer or continue to the Desktop.
-if [ "$isReadOnly" = "yes" -o -e $freshInstallIndicator ]; then
+localeSettings=/boot/home/config/settings/Locale\ settings
+if [ "$isReadOnly" = "yes" -a ! -e "$localeSettings" ]; then
 	if [ $? -eq 0 ]; then
 		launchscript $SCRIPTS/
@@ -190,6 +190,7 @@ if [ "$SAFEMODE" != "yes" ]; then
 # Check for fresh install and run post install scripts.
 if [ -e $freshInstallIndicator ]; then
 	# wait a moment for things to calm down a bit

comment:4 Changed 6 years ago by mmadia

Cc: stippi added

comment:5 Changed 6 years ago by stippi

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 Changed 6 years ago by mmadia

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 Changed 6 years ago by mmadia

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.