3

I've created an Automator Quick Action called "Screenshot" that uses the "Run Shell Script" action to run a script in my path, which uses Mac OS's built in screencapture command and then uploads the file to a Google Cloud Storage bucket. I've done this so I can use my Screenshot script from the Touch Bar by holding Fn to see the Quick Actions menu.

Here's the problem: when I take a screenshot while focused on an app that doesn't have Screen Recording permissions in Security and Privacy, I only get a picture of my wallpaper. Everything works fine in apps that have Screen Recording permissions, or when running it from Automator manually.

I suspect that Automator inherits its permissions from the window in which it is running. Therefore, I would like to know how to manually grant Screen Recording permissions to my most commonly used apps, so that I can take screenshots within them.

There are no add/remove buttons in the Security and Privacy section, and I cannot modify the database manually because of SIP.

Or, if there's a way to do so, I'd like to have the shell script run within the context of iTerm 2 (which does have Screen Recording permissions) instead of the context of the currently focused app.

1

I have had some similar issues. My workaround was to add the Automator created app to:

System Preferences → Security & Privacy → Accessibility

Then running the app, letting the system add the programs it may control to:

System Preferences → Security & Privacy → Automation

This might not at all be what you asked for, but I thought it seemed a bit similar.

Note however, every time I change something in the app, I have to repeat the above steps.

| improve this answer | |
New contributor
Jakob Skov søndergård is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • however, every time I change something in the app, I have to repeat the above steps. – Jakob Skov søndergård 2 days ago

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .