Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

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/MacVim.app/Contents/MacOS/MacVim 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 -- 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 - –  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
add comment

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.

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
add comment

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.

share|improve this answer
    
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 '09 at 7:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.