30

On macOS 10.12.5, I only see LaunchAgents in the Users Library directory. Are the agents only invoked if a user is logged in?

  • /Library/LaunchAgents/
  • /Library/LaunchDaemons/
  • /System/Library/LaunchAgents/
  • /System/Library/LaunchDaemons/
  • /User/username/Library/LaunchAgents/
Graham Miln
  • 41,742
  • 8
  • 87
  • 120
MmmHmm
  • 2,661
  • 4
  • 26
  • 49

1 Answers1

39

Yes, LaunchAgents are only invoked when the user logs into a graphical session.

LaunchDaemons are typically launched when the system boots and are run outside of a specific user session.

The lauchctl manual page lists these folders with short descriptions:

Files

  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System-wide daemons provided by the administrator.
  • /System/Library/LaunchAgents Per-user agents provided by Mac OS X.
  • /System/Library/LaunchDaemons System-wide daemons provided by Mac OS X.
emery
  • 103
  • 3
Graham Miln
  • 41,742
  • 8
  • 87
  • 120