mirror of
https://github.com/cirruslabs/macos-image-templates.git
synced 2026-09-30 03:42:04 +02:00
Fix base image automation microphone permissions (#367)
This commit is contained in:
@@ -13,7 +13,10 @@ source ~/.zprofile
|
||||
set -euo pipefail
|
||||
|
||||
update_tcc_database() {
|
||||
sudo sqlite3 "$1" <<-'EOF'
|
||||
local tart_guest_agent_path
|
||||
tart_guest_agent_path="$(realpath /opt/homebrew/bin/tart-guest-agent)"
|
||||
|
||||
sudo sqlite3 "$1" <<-EOF
|
||||
INSERT OR REPLACE
|
||||
INTO access (
|
||||
service,
|
||||
@@ -40,11 +43,13 @@ update_tcc_database() {
|
||||
-- Direct Python invocation
|
||||
('kTCCServiceAccessibility', 0, 'org.python.python', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServiceScreenCapture', 0, 'org.python.python', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServiceMicrophone', 0, 'org.python.python', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServicePostEvent', 0, 'org.python.python', 2, 0, 1, NULL, 'UNUSED'),
|
||||
-- Commands invoked through the Tart Guest Agent
|
||||
('kTCCServiceAccessibility', 1, '/opt/homebrew/bin/tart-guest-agent', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServiceScreenCapture', 1, '/opt/homebrew/bin/tart-guest-agent', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServicePostEvent', 1, '/opt/homebrew/bin/tart-guest-agent', 2, 0, 1, NULL, 'UNUSED');
|
||||
('kTCCServiceAccessibility', 1, '${tart_guest_agent_path}', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServiceScreenCapture', 1, '${tart_guest_agent_path}', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServiceMicrophone', 1, '${tart_guest_agent_path}', 2, 0, 1, NULL, 'UNUSED'),
|
||||
('kTCCServicePostEvent', 1, '${tart_guest_agent_path}', 2, 0, 1, NULL, 'UNUSED');
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user