Opened 12 years ago

Closed 11 years ago

Last modified 11 years 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:
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 11 years ago.
0001-Start-the-ReadOnlyBootPrompt-when-boot-from-USB-driv.patch (1.6 KB ) - added by dsjonny 11 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 by pulkomandy, 12 years ago

Component: Kits/Locale KitApplications/ReadOnlyBootPrompt
Owner: changed from pulkomandy to stippi
Summary: Select language dialog at first bootMake 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 by dsjonny, 12 years ago

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

comment:3 by mmadia, 12 years ago

Version: R1/alpha4R1/Development

comment:4 by axeld, 12 years ago

Priority: normallow

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 by dsjonny, 12 years ago

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 by stippi, 12 years ago

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 by dsjonny, 12 years ago

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 by axeld, 12 years ago

Priority: lownormal

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

by dsjonny, 11 years ago

Attachment: Bootscript added

comment:9 by dsjonny, 11 years ago

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 by dsjonny, 11 years ago

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

comment:11 by axeld, 11 years ago

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

comment:12 by dsjonny, 11 years ago

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 by dsjonny, 11 years ago

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

comment:14 by dsjonny, 11 years ago

I have added the patch file.

comment:15 by mmadia, 11 years ago

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 by mmadia, 11 years ago

Owner: changed from stippi to mmadia
Status: newassigned

comment:17 by dsjonny, 11 years ago

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

comment:18 by mmadia, 11 years ago

Resolution: fixed
Status: assignedclosed

Applied in hrev45185.

comment:19 by mmadia, 11 years ago

Component: Applications/ReadOnlyBootPromptApplications/FirstBootPrompt

Modifying ticket to reflect the renaming of ReadOnlyBootPrompt to FirstBootPrompt.

Note: See TracTickets for help on using tickets.