Opened 20 months ago

Closed 15 months ago

Last modified 15 months ago

#8945 closed enhancement (fixed)

Make ReadOnlyBootPrompt show up also on writable devices if no locale settings are found

Reported by: dsjonny Owned by: mmadia
Priority: normal Milestone: R1
Component: Applications/FirstBootPrompt Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

It would be useful if the user can select the GUI language at first boot. After the background appears (before loading the Tracker and the Deskbar) a language select dialog should open. After the user closes this dialog, the system will use the selected language immediate. So, the Tracker and the Deskbar will use the user's language when start.

I think this is "important", because if the user does not understand the english language, than he/she may not find the locale settings to change the interface language.

Attachments (2)

Bootscript (4.2 KB) - added by dsjonny 19 months ago.
0001-Start-the-ReadOnlyBootPrompt-when-boot-from-USB-driv.patch (1.6 KB) - added by dsjonny 17 months ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 20 months ago by pulkomandy

  • Component changed from Kits/Locale Kit to Applications/ReadOnlyBootPrompt
  • Owner changed from pulkomandy to stippi
  • Summary changed from Select language dialog at first boot to Make ReadOnlyBootPrompt show up also on writable devices if no locale settings are found

This already happens if you boot from read-only media (that is, an installation CD). We could try to make it happen also for USB sticks by detecting that the Locale settings are missing.

comment:2 Changed 20 months ago by dsjonny

Sorry, I did not know about this "future" on readonly media, because I use Haiku from USB/SSD.

comment:3 Changed 20 months ago by mmadia

  • Version changed from R1/alpha4 to R1/Development

comment:4 Changed 20 months ago by axeld

  • Priority changed from normal to low

How do you get it on there, then? Since our releases are deployed via images, we already pretty much covered this point, I think, as Adrien pointed out.

AFAICT you seek for a way to do that for either manual builds (build/jam/UserBuildSetup is your friend), or for the case when you directly copy a nightly onto a drive in your system. While that certainly could be done, I would not really consider this important.

comment:5 Changed 20 months ago by dsjonny

I use Haiku nighly images (r1alpha4). I have never started Haiku from readonly media. I write Haiku to USB disk always.
And I think the solution is simple: Haiku can check if there is a local settings file exists or not. If not than the ReadOnlyBootPrompt can show up (of course before the Tracker/Deskbar loaded). On the next boot the local settings file exists, so the user will not get the select language prompt.
My idea was just only this. It can be implemented in the Bootscript.

comment:6 Changed 20 months ago by stippi

FWIIW, that's exactly what I had planned how to fix this problem. Just didn't have any time yet. However I would recommend some dedicated settings or "marker" file.

comment:7 Changed 20 months ago by dsjonny

My example:

if [ "$isReadOnly" = "yes" ]; then
	# Create Installer link (using the write overlay)
	ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer

	/bin/ReadOnlyBootPrompt
	if [ $? -eq 0 ]; then
		launchscript $SCRIPTS/Bootscript.cd
		exit 0 # and return
	fi
else
	if [ ! -f "/boot/home/config/settings/Locale settings" ]; then
		ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer

		/bin/ReadOnlyBootPrompt
		if [ $? -eq 0 ]; then
			exit 0
		fi
	fi
fi

comment:8 Changed 20 months ago by axeld

  • Priority changed from low to normal

Ah, I didn't notice it doesn't work for USB drives -- but it certainly makes sense. Thanks for the hint.

Changed 19 months ago by dsjonny

comment:9 Changed 19 months ago by dsjonny

I have attached the Bootscript to the ticket which contains a good solution for this ticket. I think it can add to the alpha4 image.

comment:10 Changed 19 months ago by dsjonny

Sorry, but 1 letter missed from the filename in the attached file:
Local settings >> Locale settings

comment:11 Changed 19 months ago by axeld

Thanks for the updated Bootscript. However, can you please provide a patch/diff instead? That simplifies evaluating the changes tremendously.

comment:12 Changed 19 months ago by dsjonny

I have just inserted some lines:

The original:

	if [ "$isReadOnly" = "yes" ]; then
	    # Create Installer link (using the write overlay)
	    ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer
	
	    /bin/ReadOnlyBootPrompt
	    if [ $? -eq 0 ]; then
	        launchscript $SCRIPTS/Bootscript.cd
	        exit 0 # and return
	    fi
	fi

The new (start at line 114):

	if [ "$isReadOnly" = "yes" ]; then
	    # Create Installer link (using the write overlay)
	    ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer
	
	    /bin/ReadOnlyBootPrompt
	    if [ $? -eq 0 ]; then
	        launchscript $SCRIPTS/Bootscript.cd
	        exit 0 # and return
	    fi
	else
	    if [ ! -f "/boot/home/config/settings/Locale settings" ]; then
	        ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer
	
	        /bin/ReadOnlyBootPrompt
	        if [ $? -eq 0 ]; then
	            launchscript $SCRIPTS/Bootscript.cd
	            exit 0 # and return
	        fi
	    fi
	fi

comment:13 Changed 19 months ago by dsjonny

Will this small update in the upcomming alpha4? I think this is not a complex solution, and one more ticket solved... :)

comment:14 Changed 17 months ago by dsjonny

I have added the patch file.

comment:15 Changed 16 months ago by mmadia

Regarding the patch, using "/boot/home/config/settings/Locale settings" is not applicable. For english users who have no need to launch Locale (or change any settings), the settings file will never be created. Thus, ReadOnlyBootPrompt will always launch

However, would utilizing freshInstallIndicator=/boot/common/settings/fresh_install suffice? That file will exist on every read-only media, first boot of writable images (usb,vmdk), and (if installing directly to partition via the build system or a mounted image file) hard disk.

The last scenario (of installing directly to hard disk through the build system or mounted image file) may not be ideal, but it generally tends to be an advanced intsallation method. Additionally, it will occur only on the first boot.

Thoughts?

diff --git a/data/system/boot/Bootscript b/data/system/boot/Bootscript
index 3a52cb2..d0f130e 100644
--- a/data/system/boot/Bootscript
+++ b/data/system/boot/Bootscript
@@ -117,7 +117,8 @@ if [ "$SAFEMODE" != "yes" ]; then
 fi
 
 # Now ask the user if he wants to run the Installer or continue to the Desktop.
-if [ "$isReadOnly" = "yes" ]; then
+freshInstallIndicator=/boot/common/settings/fresh_install
+if [ "$isReadOnly" = "yes" -o -e $freshInstallIndicator ]; then
 	# Create Installer link (using the write overlay)
 	ln -sf /boot/system/apps/Installer /boot/home/Desktop/Installer
 
@@ -190,7 +191,6 @@ fi
 
 # Check for fresh install and run post install scripts.
 postInstallDir=/boot/common/boot/post_install
-freshInstallIndicator=/boot/common/settings/fresh_install
 if [ -e $freshInstallIndicator ]; then
 	# wait a moment for things to calm down a bit
 	sleep 3

comment:16 Changed 16 months ago by mmadia

  • Owner changed from stippi to mmadia
  • Status changed from new to assigned

comment:17 Changed 16 months ago by dsjonny

That's a better idea than my patch. :)

comment:18 Changed 15 months ago by mmadia

  • Resolution set to fixed
  • Status changed from assigned to closed

Applied in hrev45185.

comment:19 Changed 15 months ago by mmadia

  • Component changed from Applications/ReadOnlyBootPrompt to Applications/FirstBootPrompt

Modifying ticket to reflect the renaming of ReadOnlyBootPrompt to FirstBootPrompt.

Note: See TracTickets for help on using tickets.