【发布时间】:2018-06-22 14:20:21
【问题描述】:
我现在正在研究一种方法来跟踪屏幕共享是启用还是禁用。到目前为止,我已经尝试了两种方法,使用
检查启动文件是否存在[[ -f /etc/com.apple.screensharing.agent.launchd ]] && echo 'enabled' || echo 'disabled'
我还尝试了一个读取命令,使用以下命令检查禁用变量的布尔值。
sudo defaults read /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
有什么我遗漏的或者我还没有尝试过的方法吗?
任何帮助将不胜感激!
【问题讨论】:
标签: macos terminal macos-high-sierra