Filling with Wine. Installing Wine After starting, fixme messages are displayed in the console

Filling with Wine

Added installation and filling instructions
Let's start filling our wine, which is not yet experienced in terms of omnivorousness. That is, we will install applications without which not a single self-respecting game will launch. For example, DirectX, Visual C++, MS.NET, PhysX, Windows Media Player, in general, I will list everything that is needed (or maybe not needed!?)
Open " Applications->Wine->Winetricks"(further we put dots in the windows as shown):

Click OK, the following window appears:


Click OK again, a window opens with a choice of components and DLLs to install, check the boxes that I indicated:
d3dx9, d3dx9_26, d3dx9_28, d3dx9_31, d3dx9_35, d3dx9_36, d3dx9_42, d3dx10, d3dx11_42, d3dx11_43, d3dxof, devenum, dinput8, dirac, directmusic, directplay, directx9, dmsynth, do tnet11, dotnet20, dotnet30, dxdiagn, gecko110, gecko120, gfw, mfc40, mfc42, msasn1, msxml6, physx, quartz, vcrun2003, vcrun2005, vcrun2008, vcrun6, vcrun6sp6, wmp10, wsh56vb, wsh57, xact, xact_jun2010, xinput, adobeair.
OK. Be patient, wait until it's all installed, sometimes you will need to confirm the license agreement, so don't go too far :)
It would be better, I would recommend that you install not everything at once, but two or three components at a time - in this case, if some kind of failure occurs (God forbid), you will at least know on which component it happened.

For extreme sports enthusiasts and the especially lazy, there is another way:

!!!I advise you, before you start experimenting with games, to create backup copy folders.Wine: " Go->Home folder->Ctrl+H" and copy the entire .Wine folder to another location. It does not weigh much (about 1GB), with the installed components, and if your working .Wine crashes, you can replace it!!!

Recently Wine has changed for the better, Mono has been improved and now it works well.

I hope you will install Wine x64 without instructions, via Add or Remove Programs.

Wine transition from 64 to 32

rm -fr ~/.wine env WINEARCH=win32 wineboot

After installation, you need to find the Wine Settings icon in the application or run the command in the console

Wine will offer to install the Mono package - we agree (OK), after the Gecko x64 and Gecko x32 package - we agree (OK), the Wine settings window will open, you can close it - it is not needed yet. You can configure everything through the graphical interface, but it takes a long time and if there is a failure, you won’t understand where it happened. Let's install via the console (terminal).
Let's install the fonts.

Winetricks corefonts

The first long one command (copied, pasted into the console, press Enter). It will download the necessary libraries, installers will appear, we agree to the license agreements and install. If a failure occurs (error mfc40) or the installation freezes, press Ctrl+C in the console (stop the process) and run this command again. Everything should be installed (checked). The speed of installation depends on your Internet connection speed.

Winetricks directx9 d3dx9 d3dx9_26 d3dx9_28 d3dx9_31 d3dx9_35 d3dx9_36 d3dx9_42 d3dx9_43 d3dx10 d3dx10_43 d3dx11_42 d3dx11_43 d3dxof devenum dinput8 dinput dirac directmusic direct play dmsynth dsound

Second team

winetricks dxdiagn gdiplus gfw mfc40 mfc42 msxml6 quartz

Third

winetricks vb5run vb6run vcrun2005 vcrun2008 vcrun2010 vcrun2012 vcrun2013 vcrun2015 vcrun6 vcrun6sp6

Fourth

winetricks wsh57 wsh56vb xact xact_jun2010 xinput

Next, select change settings and set

ddr=opengl fontfix glsl=enabled multisampling=enabled mwo=enabled nocrashdialog orm=fbo psm=0 psm=1 psm=2 psm=3 rtlm=auto strictdrawordering=desabled videomemorysize= (mark the value according to the memory of your video card, if there is more video memory than 2048, then mark it and then correct it in the registry) vsm=0 vsm=1 vsm=2 vsm=3

Choose to run winecfg

Set the Wine version (from the drop-down list) to Windows-7 or higher.
On the tab - Libraries - in the existing values, look for - dinput - select and click.
Change, in the drop-down menu set - built-in, then third-party, repeat the action and with -dinput8- eliminates mouse problems in games.

If you have problems with sound, you can change the parameter - dsound - to built-in.

Profix wine

WINEARCH=win32 WINEPREFIX=~/prefix_name winecfg
WINEPREFIX=~/prefix_name C:/path/to/program

It turned out that not all the subtleties are there. Therefore, I wrote this post as an addition to that.

This post is mostly a free translation of. documentation, as well as several of our own and others’ tricks when working with Vine.
Most likely, this post will be of interest to beginners and ordinary GNU\Linux users. Nevertheless, good advice from experts will not be superfluous.

I think there is no point in explaining what a vine is. I just want to show you a few tricks when working with it.

Prefixes
With their help, you can install applications exactly where you want to install them, and not in the default.wine. Even if something goes wrong, it is enough to delete the prefix in which the error occurred, while all other applications\prefixes (assuming they are configured) will not be affected.

That is, each prefix you create can be considered a separate wine - it is independent of other prefixes. Or, for even greater simplicity, treat each created prefix as a separate installation of Windows.

Now a little practice:
Now we will create a Gamez folder, in it we will create a lib prefix in which we will install several libraries. These libraries will still be useful later, so let them be cached.

Mkdir ./Gamez

env WINEPREFIX=$HOME/Gamez/lib winetricks directx9 vcrun2005 vcrun2008 vcrun6
env WINEPREFIX=$HOME/Gamez/lib wine winecfg

With the last command we again called up the wine configurator window. Just go to the Libraries tab and make sure everything is installed. After this do:

Wine winecfg - the wine configurator will open (not from the prefix), check the same tab. See! There are no libraries here. So he is safe and sound.

How to install several different versions of wine?
To solve this problem, you will have to build wine from sources. When assembling, we simply use the prefix for the default installation. Something like this:

./configure prefix=/path/to/install/directory && make
sudo make install

AppDB
Be sure to use appdb to search for information on installing the application; perhaps the staff you are installing has already been installed and all the pitfalls have been described.
Cleaning up your home directory
If you like to game, then your /home partition is probably full of saves and other game files. You can get rid of this whole thing, without any damage, like this:

Replace the standard path to my documents with the desired location for storing saves. For example, this path leads to the game folder.

Using the latest versions of wine
Wine is such a thing, the newer the better! With the following command you will always have latest version wine (for Ubuntu-like distributions):

Sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update

After running these commands, look for the latest version of wine in synaptic.

Installing winetricks
If for some reason you still don’t have winetricks, then you can start one on your farm like this:

Wget winetricks.org/winetricks
sudo cp winetricks /usr/bin
sudo chmod +x /usr/bin/winetricks

How to install MSI file?
This can be done in two ways: wine msiexec /i whatever.msi

Alternative way: wine start whatever.msi

The file foo.exe is not marked as executable… - What does this mean?
This error occurs because the exe file is prohibited from execution. For a file on your FS, this command should fix the situation:

Chmod a+x ./patch/you/exe.file

If the file is on disk, then this command should help:

Mount -o remount,mode=0777,exec /media/cdrom

How to output debug contents to a separate file?
cd ~/.wine/drive_c/Games/Tron
wine tron.exe &> log.txt
How to disable the "crash" dialog?
If you use prefixes, do not forget to specify the path to the prefix in the command - winetricks nocrashdialog
After launching the application/game, wine complains and does not launch anything. What to do?
First, study the logs, usually everything is written in them. Below I will list the most popular mistakes:

MFC40.DLL: Install mfc40 (Microsoft Foundation Classes from Visual C++ 4) via winetricks.
MFC42.DLL, MSVCP60.DLL: Install vcrun6 via winetricks (MS Visual C++ 6 sp4 libraries: mfc42, msvcp60, msvcrt).
MFC71.DLL, MSVCP71.DLL: Install vcrun2003 via winetricks (MS Visual C++ 2003 libraries: mfc71,msvcp71,msvcr71).
MFC80.DLL, MSVCP80.DLL: Install vcrun2005 via winetricks (MS Visual C++ 2005 libraries: mfc80,msvcp80,msvcr80).
MFC90.DLL, MSVCP90.DLL: Install vcrun2008 via winetricks (MS Visual C++ 2008 libraries: mfc90,msvcp90,msvcr90).
MDAC: Install mdac27 (MS MDAC 2.7) via winetricks.

My app is working but the text fields are behaving strangely
Analyze the wine debug after launching the application, if you see something complaining about RICHED20.DLL, then install the following library via winetricks: riched20
After launch, fixme messages are displayed in the console. What is this?
You can simply ignore them, this is information for developers.
What to do if the application requires the .NET framework?
Through Wintrix you can install 1 or 2 frameworks. Alternatively use mono. If the application requires framework 3 or 4, then most likely it will not work (although 3 and even 3.5 are available in the winetricks menu). We are waiting for this problem to be resolved.
The game I'm trying to install is protected from distribution, is it possible to install it?
See the list of copy protection that work.
What to do if the application requires IE?
Wine uses the Gecko kernel/engine by default, which is the same as Firefox. Therefore, you can install gecko (if it doesn’t exist) and/or fakeie6 through winetrikcs.

If this does not help, try changing the windows version to win2k and installing ie6, ie7 or ie8 via winetricks.

How to enable font smoothing in wine?
If your version is higher than 1.1.12 you can use winetricks and choose one of three antialiasing options: fontsmooth-gray, fontsmooth-rgb or fontsmooth-bgr
Screen resolution is not restored after exiting the game
This should help: xrandr -s 0
How to get into the wine registry?
wine regedit - If prefixes are used, specify the path in the command.
Does wine require a separate driver installation?
No. Wine is not a computer emulator; it only translates Windows API calls into commands that Linux understands.
Is it safe to run wine as root?
Never run wine as root user!!!

If this has already happened, change the owner of the ~./wine directory.

CD ~
sudo chown -R $USER:$USER .wine

Safety precautions when using wine
Here are some tips to help you improve your security:
  • Never run programs from suspicious sites
  • Never use root user to run applications!
  • Use a virus scanner for startup applications, such as ClamAV. Or at least check the exe files on virustotal
  • Try removing the wine drive Z:, which points to the root directory by default. As a workaround, run programs from the ~/.wine/drive_c directory.
  • Use virtual machine to launch and scan suspicious applications.
The file.xsession-errors clogs up the entire disk space with garbage!!! What to do? (recipe from --=XliN=--)
Save the following script:
% cat .scripts/xsessionerrorscleaner.sh
#! /bin/bash
while true ; do
inotifywait -e modify ~/.xsession-errors &> /dev/null
[[ "$(stat -c %s ~/.xsession-errors)" -ge "52428800" ]] && echo > ~/.xsession-errors
done

Add it to startup, and install the following package (it is necessary for the script to work).
apt-get install inotify-tools

Making a “sandbox” for wine (recipe from drBatty)
*1) create a user
2) change the rights to home directories to 700
*3) write the command in sudoers (visudo)
first_user computer_name=(second_user) NOPASSWD: /program_with_full_path
4) for the first user, enter the command xhost +local into DE startup: second_user
5) write in the shortcut to launch the program
sudo -u second_user /program_with_full_path
then the first user will be able to more or less safely run programs on behalf of the second user.
The asterisk marks the items for which root rights are required.

For most games to work correctly, it is necessary to configure the registry of our pseudo Windows. To do this, we will use the Winetricks utility, which was installed along with Wine.
Perform the following manipulations: Applications->Wine->Winetricks. In the window that opens, check: Select the default wineprefix. OK

In the next window, mark: Change Settings. OK

You will have access to the basic settings of your Ubuntu-Wine-Windows combination.

Here check the following options:
1. DirectDrawRender(ddr) opengl
2. Direct3D Multisampling enabled
3. OffscreenRenderingMode(orm) fbo
4. PixelShaderMode(psm) enabled
5. Render TargetLockMode(rtlm) auto
6. UseGLSL(glsl) enabled (default)
7. VertexShaders(vsm) hardware
8. VideoMemorySize 1024 (select the RAM value of your video card)
9. MouseWarpOverride(mwo) enabled (force)
We confirm our changes - OK.
All registry settings of our system are stored in text files (system.reg; user.reg; userdef.reg), located at the address - Home\Username\.Wine and they can be edited in any text editor (try this in real Windows?! ). To edit, you can also use the more familiar Windows method - the registry editor: type wine regedit OK in the terminal

the editing program will start

As you can see, everything we did in Winetricks was displayed in the registry settings.

Original: Wine User Guide
Translation: Alexey Dmitriev, [email protected]
Translation date: May 2008

Chapter 3: Setting up Wine (Configuration)

The vast majority of common settings are done through the Winecfg tool. We'll go through a simple step-by-step introduction to Winecfg and look at the available options. In the next section we'll tackle more advanced changes that can be made when help regedit. We will also conduct a full review of all Wine configuration settings. Finally, we'll look at settings (that you may want to make) that are not available through Winecfg and regedit.

3.1. Winecfg program

In the past, Wine used a special configuration file located in ~/.wine/config. If you are still using a version of Wine that deals with this file (older than June 2005), then you will need to upgrade before doing anything further. All settings are now collected directly in the registry and are available to Wine upon startup.

Winecfg must be installed on your computer along with the rest of the Wine programs. If you don't understand how to run it, try the command:

$ /usr/local/bin/winecfg

or simply

When the program starts, you will see the following tabs at the top of the window:

  • Applications
  • Libraries
  • Graphics
  • Desktop Integration
  • Drives
  • Audio
  • About

Making changes to the Applications and Libraries tabs will be critical to being able to launch applications. The remaining settings are used to make the Wine program itself work the way you would like it to.

Warning: The Applications, Libraries and Graphics tabs are linked together! If you select Default Settings in the Applications tab, all changes made in the Libraries and Graphics tabs will be changed for all applications. If you configured an application in the Applications tab and selected it, then the settings made in the Libraries or Graphics tabs will affect only this selected application. This allows you to selectively configure certain applications.

3.1.1. Application Settings

Wine has the ability to mimic the behavior of different versions of Windows. In general, the behavior of the Win9x versions and the NT versions is the most different. Some applications require normal operation specific behavior, and changing this setting can make a faulty application work. Recently, Windows 2000 was chosen as the default version for Wine. Many applications are known to run better if you choose Windows 98.

Inside the tab, you will notice a line called Default Settings. If you select this line, then all applications will run on the default version of Windows. It is better to configure the problematic application separately from the default settings. For this:

  1. Click the Add application button.
  2. Find the required .exe file.
  3. Once you add this application, you will be able to choose Windows version, which Wine will emulate specifically for this application.

3.1.2. Setting up Libraries

Likewise, some applications require special libraries. Wine replicates the Windows library system (called native DLLs), creating versions of the libraries that do not require a Microsoft license and work exactly like native ones. Wine lacks such recreated versions of libraries, but they work quite satisfactorily. Using only recreated DLLs ensures that your system is independent from Microsoft. However, Wine has the ability to load native Windows DLLs.
3.1.2.1. DLL replacement
It is not always possible to run an application using Wine's built-in DLLs. Sometimes native DLLs just work better. Once you have pinned down the native DLL in Windows system, you have to put it somewhere where Wine will find it and then configure it to work. Typically this location is the directory that you assigned to the c:\windows\system32 role. There are 4 DLLs whose native versions should never be used: kernel32.dll, gdi32.dll, user32.dll and ntdll.dll. These libraries require low-level access to the Windows kernel, which is simply not available in the Wine framework.

With this in mind, if you have already copied the DLL, you need to tell Wine that you can use it. You can configure Wine to choose between a native and built-in DLL at two different levels. If you have Default Settings installed in the Applications tab, then the changes you make will affect all applications. Or you can change global settings at the individual application level by adding this application and selecting it in the Applications tab.

To add an override FOO.DLL file, enter "FOO" in the field labeled New override for library and click the Add button. To change the behavior of a DLL, you need to select it from the Existing overrides: field and click Edit. By default, the “native” Windows will be loaded first, the second will be the built-in Wine one ( Native then Built). You can also choose native only, built-in only, or disable both.

3.1.2.2. Regarding system DLLs
The Wine team decided that it was necessary to create fake DLL files to fool many programs that only check for the presence of a file to ensure that a certain property (such as Winsock and its TCP/IP networking) is theoretically available. If you have this problem, create empty files with appropriate names in the configured c:\windows\system32 directory so that the program thinks they are there, and the built-in Wine DLLs will be loaded when the program actually asks for them. (Unfortunately, the wineinstall tool does not create such empty files on its own.)

Sometimes applications try to figure out the version of a resource directly from a physical file (say, to find out the version of DirectX). Dummy files will not help in this case. In this case, you need to install files with the full version code. This problem has already been resolved for many files. If not, then again you have to copy the native DLL file to fool the program.

Naturally, there are DLLs that Wine has not yet implemented properly (or at all). If you don't have a real Windows handy to copy the DLL from, you can always get the file from sites that contain Windows DLL archives, which you can find using search engines. Please follow the licensing rules for the DLL files you select; some are distributed without restrictions, some are not.

3.1.2.3 Missing DLLs
In case Wine complains about a missing DLL, you need to check whether the file is the "official" DLL, or belongs to the program you are trying to run. This can be done by searching the Internet for the file name. Once you've spotted the DLL, you need to make sure that Wine can use it. Searching for DLLs is usually done in the following order:

1.The directory from where the program was launched.

2.Current (working) directory.

3.Windows system folder.

4 Windows folder.

5 PATH variable directories.

In short: either place the DLL you need in your program's directory (can be inconvenient) or place it in the system Windows folder. If possible, avoid native NT-based DLLs, as Wine's support for the NT API is much weaker than the Win9x API's (sometimes resulting in poorer compatibility with NT DLLs than even with non-Windows schemes!).

3.1.3 Graphics Settings

There are five different basic settings that can be configured. For most people, the default settings are sufficient.

The first few settings are mostly related to gaming and are self-explanatory. It is possible to prevent the mouse cursor from leaving the DirectX program window (i.e. the game). By default this option is enabled. There are many reasons to do this, not the least of which is the fact that it's easier to play when the cursor is contained in a smaller area. Another reason to enable this option is better control over the mouse. Wine distorts mouse position to simulate Windows operation. Likewise, "desktop double buffering" produces smoother screen updates, making games look better; again, the option is enabled by default. This is a trade-off for increased memory consumption.

It may be useful to emulate a virtual desktop. In this case, all programs will run in a separate window. This can help identify glitchy games that change screen resolution (possibly unsuccessfully). Confining them to a window may result in greater control over them, perhaps at the cost of less convenience. You can try sizes 640x480 (default) or 800x600.

Lastly, you can change some Direct3D settings. For the most part, these settings are determined automatically, but you can force them to behave in certain ways. Some games try to check the system to see if it supports certain features. By turning off this behavior, Wine will not report its ability to render an image in a certain way. This may result in increased game speed at the expense of graphics quality; or maybe the game won't work at all.

3.1.4. Drive settings

Windows has a fairly rigid disk naming scheme, which Wine imitates. Most people are familiar with the standard layout: "A:" represents the floppy disk, "C:" represents the primary system disk, etc. Wine uses the same concept and partitions the drives according to the underlying native file system.

Partitioning disks in Wine is relatively simple. In Winecfg, in the Drives tab, you see buttons for adding and removing the required drives. When you select "add drive" a new row is created and the default drive naming scheme appears. You can change the address it points to this disk by making changes to the Path field. If you are in doubt about the correct Path, click the "Browse" button to find the correct Path. You can remove a disk by highlighting the desired one and clicking "Remove".

Winecfg can automatically detect the drives available on your system. It is recommended that you try the automatic method before attempting to partition the drives manually. By simply clicking the Autodetect button you force Wine to search for drives on your system.

It's very interesting to configure disks without resorting to Winecfg, it's remarkably simple. All disk settings are located in the ~/.wine/dosdevices directory. Each disk is simply a symlink to the place where it actually is. Wine automatically installs two disks the first time you run it:

$ ls -la ~/.wine/dosdevices/
lrwxrwxrwx 1 wineuser wineuser 10 Jul 23 15:12 c: ->../drive_c
lrwxrwxrwx 1 wineuser wineuser 1 Jul 23 15:12 z: -> /

To add another disk, such as a CD-ROM, simply create another link pointing to it:

$ ln -s /mnt/cdrom ~/.wine/dosdevices/d:

Please note that the links use the DOS drive naming system - a letter followed by a colon, for example, "a:". So if the link to your c: drive points to ~/.wine/drive_c, you can understand links to c:\windows\system32 to mean ~/.wine/drive_c/windows/system32.

3.1.5 Audio settings

Wine can work with very few audio subsystems, which you can select in the "Audio" tab. Winecfg will detect all available drivers, but you can select which one to use manually. Older Linux distributions that used the 2.4 kernel typically used the "OSS" driver. 2.6 kernels switched to "ALSA" in most cases. The "aRts" driver was recently deprecated due to a general lack of support for the "aRts" subsystem. If you are using GNOME, you can try EsounD. OSS and ALSA audio drivers are the most tested, so it is recommended to choose them if possible. If you need "Jack", "NAS" or "CoreAudio", then most likely you know why.

DirectSound settings are mainly used in games. You can choose how much hardware acceleration you want, but "Full" will work just fine for most.

3.1.6 Desktop layout

Wine can load Windows themes if you have them. Although no need, from the point of view Wine works or applications, this is not the case, it allows you to create the familiar appearance of the program. Wine supports new MSStyles themes. Unlike the old Microsoft Plus! style themes, the uxtheme mechanism supports special .msstyles files that can change all Windows settings. This is about the same thing that most Linux desktops have been able to do for many years. If you want to try it, do this:

1. Download the Windows XP theme. Make sure there is a .msstyles file.

2. Create a chain of directories in your fake Windows disk:

$ mkdir -p ~/.wine/drive_c/windows/Resources/themes/theme_name

3. Move the .msstyles file to the /name-of-your-theme directory

4. Using the Desktop Integration tab in winecfg, select a new theme.

3.2 Using the Registry and Regedit

All settings made using Winecfg, with the exception of disk settings, are ultimately saved in the Registry. In Windows, this is the central storage of settings for both individual applications and the operating system itself. Wine uses the Registry in a similar way, so some settings that are not in Winecfg can be changed in the Registry. (You are much more likely to have to go into the Registry to change the settings of some program than to change the settings of Wine itself).

The very fact that Wine uses the Registry to save settings is debatable. Some argue that it's too similar to Windows. To counter this, there are a few things to consider. Firstly, it is impossible to do without the Registry simply because applications “expect” to save their settings there. In order for Wine to store and access settings in a separate configuration file, it would require a separate set of programs that basically does the same thing as the Win32 API, which is what Wine does. Finally, unlike Windows, the Wine Registry is written in plain text and can be modified in any text editor. And so, although most normal system administrators (and Wine developers) swear like mad at the confusing Windows Registry, it is still necessary for Wine to support it somehow.

3.2.1 Registry structure

Although this is not entirely on our way, let's delve a little deeper into the structure of the registry and see how it works. The Windows Registry is an intricate tree structure, and even the best Windows programmers don't always know how it's laid out, with its various "hives" and endless links between them; a full description is beyond the scope of this document. But you should now know the main Registry keys:

HKEY_LOCAL_MACHINE

This fundamental root key (in win9x it is stored in a hidden system.dat file) contains everything related to a given Windows installation. Often shortened to HKLM.

This fundamental root key (in win9x it is stored in a hidden file user.dat) contains information about each user in a given installation.

HKEY_CLASSES_ROOT

This is a link to HKEY_LOCAL_MACHINE\Software\Classes. It stores information describing things like file associations, OLE (Object Linking and Embedding) document management, and COM classes (COM technology is a Microsoft standard).

HKEY_CURRENT_USER

This is a link to HKEY_USERS\your_username, that is, to your personal configuration.

3.2.2. Wine Registry Files

Now you might be wondering how to translate all of this into Wine structures. The registry layout described above lives in three different files in the ~/.wine directory: system.reg This file contains HKEY_LOCAL_MACHINE. user.reg This file contains HKEY_CURRENT_USER. userdef.reg This file contains HKEY_HKEY_USERS\.Default (that is, the default user settings). These files are automatically created by wineprefixcreate the first time you start Wine. A set of basic settings is saved in the file c:\windows\inf\wine.inf and processed by the rundll32.exe program. When you first launch Wine, the rundll32.exe file undergoes a process of populating the initial registry. To see the details, take a look at the wineprefixcreate script and see how it's all done. After updating Wine, wineprefixcreate can again be used to update default registry strings.

As already mentioned, you can edit all these .reg files using any text editor. Just make sure that Wine is not running at this moment, otherwise all your changes will be lost.

3.2.3. How to use Regedit

The easiest way to access and modify the Registry is with the regedit tool. Same as the same name Windows program which it replaces, regedit is designed to view the registry at the system level, containing all of its keys. Just run regedit and it will open. You will immediately notice that the mysterious keys presented in text file, are organized in a hierarchical manner.

To navigate the registry, click on the keys on the left side of the panel to “dive” to the next level of depth. To delete a key, click on it and select "Delete" from the Edit menu. To add a key or value, locate where you want to place it and select "New" from the Edit menu. To modify an existing key, select it in the right pane and select "Modify" from the Edit menu. Another way to do the same thing is to right-click on the key or value.

Of particular interest to Wine users are the settings in HKEY_CURRENT_USER\Software\Wine. Most of the settings you made using winecfg are written to this section of the registry.

3.2.4. System Administrator Tips

Using the file structure described above, it is possible to configure the system so that the system installation of Wine (with applications) can be shared by all users, while at the same time allowing each user to have their own configuration. The administrator can, having installed Wine and all the applications necessary for Windows users, then copy the resulting system.reg file and others to the global registry files (which, as we agreed, are located in /usr/local/etc), using the commands:

cd ~root/.wine
cp system.reg /usr/local/etc/wine.systemreg

ln -sf /usr/local/etc/wine.systemreg system.reg

You may have to do the same thing with the user.reg file, even though this file contains user settings. Each user must have their own copy of this file, along with the rights to modify it.

It is necessary to pay attention to the disk layout. If you share the system.reg file, you must ensure that the registry settings are compatible with the drive layouts in each user's ~/.wine/dosdevices files. Make it a rule that the more closely your disk layout matches the default one created by wineprefixcreate, the easier your task will be. You may not be able to share all the "c:" drives where you originally installed the applications. Some applications require the ability to write certain settings to disk, especially Windows 95/98/ME applications.

Please note: if you installed Wine from source as root, the tools/wineinstall script you used during installation no longer works.

One final word of warning: watch what you do with the admin account. If you copy (or provide a link) the administrator's registry to the global registry, then any user will be able to read the administrator's settings, which is bad if it contains important information about passwords, personal information, etc. Use the administrator account only to install programs, and not for daily work; it must be done under a regular account.

3.2.5. Complete list of registry keys

The most up-to-date list of commonly used keys and values ​​can be found on the developer's wiki page.

3.3. Other configurable aspects

This section contains all the other things that can be configured. It also serves as a collection of tips and tricks to get the most out of using Wine.

3.3.1. Serial and parallel ports

Serial and parallel ports are configured much like disks - simply create a symbolic link in the ~/.wine/dosdevices directory with the device name. In Windows, serial ports are usually called "com" with a number added, for example: com1, com2, etc. Similarly, parallel ports are named "lpt" with a number added, for example: lpt1. You should link them directly to the corresponding Unix devices, such as /dev/ttyS0 and /dev/lp0. For example, to configure one serial and one parallel port, run the following commands.

ln -s /dev/ttyS0 com1
ln -s /dev/lp0 lpt1

3.3.2. Collaborative networks

Windows network resources can be scheduled in the unc/ directory, so that everything that should be in \\myserver\some\file will be in ~/.wine/dosdevices/unc/myserver/some/file/. For example, if you are using Samba to mount \\myserver\some to /mnt/smb/myserver/some, then you would run the command:

ln -s /mnt/smb/myserver/some unc/myserver/some

to make them available in Wine (just remember to create the unc directory if it doesn't exist).

3.3.3. Fonts

Font customization, once a serious problem, is now much easier to solve. If you have a set of TrueType fonts on Windows, then you just need to copy all the .ttf files to c:\windows\fonts.

3.3.4. Printers

Wine can communicate directly with your CUPS (Unix Printing System) printing system and find printers available to the system. Setting up printers in Wine is all about making sure CUPS is working. However, Wine needs the lpr command (from CUPS) when it needs to print any document.

If you do not use CUPS, then the old BSD-Printing printing system is used:

All printers in the /etc/printcap file are automatically installed in Wine.

Wine requires a PPD-File for each of the printers (generic.ppd is included with Wine)

To print a document, run the lpr command.

3.3.5. Scanners

On Windows OS, scanners use the TWAIN API to access the corresponding devices. Wine's built-in TWAIN DLL simply forwards these requests to the Linux SANE libraries. So, to use the scanner under Wine, you first need to make sure that you can access it through SANE. After that, you need to make sure that you have xscanimage usable. Currently xscanimage is included in the sane-frontends package, but may not be installed on your distribution. In general, access to scanners is still replete with problems today. If you happen to get the scanner working, please update this section of the Wine User Guide to detail the details of using SANE with Wine.

3.3.6. ODBC Databases

The Open DataBase Connectivity interface system, like the printing system, is designed to switch to a Unix system at a high level. Instead of checking whether Windows codes work under Wine, it uses a suitable Unix ODBC provider, such as UnixODBC. So, if you configured Wine to use the built-in odbc32.dll, this Wine DLL will interact with your Unix ODBC package, allowing it to work. If you configured Wine to use the “native” (Windows) odbc32.dll, it will try to use the “native” ODBC32 drivers and so on.
3.3.6.1. Setting up ODBC on Unix
The first step towards using Unix systems ODBC with Wine, there will, of course, be setting up the operation of the Unix ODBC system itself. This may require installing source or RPM packages. There are several Unix ODBC systems; the one the author is used to is called unixODBC (with IBM DB2 driver). There is also an ODBC-ODBC bridge that can be used to access a Microsoft Access database. Typically such systems include a tool such as isql that will allow you to access data from command line, so that you can verify that the system is working.

The second step is to switch the Unix ODBC library to the built-in Wine odbc32 DLL. The odbc32 built-in (currently) looks in the environment variable LIB_ODBC_DRIVER_MANAGER for the name of the ODBC library. For example, the author has the following line in the .bashrc file:

export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so.1.0.0

If so environment variable is not installed, then it looks for a library called libodbc.so, and you can set a symbolic link to equate it to your own library. For example, as root, you can run the commands:

# ln -s libodbc.so.1.0.0 /usr/lib/libodbc.so
# /sbin/ldconfig

The final configuration step is to ensure that Wine is set to run the built-in version of the odbc32.dll file by changing the DLL configuration. This built-in DLL typically acts as a stub between the calling program and the Unix ODBC library.

If you're having trouble, you can use the WINEDEBUG=+odbc32 command before starting Wine to see what's going on. One warning. Some programs cheat a little and bypass the ODBC library. For example, the Crystal Reports engine goes to the registry to check the DSN (Data Source Name). The way to deal with this is described on the unixODBC website, which has a section on using unixODBC with Wine.

3.3.6.2. Using Windows ODBC Drivers
Native ODBC drivers are said to work with many types of databases, including MSSQL and Oracle. In fact, only MSSQL can somehow be accessed from Linux through the Winelib application. Instead of just copying DLL files However, most ODBC drivers require the use of a Windows installer to properly configure certain things, such as registry keys.

To establish MSSQL support, you must first download and run the mdac_typ.exe installer from microsoft.com. To form ODBC connections, you must then run CLICONFG.EXE and ODBCAD32.EXE under Wine. You can find them in the windows\system directory after mdac_typ has finished running. Compare the output of these programs with the output on a real Windows machine. Some things, such as protocols, may be missing because they may be installed with operating system. If this is the case, then you can copy the missing items from your existing Windows installation along with any necessary registry values. A real Windows installation, prepared to work with Wine, should work on its own no worse than before preparation. Here is a list of databases that have successfully tested with Wine.

mob_info