How to run a Windows application from Terminal

Running a windows app from terminal in Mac is more complicated than on Linux because a series of environment variables must be passed to the terminal before the app can be successfully launched. For this reason, CrossOver's has an "Open Shell" button, which you can learn more about here.

After selecting the appropriate bottle containing your applications, right clicking ( Ctrl+ click ) on the Bottle, then holding down the 'Option' key will switch 'Run Command' to "Open Shell". Click on 'Open Shell' will open a terminal that automatically sets the necessary environment variables, including a directory change into the "drive_c" of that bottle.

From here, you can run windows apps with the following command:

wine --cx-app executable.exe

Whereas executable.exe is the name of the .exe file that launches the program. Thus, if you're in an Office 2007 bottle and you want to launch Word from terminal, you'd use

wine --cx-app winword.exe

Next Step: How to mount the Windows partition of a hybrid Windows/Mac DVD

Last modified on 2024-01-15 20:00:44 UTC by Andrew Balfour