Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

Use arch -i386 macvim

share|improve this answer
It works (it launches the application in 32 bits), but pipelining does not seem to work : echo foo | arch -i386 /Applications/ brings an empty MacVim. – LeMiz Dec 1 '09 at 7:40
After a bit of head-scratching and mulling over a downloaded copy of MacVim, I found the answer -- apparently never reads from stdin, you need to use instead (check the binary= line in mvim) and add the flags "-g -". Try: echo foo | arch -i386 /Applications/ -g - – Gordon Davisson Dec 1 '09 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 '09 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). – Gordon Davisson Dec 2 '09 at 20:32
This works with OSX Lion. – adimitri Dec 5 '11 at 4:53

Use the open command in Terminal instead of exec.

I just tried it with and open takes notice of the 'Open in 32-bit mode` checkbox.

share|improve this answer
yes, but infortunately, open unfortunately doesn't redirect the standard input /error as execdoes – LeMiz Nov 30 '09 at 7:39

If it’s only about MacVim, you can strip the 64-bit code from the binary with ditto.

ditto --arch i386 /Applications/Utilities/ /Applications/Utilities/
exec /Applications/Utilities/

I just tried it and it seems to work. Maybe you can even pipe through ditto, but I have my doubts.

share|improve this answer
I couldn't make it work either: it seems that when you pass the -g option to Vim (exec /Applications/ -g), it forks in 64 bit mode. – LeMiz Dec 1 '09 at 7:53

You must log in to answer this question.

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