No matter how easy Linux distributions make it for newcomers to install and use a free, open-source operating system, nearly everyone has at least one program that only works in Windows. Wine, a free Windows compatibility tool for Linux (and other Intel-based systems), aims to make those programs run without too much cross-system trickery. If you can't get around needing to open true Microsoft Office files, Adobe Photoshop, or your addictive game of choice on your Linux desktop, Wine is for you. With Wine's stable 1.0 version just released, it's a good time to check out this quietly awesome app. Let's get a few Windows applications running in Linux.

Linux only: Wine 1.0, the first stable release of the Windows API recreation tool, is available for …
Read more Read more

Wait, before I try this, will X program run okay in Wine?

Good question—luckily, there's probably an answer. The Wine AppDB lists all the programs that run and don't run under Wine, and to what degrees. You'll see rankings ranging from "Platinum" (runs pretty much flawlessly) to "Bronze" (some functions may not work at all, but otherwise runs) to "Garbage" (don't bother). In general, any apps that rely on other Windows apps or functions, or interact with the Windows desktop, won't work as well, if at all. That means Adam's super-useful Texter app doesn't work in Wine, for example.

The big wins for Wine are Microsoft Office viewers (and, in some cases, full applications) up through 2003 versions, Adobe Photoshop CS2, and many games, including World of Warcraft. You can even get iTunes playing and purchasing music, but no iPod syncing (yet). Assuming you've got something you want to try out, let's get started.

Install and configure Wine

Most Linux distributions have Wine available in their repositories, but usually a bit out of date. You can grab an easy-install package or repository instructions at Wine's download site. (Mac users with Intel processors should check out Darwine, which keeps up with the official Wine releases. Here's a guide to setting it up).

Wine usually installs itself, creates a .wine folder in your home directory, and uses that as a pretend "C:/" drive to place your applications and needed files in. If not, enter winecfg into a terminal and it'll do the work and bring up its configuration screen.

Head first to the "Desktop Integration" tab. If you want your Wine/Windows apps to treat the "Desktop" or "My Documents" save locations the same as your Linux desktop or documents folders, change the values to point at the right locations. Head next to "Drives," where a click on "Autodetect" should set up a group of virtual drives for your Wine apps (your home folder becomes "H:" for example, and folders inside your .wine folder become other drives). You can click on "Sound" to see if Wine is picking up your Linux driver well enough. That should be good enough for now—let's install our first app.

All three of Microsoft's major Office creator tools—Word, Excel, and PowerPoint—have free "viewers" that let anyone without a full Office suite open and copy data from Office documents. All three of the 2003 versions happen to run great in Wine, making them pretty helpful to anyone who simply needs to occasionally see or copy from a document or spreadsheet with tricky formatting. Grab a copy of the Word, Excel, or PowerPoint viewers, then open a terminal and change directories (cd to wherever you put the .exe installer file).

Now enter wine whatever.exe (or, in certain systems, right-click on the .exe file and choose to launch with Wine) and you'll get a familiar-looking prompt to install, followed by a license agreement, then a quick installation and goodbye. Head to Wine->Programs in your system menu, or browse to the viewer in your pretend "Program Files" folder (manually or by choosing "Browse C:\ Drive" from the Wine menu).

You should see your viewer program, and it will likely launch with no problems. If you wanted to go further into full Office apps, you can either take your chances with straight-up Wine—where you might see "Platinum" and "Garbage" reports for the same Office version on the same Linux system—or invest in a Crossover product for about $40, which gives near-guaranteed success with Office apps.

You can change which version of Windows Wine attempts to recreate in the "Applications" tab in configuration. Browse and select an app, choose a Windows version in the lower-right, then add any DLLs you might need or graphics settings that need tweaking in the "Libraries" and "Graphics" tabs. Programs like AutoStitch, Foobar2000, and even Windows automation tool AutoHotKey install just fine with no tweaking, but your mileage may vary. If you do run into errors regarding missing DLLs/libraries, try installing the winetricks script, which automatically seeks out commonly missing .dlls for installed programs.

The big caveat of Wine is that there are so many Windows programs out there, and myriad ways they can go wrong on installation or launch. A catch-all installation and troubleshooting method doesn't exist; you're best off looking in the AppDB, Googling your troublesome app with "wine linux" after it, or just tinkering with your Wine settings until you find out what's causing the bug.

Taking Wine further

Once you've gotten started using your apps in Wine, it's time to make them a better fit with your desktop. Here's a few tips and suggestions on making Wine an almost invisible layer in Linux:

Keep Linux file associations: There's probably no need to install a Windows-based PDF reader just because another Wine app wants access to one, so you need to teach Wine to reach for what you've already got available. Check out this wiki entry for details on choosing which apps open which files in your pseudo-Windows environment.

De-uglify the interface: Wine takes an OS-neutral, Java-like approach to drawing buttons, tabs, and other implements on its windows, but wouldn't it be nice if they actually meshed with your Linux desktop? The Tombuntu blog shows you how, from a simple text file copy to more extensive (and memory-eating) tweaks (Original post).

Uninstall programs: Got a bit too much clutter in your Wine menu after a few try-outs? Simply type uninstaller into a terminal, and you'll get a simple click-and-choose interface that activates the familiar Windows uninstaller ("Are you sure you'd like to ...").

If you're looking for more help on customizing and running Wine apps, I'd recommend, in addition to Wine's own wiki, these two sites:

Frank's Corner: A one-man Wine guru, Frank offers up specific hints and tricks on wrangling Office, multimedia, gaming, and other Windows apps. Slightly behind-the-times, but his advice still holds.

Ubuntu's Wine wiki page: For users of the orange-tinted distro, a few handy how-tos and guidance on what can and can't be done with Wine.

Veteran Wine users, what favorite apps have you rescued from other-partition exile? Newcomers, what other resources can you point out for getting more Windows apps running ever-so-smoothly in Linux? Share and share alike in the comments.

Kevin Purdy, associate editor at Lifehacker, waits with bated breath for iTunes to get iPod support in Wine. His weekly feature, Open Sourcery, appears Fridays on Lifehacker.