Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [488]

By Root 1086 0
and c:\Program Files. We discuss each of these in more detail as we go on.

* * *

Warning


Never run Wine as root. Programs run with Wine have access only to parts of the underlying operating system that the user running it has. Running as root can lead to security problems and even corrupt your Linux installation. The default configuration maps a virtual Windows drive to the root of the Linux filesystem, so running a Windows application as root would give it the access possible to modify or delete any file on your system.

* * *

Configuring Wine

Wine configuration generally involves a couple of graphical tools, but you can also use a regular text editor if you prefer. At the core of Wine's configuration lies the Wine registry. Because Windows applications require a registry to store settings, Wine was forced to implement a completely compatible system. For many years Wine also maintained a separate configuration file (the venerable config file.) Having two different configuration mechanisms made no sense, so Wine abandoned its custom mechanism to move its settings directly into the registry. Now you can configure both applications and Wine with one set of tools.

Wine comes with two different tools for configuration: winecfg and regedit. The first lets you easily control common settings. The second will let you control more obscure settings as well as the settings for your applications. Both tools access the registry files stored in ~/.wine. Unlike Windows, these registry files are stored in a plain-text format. You can always fire up your favorite text editor and change the keys manually.

Run winecfg from the command line to start the program. The first thing you'll notice along the top are a series of tabs to configure applications, libraries, graphics, appearance, drives, and audio. The Applications, Libraries, and Graphics tabs are linked together to allow you to control settings for an individual program. For instance, on the Applications tab you'll notice you can change the Windows version that Wine reports to the program. The default attempts to emulate Windows 2000. You may find that a program responds differently if the Windows version is, say, Windows 98 versus Windows XP. If you happen to know the program explicitly requires Windows 2000, you can use the Add application button to locate your program's executable. Then you can change the Windows Version setting just for that program while leaving the Default Settings as they are. Likewise, all of the settings within the Libraries and Graphics tabs affect the application (or Default Settings) selected within the Applications tab.

The Libraries tab allows you to change the behavior of individual libraries. Wine can optionally use native Windows libraries if you have them available. For instance, if you have a Windows partition on your computer, you can copy the DLLs from C:\WINDOWS\SYSTEM to the corresponding directory within your virtual Windows drive.

To utilize one of those libraries, type the name of the library in the text box under "New override for library." For instance, if you copied FOO.DLL from Windows, enter foo in the text box and click on the Add button. By default, Wine tries to load the native Windows version followed by the built-in Wine version. You can change that load order to native only, built-in only, or either search combination using the Edit button. Using native Windows libraries can often work around deficiencies within Wine. But keep in mind that you can never replace the core Wine DLLs kernel32, ntdll, user32, or gdi32.

Games are the most common reason for changing settings within the Graphics tab. You may find that changing the color depth will enable a game to run better. If you have the XRandR extension available within your X server (and most systems do these days), Wine will attempt to resize your screen if requested by an application. That behavior may not be desirable, though. Therefore, Wine can "Emulate a virtual desktop" of a size of your choosing. The virtual desktop will run an application within

Return Main Page Previous Page Next Page

®Online Book Reader