Commit Graph

38 Commits

Author SHA1 Message Date
Augustin Cavalier
6bef34f853 launch/user: Put env in both target desktop and service app_server.
It seems launch_daemon does not actually support root "env"s,
and adding support for that does not appear to be trivial.
2021-10-27 12:33:51 -04:00
Augustin Cavalier
a04b2f4c5e Launch app_server in user context.
This way, we get the user's environment variables, and so should
input_server, which is started by app_server.

This should, after 6 years, fix #12534. We may need to revisit this
when/if we add multiuser support, but that is a problem for another day.

Change-Id: I04698306bc68a585acd232e9f9d29c50bc170a1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4506
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-10-26 19:20:53 +00:00
Augustin Cavalier
895e0c8a32 launch/system: Use single-line "on" trigger.
The "user" launch file already uses this everywhere, so
we may as well save a few characters.
2021-09-29 13:33:21 -04:00
Alexander G. M. Smith
b5efad4eae PackageKit: Remove hard coded first boot package processing scripts.
Once change 2342 is in place (running first boot scripts exported from
packages), see https://review.haiku-os.org/c/haiku/+/2342,
remove data/system/boot/post_install/add_catalog_entry_attributes.sh
and related support infrastructure (magic files, launch_roster entries).

The work this script did can in fact be done at image creation time
instead of at first boot.

Change-Id: I485e1a0a87c3e6a6ba3f882e65996f2327134d37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3751
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-05-14 16:08:17 +00:00
Adrien Destugues
baa4caf76b Fix NTP synchronization.
Fixes #15408.
2019-12-31 16:20:11 +01:00
Augustin Cavalier
eb3cdd8a25 Time: Run synchronization on network up.
Also move the settings check into launch_daemon, as that way
"Time --update" can be invoked even when the setting is disabled.

Fixes #9348.
2019-04-07 15:12:39 -04:00
Yatendra Singh
e680a439bf Launchbox: autostart on boot
Use launch daemon to autostart Launchbox if enabled in settings.

Change-Id: Id0aaf454cfbc0cc42db2dbb54d6788c79dae6949
Reviewed-on: https://review.haiku-os.org/c/917
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-19 18:29:17 +00:00
Axel Dörfler
893e3de866 mail_daemon: Converted to BServer. 2015-11-28 14:18:18 +01:00
Axel Dörfler
f92aeedd7f User login: Fixed missing Deskbar tray icons.
* The mail_daemon could have been launched too early, which caused it
  not to be able to add its Deskbar icon. We don't really want a
  dependency to the Deskbar, though, which is why we only run the
  mail_daemon on the same event (which makes the Deskbar available
  at that point).
* Ideally, the mail_daemon should be smart enough to install its Deskbar
  icon once the Deskbar is available, though.
* Similar issue for the first login scripts. Here, we have a real
  dependency to the Deskbar which makes the script launch once the
  Deskbar is available.
* This finally fixes #12454.
2015-11-28 14:01:05 +01:00
Axel Dörfler
44d78872df user launch: Fixed mail_daemon signature.
* This allows the launch_daemon to properly quit the mail_daemon.
2015-11-22 11:35:01 +01:00
Axel Dörfler
64df3e0483 launch_daemon: Added forgotten time update/dstcheck. 2015-11-07 21:58:12 +01:00
Axel Dörfler
de0e15ae8c launch_daemon: corrected print server signature.
* Not sure yet why it actually worked before; must be some other
  bug :-)
2015-11-07 21:58:12 +01:00
Axel Dörfler
d8c0972a81 launch_daemon: Added "setting" condition.
* Moved the mail_daemon to the user startup, and start it only if
  enabled in the settings.
2015-11-06 22:49:17 +01:00
Jérôme Duval
e02111ea5d HaikuBootstrap: launch bootstrap_daemon.py on boot.
* removed screen_saver and shortcut_catcher input addons, they need libgame or libGL.
2015-10-21 19:14:15 +02:00
Axel Dörfler
d2eca26b73 Moved per user post install actions to first-login script.
* The same mechanism (and the same PostInstallScript) is used for this.
* If a file first_login exists in ~/config/settings/boot, the first-login
  scripts are launched, and the file removed.
* This fixes adding the deskbar tray icons even when there is no Deskbar
  running yet (for example on first boot when the FirstBootPrompt
  starts), or, IOW bug #12275.
2015-10-19 21:27:02 +02:00
Axel Dörfler
d9bb9513c5 launch_daemon: "file_exists" now resolves $HOME, and '~'. 2015-10-19 21:22:21 +02:00
Axel Dörfler
4e8fc45146 Deskbar: converted to BServer. 2015-10-19 21:21:56 +02:00
Axel Dörfler
cfe6baf62f cddb_daemon: renamed to cddb_lookup, moved to /src/bin.
* It's now a standard command line tool that is launched automatically
  via the launch_daemon whenver a volume is mounted.
2015-10-19 21:21:21 +02:00
Axel Dörfler
b5e496b575 notification_server: Converted to BServer, launch on demand. 2015-10-14 22:24:19 +02:00
Axel Dörfler
8f27961801 midi_server: Converted to BServer, launched on demand. 2015-10-14 22:24:01 +02:00
Axel Dörfler
37e5a03660 print_server: Converted to launch_daemon, run on demand only.
* Seems to work fine, although it should probably also be triggered when
  there are still jobs in the queue -- someone more knowledgeable might
  want to chime in here, please :-)
* If this turns out to be problematic, we can just drop the "on_demand"
  job config again.
2015-10-13 16:37:38 +02:00
Rene Gollent
03bf949ed4 launch_daemon: Correctly fix #12289 as pointed out by Axel.
- Rather than depending just on mount_server's launch, instead use
  a condition that waits for the volumes mounted event. Had missed
  the existence of this one previously.
2015-08-08 17:12:17 -04:00
Rene Gollent
fdc32a3844 Launch configuration: Fix #12289.
- Adjust launch configuration such that media_server requires mount_server.
  Otherwise, if the user has specified sound files for any events that are
  on non-boot disks, these won't be found/loaded properly during the boot
  process.
2015-08-07 22:05:08 -04:00
Rene Gollent
006fd65396 Add missing launch definition for net_server. 2015-07-22 17:19:02 -04:00
Axel Dörfler
65ed8a5e87 Added post-install script, and start UserBootscript again.
* This is the final missing piece of the former boot process.
* Removed the unused Bootscript, and Bootscript.cd files.
2015-07-22 20:45:43 +02:00
Axel Dörfler
5e17d2d743 mount_server: Ported to a launch_daemon world.
* Now inherits from BServer, and gets its message port from the
  launch_daemon.
* It registers an event "initial_volumes_mounted" that allows other
  services to be started afterwards.
* This is now used in the boot launch files, and makes the scripting
  based previous solution superfluous which has been removed with this
  commit, too.
* This implements the last needed feature in order to reproduce the
  complete former boot process using the launch_daemon.
2015-07-22 20:45:29 +02:00
Axel Dörfler
1ec3f11d97 Create installer link in live mode, check existence.
* FirstBootPrompt as well as the Installer do not exist on the
  minimum image, so take this into account when making the startup
  target decisions.
2015-07-22 20:44:48 +02:00
Axel Dörfler
634aefe4fd launch_daemon: Now supports getting the env from a script.
* Scripts from targets are evaluated once on first target launch,
  scripts from jobs are evaluated on each start.
* The "desktop" target now sources SetupEnvironment as usual.
2015-07-22 20:44:16 +02:00
Axel Dörfler
05a567f609 Added autologin command, and use it by default.
* This will handle our current single-user login needs.
* Removed Login from the minimum image again.
2015-07-22 20:43:54 +02:00
Axel Dörfler
4c67f79c2c FirstBootPrompt: launch installer/desktop targets directly.
* No need for shell scripting here.
2015-07-22 20:43:44 +02:00
Axel Dörfler
638ee09556 data/launch/user: Fixed FirstBootPrompt location.
* Now started via signature (it lives in bin, not apps).
2015-07-22 20:43:30 +02:00
Axel Dörfler
004cd6709d launch_daemon: Added run directive.
* Allows to conditionally (or unconditionally) launch targets.
* Including tests for the settings parser.
* FirstBootPrompt is now launched when deemed necessary (as in
  the Bootscript).
2015-07-22 20:43:08 +02:00
Axel Dörfler
c086a1834b launch_daemon: Improved target support.
* You can now put jobs/services into a target.
* Instead of having Login started as part of the normal boot process,
  it's now in the "login" target.
* The app_server now launches the login target when a login becomes
  available (ie. during startup, but that could be improved later on).
2015-07-22 20:41:51 +02:00
Axel Dörfler
ac0a462fba launch_daemon: Basic user session implementation.
* Instead of launching Tracker/Deskbar directly, we now launch the
  Login application.
* This will now start a new session for the selected user (the password
  is currently ignored).
* When a user session is started, the launch_daemon forks, and the
  child then restarts the LaunchDaemon application in user mode.
* It then registers itself with its parent, in order to resolve user
  dependent services.
* Added a user launch file that will cause Tracker, and Deskbar to
  start in the new session.
2015-07-22 20:41:37 +02:00
Axel Dörfler
bea38cb711 registrar: implemented auth port via launch_daemon.
* get_roster_port_name() is no longer needed.
* This also removes the app_server restart code from the debug
  server -- this will be done by the launch_daemon in the future.
2015-07-22 20:41:01 +02:00
Axel Dörfler
43aec2c726 launch_daemon: added support for arbitrary ports.
* Dropped "create_port" -- this is now the default for services.
* Additionally (or alternatively, if you use the "legacy" mode), you can
  now create named ports, and specify their capacity.
* Added convenience methods to BLaunchRoster that automatically use the
  signature of the current be_app.
2015-07-22 20:40:38 +02:00
Axel Dörfler
89168ad8b9 Boot the system via launch_daemon.
* This is actually working already, although we cannot reproduce all
  the features of the former Bootscript yet. This is without any
  dependency support in launch_daemon.
* All shell activity like cleaning out /tmp, setting up the environment,
  setting the time, etc. is not yet working.
2015-07-22 20:40:33 +02:00
Axel Dörfler
1480e5da6f The beginnings of a launch_daemon for Haiku.
* This will be heavily inspired by Apple's launchd, as well as
  systemd -- for now it really doesn't do a whole lot, though.
* What works so far: the configuration files are read, parsed, and
  the jobs created.
* The jobs are even initialized, and their message ports created.
* BApplication now retrieves a previously created port from the
  launch_daemon for use with BServer.
* Only the registrar actually uses this for now.
2015-07-22 20:39:47 +02:00