Trigger when /System/Library/CoreServices/RemoteManagement/ScreensharingAgent.bundle/Contents/MacOS/ScreensharingAgent runs?

If runs VNC / ScreenShare / Remote Desktop to your Mac, there appears to be no way to know that has happened.

This option exists:

but it does not appear to do anything. I can't actually even find the menu extra that is supposed to be enabled when you turn this on.

From my limited testing, it appears that both Screen Sharing and Remote Desktop (and I assume generic VNC), all seem to trigger this process to run:

/System/Library/CoreServices/RemoteManagement/ScreensharingAgent.bundle/Contents/MacOS/ScreensharingAgent

Other than running a "Check Every Minute"-type macro, is there a way to trigger a Keyboard Maestro macro whenever that process is launched?

I assume not, but I'd be glad to be wrong.

@tjluoma did you ever resolve this or find another working solution?

Resolved partially with my setup. See here

I did not, but macOS now tells you when your screen is being observed, which was my goal.

1 Like