Do you have a reference so I could read up on the 'mini buddy'
approach please?
OK, some background:
-
Mac Buddy is the informal name for the setup assistant that run when you first boot the Mac [1].
-
By extension, Mini Buddy is the setup assistant that runs when you log in, typically after a software update.
IIRC Mini Buddy puts the GUI login session into ‘on-demand jobs only’ mode, just like app restore, except in that case it continues indefinitely, only ending when the user has finished the setup. This is a serious challenge for screen sharing products.
I have also tried having my Launch Daemon attempt to connect to the
Launch Agent via XPC.
That won’t work because of layered namespaces. The fact that you tried it suggests that you’re missing key details about macOS’s layered architecture. I recommend reading the Execution Contexts section of Technote 2083 Daemons and Agents. It’s not longer 100% accurate, but it’s still accurate enough to be helpful.
I also noticed that any attempt to force my LaunchAgent to start from
terminal (via SSH session) seems to be ignored.
That’s not going to work for so many reasons )-: To start, a load is different from a start. In this case the job is loaded already, it’s just not starting. So running a launchctl load
won’t help; you’d need a launchctl start
.
But that won’t work either because your shell is running in an SSH session, not the GUI login session. With modern launchctl
commands, like kickstart
, you can target one session from another, and that might be an interesting test, but…
What would be a better way to create this artificial demand?
I have no supported suggestions on this front. Everything that works is a hack )-:
My advice is that you read the launchd.plist
man page, study the various types of demand that it supports, a craft a solution based on one of those.
Oh, and whatever approach you take, please file a bug about this. The system should support a way for screen sharing products to solve this problem.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] It may have actually been a code name at one point, but at this point it’s just part of the general lexicon.