How to launch applications in 32 bit from Terminal in Snow Leopard?
Solution 1
Use arch -i386 macvim
Solution 2
Use the open
command in Terminal instead of exec
.
I just tried it with Chess.app and open
takes notice of the 'Open in 32-bit mode` checkbox.
Solution 3
If it’s only about MacVim, you can strip the 64-bit code from the binary with ditto
.
ditto --arch i386 /Applications/Utilities/MacVim.app/Contents/MacOS/MacVim /Applications/Utilities/MacVim.app/Contents/MacOS/MacVim_i386
exec /Applications/Utilities/MacVim.app/Contents/MacOS/MacVim_i386
I just tried it and it seems to work. Maybe you can even pipe through ditto
, but I have my doubts.
Related videos on Youtube
LeMiz
Updated on September 17, 2022Comments
-
LeMiz over 1 year
Like a lot of people, I have some issues with launching my applications in 32 bit mode, because of the far-from-perfect LCC 3.1 driver for my Logitech di novo edge keyboard. Basically, I am not able to use the correct keyboard layout when in 64 bit mode (my layout changes when I switch applications which is very annoying).
So I am forced to launch my applications in 32 bits.
Can I do this from the terminal with an
exec
command? Checking the 'launch application in 32 bit mode' seems to have no effect (but it does work from the gui).Thanks in advance.
EDIT I should have precised I am trying to make the
mvim
script (given in macvim) launch macvim in 32 bit. So solutions based onopen
, although launching the application in 32 bit, are not what I am looking for, because they seem not to correctly handle pipes and argument passing. -
LeMiz over 14 yearsyes, but infortunately,
open
unfortunately doesn't redirect the standard input /error asexec
does -
LeMiz over 14 yearsIt works (it launches the application in 32 bits), but pipelining does not seem to work :
echo foo | arch -i386 /Applications/MacVim.app/Contents/MacOS/MacVim
brings an empty MacVim. -
LeMiz over 14 yearsI couldn't make it work either: it seems that when you pass the -g option to Vim (
exec /Applications/MacVim.app/Contents/MacOS/Vim_i386 -g
), it forks in 64 bit mode. -
Gordon Davisson over 14 yearsAfter a bit of head-scratching and mulling over a downloaded copy of MacVim, I found the answer -- MacVim.app/Contents/MacOS/MacVim apparently never reads from stdin, you need to use MacVim.app/Contents/MacOS/Vim instead (check the binary= line in mvim) and add the flags "-g -". Try:
echo foo | arch -i386 /Applications/MacVim.app/Contents/MacOS/Vim -g -
-
LeMiz over 14 yearsmy macvim screen remains desperately blank, and for some reason that's the 64b version that's being launched...
-
Gordon Davisson over 14 yearsIt looks like the Vim binary (running in 32-bit mode) is launching the MacVim binary (which runs in 64-bit, no matter what Vim was running in). Yeesh. Ok, I'm gonna recommend either Debilski's route (but replacing the original binaries with the stripped version), or just downloading the precompiled MacVim-7_2-stable-1_2 from Google Code (which is compiled 32-bit only).
-
Arshad over 12 yearsThis works with OSX Lion.