0

I am trying to execute the screencapture script remotely to one of my machines via. the Apple Remote Desktop application. The problem is I cannot seem to find the correct app to give Screen Recording permissions to, or I am missing something else.

  1. The command I am trying to execute: screencapture ~/Backup/Screen/test`date +'.%F_%H-%M-%S'`.jpg
  2. I have already enabled permissions for Screen Recording in System Preferences, Privacy, for the screenshot application, /bin/bash, Terminal, and Console.

Running the command locally on Terminal works of course, but I think when using Apple Remote Desktop Send UNIX Command, there is another application in the mix that I need to give permissions to which I cannot seem to figure out.

I got to where I have so far thanks to a great response here, so I think I am really just missing this application that ARD is using to execute the command?

SkRevo
  • 13
  • 1
  • Is the file (the jpg file) being saved? Is it only having black pixels in it? Or does the command return an error? – Luuk Oct 04 '22 at 17:19
  • The files saves, but it's an empty screen (only the menu bar) which is what happens when the Screen Recording permissions are not enabled for the application taking the screenshot (this is how it looked when I was doing it via. Terminal when it didn't have permissions) @Luuk – SkRevo Oct 04 '22 at 18:06
  • Try giving permission to ArdAgent.app. On my system it's here: `/System/Library/CoreServices/RemoteManagement/ARDAgent.app` – TheNextman Oct 04 '22 at 18:38

1 Answers1

0

ARDAgent.app is the relevant application on the remote system.

For example, if you try to run a terminal command against a protected directory (e.g. ~/Desktop) via ARD, you will get "permission denied" unless you give it access under Security & Privacy > Privacy > Files and Folders (or Full Disk Access).

Try giving ARDAgent screen recording permissions. On my macOS 12 system it's here: /System/Library/CoreServices/RemoteManagement/ARDAgent.app

TheNextman
  • 12,428
  • 2
  • 36
  • 75