4

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 mvimscript (given in macvim) launch macvim in 32 bit. So solutions based on open, 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.

3 Answers 3

6

Use arch -i386 macvim

5
  • It 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
    Dec 1, 2009 at 7:40
  • After 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 - Dec 1, 2009 at 21:37
  • my macvim screen remains desperately blank, and for some reason that's the 64b version that's being launched...
    – LeMiz
    Dec 2, 2009 at 7:53
  • It 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). Dec 2, 2009 at 20:32
  • This works with OSX Lion.
    – adimitri
    Dec 5, 2011 at 4:53
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.

1
  • yes, but infortunately, open unfortunately doesn't redirect the standard input /error as execdoes
    – LeMiz
    Nov 30, 2009 at 7:39
2

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.

1
  • I 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.
    – LeMiz
    Dec 1, 2009 at 7:53

You must log in to answer this question.

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