1

I exported the following line of AppleScript code into an macOS application via the "Script Editor":

do shell script "open '/Applications/Google Chrome.app'  --args --proxy-server=socks5://127.0.0.1:1080"

Then, inside the application bundle, I replaced the file Contents/MacOS/applet with a bash script file.

(I'm not familar with AppleScript, and want to modify the script directly without using the "Script Editor".)

The shell-script-based application has been working fine for years under Intel-based Macs.

However, when launching it under my new M2 Max MacBook Pro, macOS shows a window saying:

To open "xxxx", you need to install Rosetta. Do you want to install it now? Rosetta enables Intel-based features to run on Apple silicon Macs. Reopening applications after installation is required to start using Rosetta.

Why does macOS treat plain-text script as "Intel-based features" and insist on running it using Rosetta?

How can I run the bash script Application bundle on ARM-based Macs without Rosetta?

Thank you.

1
  • "applet" must be a Mach-O executable, not a plain-text bash script Commented Mar 14, 2023 at 19:30

2 Answers 2

1

How can I run the bash script Application bundle on ARM-based Macs without Rosetta?

Install the Apple silicon (ARM) version (Chrome).

The error message telling you that you need Rosetta indicates you’re using the version compiled for Intel CPUs and that Rosetta is required. To not require Rosetta, you must install the version of software that was compiled for Apple silicon or ARM CPUs.

2
  • The executable file is a plain-text bash script. It is NOT Intel binary.
    – Simon L
    Commented Mar 14, 2023 at 19:21
  • The executable would be Chrome
    – Allan
    Commented Mar 14, 2023 at 19:27
0

The shell-script-based application has been working fine for years under Intel-based Macs.

There is a 'compiled AppleScript' in the Resources sub-folder, and it may be that which is triggering the call for Rosetta.

You need to re-save the AppleScript app from Script Editor on your ARM Mac, to get an Apple Silicon executable.

Incidentally, you may prefer to use Automator, where you can create a Run Shell Script action and save it as an application.

4
  • Re-exported the script to an Application bundle under Apple silicon Mac. After the main executable is replaced with a script file, the "Rosetta" prompt appears.
    – Simon L
    Commented Mar 14, 2023 at 19:08
  • @SimonL In which case, try the Automator method I mentioned. TBH, I wouldn't baulk at having Rosetta installed, anyway.
    – benwiggy
    Commented Mar 14, 2023 at 19:46
  • I'm not sure whether the use of Rosetta will result in the x64 version of the Chrome binary being executed in the emulator. I want Chrome (arm64) to run natively.
    – Simon L
    Commented Mar 15, 2023 at 6:29
  • @SimonL MacOS will run the ARM fork of any app, even if Rosetta is installed, unless you specifically set the checkbox in Get Info to run Intel. I have Rosetta installed and loads of Universal Binary applications, and they all run ARM. I don't have Chrome, because I value RAM and privacy, obviously. ;-)
    – benwiggy
    Commented Mar 15, 2023 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .