While using this library to fire notifications for a golang app (more specifically an osquery plugin) which runs as root, notifications wouldn't fire as root had no logged in session. Setting the osascript to tell application "System Events" made the alert popup on the currently logged in users screen.
While using this library to fire notifications for a golang app (more specifically an osquery plugin) which runs as root, notifications wouldn't fire as root had no logged in session. Setting the osascript to tell application "System Events" made the alert popup on the currently logged in users screen.