Running Windows programs on Linux with Wine

Tell Me Your Name

By default, Wine stores any Windows programs that think they are installing on drive C: in a hidden subdirectory below your home directory. To display the hidden files, select View | Show Hidden Files in Konqueror or Dolphin. Change directory to .wine in your home directory. One level below this, you will see a drive_c subdirectory, and below this Program Files and Windows. The former contains the application you just installed. For WinRAR, you click on WinRAR.exe in the WinRAR folder. On openSUSE, you also must type wine.

Directory Jungle

Unlike Windows, Linux does not use drive letters, so Wine must use a workaround: Each drive letter maps to a Linux directory. Although a Windows program running on Wine thinks it is storing data on drive C:, it is writing to a subdirectory called .wine/drive_c below the home directory. The Wine control center shows which letter maps to which directory. In a quick launcher (Alt+F2) type winecfg, then visit the Drives tab (Figure 7). The list at the top shows you which drive letter maps to which Linux directory. Normally, C: maps to .wine/drive_c, and Z: lets the Windows application access the whole directory tree because it maps to the root directory. Here, you can Add mappings by defining new virtual drive letters and typing the Path the letter should point to.

Figure 7: The Drives tab lets you map Linux directories to drive letters.

Dead as a Dodo

If a Windows program fails to launch when you click it, some manual attention might make it see reason. Start by opening a terminal window. On Kubuntu, select System | Konsole in the start menu; if you have openSUSE, select the System | Terminals | Konsole item in the menu. Then type

cd directory

where directory represents the full path to your installation program. If the setup.exe file is on a DVD, you can access the DVD via the /media/ path. The command line looks like this:

cd /media/DVD_name

Replace DVD_name with the entry in your media directory, and then climb down the directory tree until you find the directory with the .exe file you need (in WinRAR's case, this is /programs/other/winrar). When you get there, type

wine file

replacing file with the name of the application you want to run, say, setup.exe. Make sure you stick to the exact spelling, remembering that upper- and lowercase letters are vital. To tell Wine to run the Windows program, press Enter again. If you experience difficulty launching the program, check the terminal window for error messages – you should not close the terminal window or you will terminate the Windows program running in it. If the Windows program crashes, you can try relaunching it.

VistaXP 98

Some Windows programs require the characteristics of a specific version of Windows. The Applications tab can help you cater to this. For each application, you can individually define the Windows version that Wine should emulate. To do so, click Add application and look for the executable for your application (in .wine/drive_c).

Now click Open, select the application in the list, and then select the required version of Windows in the Windows Version drop-down list. The configuration in Default Settings is valid for all Windows applications, unless you define an exception.

Apps Gone Bad

The Wine MIT license gives users many privileges, a fact that has helped TransGaming generate huge profits. TransGaming just grabbed the package, added DirectX capabilities, which are required for gaming, and started to sell the results as Cedega [3] (formerly WineX). The Wine developers were unhappy about this, and thus changed the licensing terms to the LGPL in March 2002. The LGPL ensures that you can continue to use Wine for commercial purposes, but that changes and additions must be given back to the project. CodeWeavers is exemplary in this respect; the company bundled Wine with its own commercial components to create the CrossOver [4] package, while actively promoting the ongoing development of Wine.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Windows apps with Wine

    If you need to make a Windows application run on Linux, there is no better way than Wine. We investigated the free and commercial Wine variants to see how they bear up under real-life conditions.

  • Gaming with Wine

    Although Linux has made great strides in gaming, users sometimes miss the games that are only available on Windows. Linux provides a way to solve this problem with Wine, the Windows "not an emulator."

  • Wine

    The Wine compatibility layer lets Linux users run Windows programs. Unfortunately, configuring Wine is anything but trivial, and it helps if you enjoy experimenting.

  • A Smoother Wine 1.1.24

    Wine 1.1.24 has smoothed out rough edges and now functions with various Windows games while Linux applications run better.

  • Tutorials – Wine

    Convert your home/office/friends to be completely Microsoft-free with our tips and tricks.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News