[launchd-dev] Starting Agents in specific GUI sessions

Quinn "The Eskimo!" eskimo1 at apple.com
Mon Aug 19 03:46:28 PDT 2013


On 16 Aug 2013, at 17:44, NuSkooler <nuskooler at gmail.com> wrote:

> Can you elaborate here more?

Historically, folks who've attempted to do this break with every major release of the OS.  Things that have broken them in the past include:

o introduction of multiple users in 10.0

o introduction of fast user switching in 10.3

o introduction of launchd in 10.5

o changes to launchd session management in 10.6

o introduction of multiple GUI login sessions (via Screen Sharing) in 10.7

o security session management changes in 10.8

In contrast, the approach I've described works on 10.5 and later, and the analogous approach--which uses a login item rather than a GUI launchd agent--works on all versions of OS X (actually, as far back as System 7).

> I know they are different worlds, but we do this on Windows without any issue. I already know and track sessions, know when a user logs in or out, etc.

Alas, your Windows experience will only take you so far on the Mac, and this is one of the places that things just don't match up.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the launchd-dev mailing list