Index: chapter.xml =================================================================== --- chapter.xml +++ chapter.xml @@ -0,0 +1,441 @@ + + + Configuring WINE Installation + + With an understanding of what WINE is and how it works at a high + level, the next step to effectively using it on your &os; + system is becoming familiar with its configuration. The following + sections will describe the key concept of the WINE + prefix, and illustrate how it's used to control the + behavior of applications run through WINE. + + + WINE Prefixes + + A WINE prefix is a directory, usually + located beneath the default location of $HOME/.wine though it + can be located elsewhere. The prefix is a set of configurations + and support files used by the the + wine to configure and run + the &os.windows; environment a given application needs. By + default, a brand new WINE installation will create the following + structure when first launched by a user: + + + + .update-timestamp: This file contains + the last modified date of the + file /usr/share/wine/wine.inf. It's used + by WINE to determine if a prefix is out of date, and automatically + update it if needed. + + + + dosdevices/: This directory contains + information on mappings of &os.windows; resources to resources + on the host &os; system. For example, after a new WINE installation, + this should contain at least two entries which enable access to the + &os; filesystem using &os.windows;-style drive letters: + + + + c:@: A link to the + drive_c directory described below. + + + + z:@: A link to the root directory of + the system. + + + + + + drive_c/: This directory emulates the + main (i.e. "C:") drive of a &os.windows; + system. It contains a directory structure and associated + files mirroring that of standard &os.windows; systems. A + fresh WINE prefix will contain &os.windows; 10 + directories such as Users and the + Windows directory that holds the OS + itself. Furthermore, applications installed within a prefix + will be located in either the Program + Files or Program Files (x86) + directories, depending on their architecture. + + + + system.reg: This Registry file contains information on the + &os.windows; installation, which in the case of WINE is + the environment in the drive_c directory. + + + + user.reg: This Registry file contains the current user's + personal configurations, made either by varous software or + through the use of the Registry Editor. + + + + userdef.reg: This Registry file is a default set of + configurations for newly-created users. + + + + + + Creating and Using WINE Prefixes + + While WINE will create a default prefix in the user's + $HOME/.wine/ directory, it's possible to set up multiple + prefixes. There are a few reasons to do this: + + + + The most common reason is to emulate different versions of + &os.windows;, according to the compatibility needs of + the software in question. + + + + In addition, it's common to encounter software that doesn't + work correctly in the default environment, and requires + special configuration. It's useful to isolate these in their + own, custom prefixes, so the changes don't impact other + applications. + + + + Similarly, copying the default or "main" prefix + into a separate "testing" one in order to evaluate + an application's compatibilty can reduce the chance of + corruption. + + + + Creating a prefix from the terminal requires the following + command: + + &prompt;WINEPREFIX="/home/username/.wine-new" winecfg + + This will run the winecfg + program, which can be used to configure wine prefixes (more on + this in a later section). But by providing a directory path + value for the WINEPREFIX environment + variable, a new prefix is created at that location if one + doesn't already exist. + + Supplying the same variable to the + wine program will + similarly cause the selected program to be run with the + specified prefix: + + &prompt;WINEPREFIX="/home/username/.wine-new" wine program.exe + + + + + Configuring WINE Prefixes with winecfg + + As described above WINE includes a tool called + winecfg to configure + prefixes from within a GUI. It contains a variety of functions, + which are detailed in the sections below. When + winecfg is run from + within a prefix, or provided the location of a prefix within the + WINEPREFIX variable, it enables the + configuration of the selected prefix as described in the below + sections. + + Selections made on the Applications tab + will affect the scope of changes made in the + Libraries and + Graphics tabs, which will be limited to + the application selected. See the section on + Using + Winecfg in the WINE Wiki for more details. + + + Applications + + + + + + + + + + The Applications contains controls + enabling the association of programs with a particular version + of &os.windows;. On first start-up the + Application settings section will contain + a single entry: Default Settings. This + corresponds to all the default configurations of the prefix, + which (as the disabled Remove application + button implies) cannot be deleted. + + But additional applications can be added with the following + process: + + + + Click the Add application button. + + + + Use the provided dialog to select the desired program's + executable. + + + + Select the version of &os.windows; to be used with the + selected program. + + + + + + Libraries + + + + + + + + + + WINE provides a set of open source library files as part of + its distribution that provide the same functions as their + &os.windows; counterparts. However, as noted earlier in + this chapter, the WINE project is always trying to keep pace + with new updates to these libraries. As a result, the versions + that ship with WINE may be missing functionality that the + latest &os.windows; programs are expecting. + + However, <application>winecfg</application> makes + it possible specify overrides for the built-in libraries, + particularly there is a version of &os.windows; available + on the same machine as the host &os; installation. For + each library to be overriden, do the following: + + + + Open the New override for library + drop-down and select the library to be replaced. + + + + Click the Add button. + + + + The new override will appear in the Existing + overrides list, notice the native, + builtin designation in parentheses. + + + + Click to select the library. + + + + Click the Edit button. + + + + Use the provided dialog to select a corresponding library + to be used in place of the built-in one. + + + + Be sure to select a file that is truly the corresponding + version of the built-in one, otherwise there may be unexpected + behavior. + + + + Graphics + + + + + + + + + + The Graphics tab provides some options to + make the windows of programs run via WINE operate smoothly with + &os; + + + + Automatic mouse capture when windows are full-screen + + + + Allowing the &os; window manager to decorate the + windows, such as their title bars, for programs running + via WINE. + + + + Allowing the window manager to control windows for + programs running via WINE, such as running resizing + functions on them. + + + + Create an emulated virtual desktop, within which all WINE + programs will run. If this item is selected, the size of + the virtual desktop can be specified using the + Desktop size input boxes. + + + + Setting the screen resolution for programs running via + WINE. + + + + + + Desktop Integration + + + + + + + + + + + This tab allows configuration of the following items: + + + + + The theme and related visual settings to be used for + programs running via WINE. + + + + Whether the WINE sub-system should manage MIME types (used + to determine which application opens a particular file + type) internally. + + + + Mappings of directories in the host &os; system to + useful folders within the &os.windows; environment. To + change an existing association, select the desired item + and click Browse, then use the + provided dialog to select a directory. + + + + + + Drives + + + + + + + + + + The Drives tab allows linking of + directories in the host &os; system to drive letters in + the &os.windows; environment. The default values in this + tab should look familiar, as they're displaying the contents + of dosdevices/ directory in the current WINE prefix. Changes + made via this dialog will reflect in the + dosdevices/ directory, and properly- + formatted links created in that directory will display in + this tab. + + To create a new entry, such as for a CD-ROM (mounted at + /mnt/cdrom), take the following steps: + + + + Click the Add button. + + + + In the provided dialog, choose a free drive letter. + + + + Click OK. + + + + Fill in the Path input box by either + typing the path to the resource, or click + Browse and use the provided dialog + to select it. + + + + By default WINE will autodetect the type of resource linked, + but this can be manually overridden. See + the + section in the WINE Wiki for more detail on advanced + options. + + + + Audio + + + + + + + + + + This tab contains some configurable options for routing sound + from &os.windows; programs to the native &os; sound + system, including: + + + + <>para>Driver selection + + + + Default device selection + + + + Sound test + + + + + + About + + + + + + + + + + The final tab contains information on the WINE project, + including a link to the website. It also allows entry of + (entirely optional) user information, although this is not + sent anywhere as it is in other operating systems. + + + +