Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run it with 'sudo' #1

Open
pb-new-username opened this issue Aug 17, 2022 · 1 comment
Open

Can't run it with 'sudo' #1

pb-new-username opened this issue Aug 17, 2022 · 1 comment

Comments

@pb-new-username
Copy link

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

@guillaumegete
Copy link

guillaumegete commented Apr 14, 2023

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants