Re:Run x86 Apps (including homebrew) in the Terminal on Appl...
by api on Wednesday November 18, 2020 @08:36AM
(#25136522)
Would be easy to make iTerm2 launch arch -x86_64 <shell>
Re:Run x86 Apps (including homebrew) in the Terminal on Appl...
by jen20 on Wednesday November 18, 2020 @10:16AM
(#25137643)
I haven't tried this (don't have an M1 to hand!) but:
iterm2 -> Preferences -> Profiles -> General
Change the "Login Shell" drop down to "Command" and then enter `arch -x86_64 /usr/local/bin/zsh` or whatever your shell is.
Re:Run x86 Apps (including homebrew) in the Terminal on Appl...
by 1f60c on Wednesday November 18, 2020 @10:38AM
(#25137942)
Would `arch -x86_64 $SHELL` work?
Re:Run x86 Apps (including homebrew) in the Terminal on Appl...
by dormento on Wednesday November 18, 2020 @12:21PM
(#25139486)
In theory yes, since it inherits the shell env from the parent.
Haven't got the $$$ to test though.
EDIT: you could also craft an oneliner if $SHELL is not defined, something like:
`ps -T $$ | awk 'NR==2{print $NF}' | arch -x86_64 $0`
The "arch" utility is your escape hatch to switch the preferred arch for the spawned process and all of its children.