Question on user_launch

Is there any documention on how user_launch is working ?

If I understood correctly it allows to start some jobs/services once the system is started like LaunchBox below (which depends on a setting) :

job x-vnd.Haiku-LaunchBox {
	launch /system/apps/LaunchBox
	if setting ~/config/settings/LaunchBox/main_settings autostart
	on initial_volumes_mounted
	legacy
	no_safemode
}

Not sure how the setting command is working and what legacy/safemode mean.

Have a look at The Haiku Book: Introduction to the Launch Daemon

The doc I linked doesn’t specifically mention the condition “setting”.

It appears the “setting” condition in

if setting ~/config/settings/LaunchBox/main_settings autostart

decodes the flattened BMessage ~/config/settings/LaunchBox/main_settings and checks if there’s a field named “autostart” and sees if it’s true or false.

Safenmode is related to booting with safemode from the bootloader. Not sure what legacy means though.

My understanding is that if the service does not use BServer, which is private, then legacy should be used.