简体   繁体   English

从 Apple 远程桌面执行截屏 UNIX 命令时遇到问题

[英]Trouble executing screencapture UNIX command from Apple Remote Desktop

I am trying to execute the screencapture script remotely to one of my machines via.我正在尝试通过远程执行屏幕截图脚本到我的一台机器。 the Apple Remote Desktop application. Apple 远程桌面应用程序。 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我要执行的命令: 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.我已经在系统偏好设置、隐私、屏幕截图应用程序、 /bin/bash 、终端和控制台中启用了屏幕录制权限

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.在终端上本地运行命令当然有效,但我认为在使用 Apple Remote Desktop Send UNIX 命令时,混合中还有另一个应用程序需要授予我似乎无法弄清楚的权限。

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?多亏了这里的热烈回应,我到达了到目前为止的位置,所以我想我真的只是错过了 ARD 用来执行命令的应用程序?

ARDAgent.app is the relevant application on the remote system. ARDAgent.app是远程系统上的相关应用程序。

For example, if you try to run a terminal command against a protected directory (eg ~/Desktop) via ARD, you will get "permission denied" unless you give it access under Security & Privacy > Privacy > Files and Folders (or Full Disk Access).例如,如果您尝试通过 ARD 对受保护的目录(例如 ~/Desktop)运行终端命令,您将获得“权限被拒绝”,除非您在安全和隐私 > 隐私 > 文件和文件夹(或完整磁盘)下授予它访问权限使用权)。

Try giving ARDAgent screen recording permissions.尝试授予 ARDAgent 屏幕录制权限。 On my macOS 12 system it's here: /System/Library/CoreServices/RemoteManagement/ARDAgent.app在我的 macOS 12 系统上,它位于:/System/Library/CoreServices/RemoteManagement/ARDAgent.app

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM