DavidBaumgold.com

Create

Work

Play

How to Install Wine on Mac OS X

Ever wanted to run Windows programs on your Mac? Now, with Leopard's Boot Camp, you can reboot into Windows, and with Parallels and VMware Fusion, you can even run Mac and Windows side by side.

But what if you're a starving college student, and can't afford all those programs? What if you don't want to support Microsoft by buying a license for Microsoft Windows? Thanks to open source programmers, there is a solution: Wine. Wine allows you to run many Windows programs for free, legally, on your computer, even if Microsoft Windows is not installed! Setting up Wine requires some mucking around with the command line, but if you're not afraid to work with commands instead of a graphical interface, it's well worth the effort!

Requirements

You will also need to know how to execute commands on the command line. If you do not, I suggest skimming over my command line tutorial, or at least looking at the basic commands section.

Installing Wine

In order to install Wine, we are actually going to install a different program, called MacPorts. MacPorts is simple to install, and it will make the otherwise-complicated process of installing Wine much easier. It will also help you keep Wine up to date.

Installing MacPorts

On the MacPorts website, go to the Download and Installation page and download the appropriate "dmg" disk image for your computer. Double-click the file you downloaded, and double-click the .pkg file to run the installer. You're almost done!

Now, open up the Terminal and run this command:

$ echo export PATH=\$PATH:/opt/local/bin:/opt/local/sbin$'\n'export MANPATH=\$MANPATH:/opt/local/man | sudo tee -a /etc/profile

The Terminal will ask for your password: this is the password to the Admin account on your computer. If you ran the command correctly, the Terminal should respond with:

export PATH=$PATH:/opt/local/bin:/opt/local/sbin
export MANPATH=$MANPATH:/opt/local/man

Close the Terminal. Now you're done!

There are two ways to use MacPorts: either through the Porticus program, or though the Terminal. However, in order to use Wine, you will have to use the Terminal: there is no other option. Therefore, you're better off just learning how to use the Terminal.

Installing Wine

Now that we've installed MacPorts, let's install Wine! If you're using the Terminal, copy-paste this command:

$ sudo port install wine

If you are using Porticus, download, install, and run the program. Go to the "All Ports" section, and search for "wine". Select it, and press the "Install" button.

In either case, you will be asked for your password. Again, this is the password to the Admin account on your computer. The Terminal will start spewing out lots of information: this is absolutely normal. This flow of information will be your guide to let you know whether or not the computer is still working. It will take a while for the install to finish: at least half an hour. As long as the Terminal keeps spewing out information, don't interrupt it. Feel free to leave and do something else while the computer is installing Wine. When the Terminal stops giving you more information and is ready for another command, Wine is installed and ready to go!

Updating Wine

New versions of Wine come out every so often. Newer versions fix problems and make the program run faster and with less chance of crashing. To make sure your version of Wine is up to date, run this command:

$ sudo port selfupdate && sudo port upgrade outdated

MacPorts will check for updates for all of your command line programs, including Wine. If it finds any updates, it will automatically install them for you.

Installing Programs

To install a Windows program, first download the installer file: it should end with .exe. Remember the location you put it, and open up the Terminal again. cd to the location, and use ls to make sure you can see the installer file. Once you are in the correct directory, all you have to do to run the installer is enter this in the Terminal:

wine <installer>.exe

Where <installer> is the name of the installer file. More Terminal information will pop up, and soon, you'll see a graphical Windows installer. Click through it, and you're done!

Running Programs

Open up the Terminal and type this to go to your Program Files folder in Wine:

cd ~/.wine/drive_c/Program\ Files/

Pick a program, and enter it's folder using the cd command. (If the folder has a space in it, you must type a \ before the space. For example, Program\ Files. If you're having problems, try using tab autocomplete.) There should be a file that ends in .exe: this is what you must run to run the program. Type this into Terminal:

wine <program>.exe

Where <program> is the name of the .exe file. A little more Terminal information, and the program will pop up, ready to use! It will probably open fullscreen: to reduce it in size, go to Window -> Zoom Window, and then you can resize it normally. Enjoy using Windows on your Mac, freely and legally!