An Overview of Wine for Linux

Posted by: Rea Maor In: Linux and Unix - Saturday, August 9th, 2008

Wine is not an easy subject in the Linux community. To start with, it’s obviously an emulator. If DOSBox is a DOS emulator and ZSNES is a Super Nintendo emulator, then Wine is a Windows emulator. Except that Wine is an acronym which, you will be corrected, stands for “Wine Is Not an Emulator”. Oh, so it’s a simulator, or virtualator, or masturbator, or whatever-you-call-the-damn-thing.

I say it’s an emulator. It creates a virtual Windows environment on a non-Windows operating system, for the purpose of running Windows-specific programs. And once you’ve overcome the first barrier in knowing what it is, you have plenty of hurdles left.

Starcraft – Famous for running perfectly on Wine.

Bottom line: Wine is a mixed bag, depending on the game or application you’re running. When it works, it is sheer Heaven. When it fails, it will cause some of the most spectacular crashes you have ever witnessed on a Linux desktop. Be prepared for the eventual ordeal where you have to remember how to navigate your way blind around a screen that’s stopped showing video, or how to press Ctrl-Alt-backspace to reboot the X desktop environment, or even Ctrl-Alt-F2 to a console where you run “ps aux” to find out the process number of the program so you can “kill -9” it.

Let’s try to remember not to be too impatient with the Wine developers. After all, it isn’t like Microsoft is jumping all over itself, eager to help the open source community run native Windows programs on a non-Windows system. Many game manufacturers turn a blind eye to open source systems, though this situation is improving.

Incredible Machine - Even More Contraptions
“The Incredible Machine – Even More Contraptions” runs like a top!

Basically the process for getting a Windows program going on Linux will work like this:

  • First, head over to the Application Database at Wine HQ and go to the search box in the side bar and type in the name of the program you intend to run. Read everything you find. You will usually at least find out whether anybody has ever had any luck with the program, and what trouble-shooting steps you can take to fix problems if they come up.
  • Mount the CD with the Windows application to /mnt/cdrom, either by command line or however your system does it.
  • Run the installer from the CD-Rom with Wine, usually with a command such as “wine /mnt/cdrom/setup.exe” With luck, a virtual Wine desktop will fire up and run the installer.
  • If the install program finishes successfully, you might need to simulate a Windows reboot.
  • Start wine again with the name of the executable installed program. For instance, to run the *very* old game “SimTown“, you go “wine ./.wine/drive_c/SimTown/SIMTOWN.EXE”.
  • Use to your heart’s content!

Never heard of SimTown? You’re not missing much.

Now for some Wine-related concepts:

The “home” directory for Wine is the folder “.wine” in your home directory on Linux, within which is a “drive_c” which will function as your virtual drive “C:\”. At least, no matter how much you hose something up, it will be contained to your virtual C:\ drive, gracefully letting you off the hook from the consequences of viruses. This is often the subject of smug write-ups. Indeed, getting good at virus-handling on a Windows emulator could prove to be a handy skill in anti-virus work.

Wine’s configuration dialog.

Just as on Windows XP where you sometimes have to set “compatibility mode” for legacy program support, Wine has a setup to tweak settings as well. Typing (or picking from the menu if it’s there) “winecfg” will get you this handy dialog, where you can set such things as which version of Windows to emulate, how to handle graphics, and what to do about sound drivers. Hopefully, your system will already have things like drivers set up for Wine, because it is a puzzle to figure out, especially if you have a system that does weird things with GTK+ and Alsa.

wine regedit
Edit the registry, just like the good old days!

Another program you’ll need to be familiar with is the regedit. Start it with “wine regedit” (or menu if you have one in KDE/Gnome) and then… edit the registry as needed using the same skills you used in Windows. You should only have to do this on an as-needed basis.

You’re almost always better off running Wine on KDE or Gnome – these integrate better with Wine and in most cases wine will even install the program in your menu, so you can call it just like in Windows!

You are advised to have the biggest, baddest hardware you can find. There’s usually a performance hit with emulating a top gaming title in a window. At the least, you’ll need an OpenGL graphics card on which to emulate DirectX. This isn’t as much of a concern with older games.

Later, we will explore more about emulation, including a user-friendly front-end to Wine.

Related Posts:

Leave a Reply