Skip to main content
1 of 7
Graham Miln
  • 45.6k
  • 8
  • 94
  • 128

The error occurs because the commands in your osascript require a graphical user session. AppleScript requires a graphical user session to work.

The launchd job is running as the root user in a non-graphical user session.

Graham Miln
  • 45.6k
  • 8
  • 94
  • 128