SetArchPrefForURL icon indicating copy to clipboard operation
SetArchPrefForURL copied to clipboard

Can't run it with 'sudo'

Open pb-new-username opened this issue 3 years ago • 1 comments

if I run this command with 'sudo', its exit status is 0 but it doesn't enable 'Open with Rosetta' for the specific app.

pb-new-username avatar Aug 17 '22 19:08 pb-new-username

The command applies a per-user setting, so you must run the command as the current user:

#!/bin/bash
consoleuser=$(stat -f%Su /dev/console)
App_List=(
	"Adobe InDesign 2023"
	"Adobe InDesign 2022"
)
	
for App_name in "${App_List[@]}"; do
sudo -u "$consoleuser" "$SetArchPrefForURL_binary" "/Applications/$App_name/$App_name.app" x86_64

done


guillaumegete avatar Apr 14 '23 17:04 guillaumegete