
Hello!
I read the article about
“All the details of the Wine settings” , it turned out that not all the details were there. Therefore, I wrote this post as an addition to that.
In this post, mostly free translation of. documentation, as well as some of their own and others' tricks when working with Vine.
Most likely this post will be of interest to beginners and ordinary users of GNU \ Linux. Nevertheless, good advice from experts will not be superfluous.
What is vine I think it makes no sense to explain. I just want to show a few tricks when working with him.
')
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 suffices to remove the prefix in which the error occurred, while all other applications \ prefixes (suppose they are configured) will not be affected.
That is, each prefix you create can be viewed as a separate wine — it is independent of other prefixes. Or, for even greater simplicity, take each created prefix as a separately installed Windows.
Now a little practice:
Now we will create the Gamez folder, in it we will create the 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 wine winecfg
env WINEPREFIX=$HOME/Gamez/lib winetricks directx9 vcrun2005 vcrun2008 vcrun6
env WINEPREFIX=$HOME/Gamez/lib wine winecfg
With the last command, we again called the wine configurator window. Just go to the “Libraries” tab and make sure everything is set. After that do:
wine winecfg
- the wine configurator is opened (not from the prefix), check the same tab. You see! There are no libraries here. So he is safe and sound.
How to install several different versions of wine?
To solve this problem will have to collect wine from the source. When building, just 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 staf you are installing has already installed and painted all the pitfalls.
Restore order in the home directory
If you like to play, then probably your / home partition is full of saves and other game files. You can get rid of this whole business, not at the expense of so:

Replace the standard path to my documents with the desired storage space for the saves. For example, this path leads me to the game folder.
Using the latest versions of wine
Wine such a thing, the newer the better! With the following command you will always have the latest version of 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.
Install winetricks
If for some reason you still do not have winetricks, then you can start it in the 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 method:
wine start whatever.msi
The file foo.exe is not as far as executable ... - What does this mean?
This error occurs because the exe file is banned for execution. For the file on your file system, this command should fix the situation:
chmod a+x ./patch/you/exe.file
if the file is on disk, this command should help:
mount -o remount,mode=0777,exec /media/cdrom
How to display the contents of debugging in a separate file?
cd ~/.wine/drive_c/Games/Tron
wine tron.exe &> log.txt
How to disable the "crash" dialogue?
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 swears and runs nothing. What to do?
First, examine the logs, usually everything is written in them. Below I will give the most popular errors:
MFC40.DLL: through winetricks install mfc40 (Microsoft Foundation Classes from Visual C ++ 4).
MFC42.DLL, MSVCP60.DLL: via winetricks install vcrun6 (MS Visual C ++ 6 sp4 libraries: mfc42, msvcp60, msvcrt).
MFC71.DLL, MSVCP71.DLL: via winetricks install vcrun2003 (MS Visual C ++ 2003 libraries: mfc71, msvcp71, msvcr71).
MFC80.DLL, MSVCP80.DLL: through winetricks install vcrun2005 (MS Visual C ++ 2005 libraries: mfc80, msvcp80, msvcr80).
MFC90.DLL, MSVCP90.DLL: through winetricks install vcrun2008 (MS Visual C ++ 2008 libraries: mfc90, msvcp90, msvcr90).
MDAC: through winetricks install mdac27 (MS MDAC 2.7).
My application works, but text fields behave strangely
Analyze the debug wine after launching the application, if you see that it swears on
RICHED20.DLL , then install the following library through winetricks:
riched20After launch, the console displays fixme messages. What is it?
You can simply ignore them, this is information for developers.
What to do if the application needs a .NET framework?
Through the Vaintrix you can install 1 or 2 framework. As an alternative to use mono. If the application requires 3 or 4 framework, then most likely it will not work (although 3 and even 3.5 is available in the winetricks menu). We wait until they solve this problem.
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 should I do if an application requires IE?
Wine uses the default kernel / engine Gecko - this is the same as on Firefox. Therefore, it is possible through winetrikcs to install the gecko (if it does not exist) and \ or fakeie6.
If this does not help, try changing the windows version to win2k and install via winetricks ie6, ie7 or ie8.
How to enable font smoothing in wine?
If your version is higher than 1.1.12 you can use winetricks and select one of three anti-aliasing options:
fontsmooth-gray ,
fontsmooth-rgb or
fontsmooth-bgrAfter quitting the game, the screen resolution is not restored.
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 need a separate driver installation?
Not. Wine is not a computer emulator, it only translates the Windows API calls into Linux-friendly commands.
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 when using wine
Here are some tips to help you improve security:
- Never run programs from suspicious sites.
- Never use root user to run applications!
- Use antivirus scanner for running applications, such as ClamAV. Or at least check on virustotal
- Try deleting the wine Z: drive, which points to the root directory by default. As a workaround, run programs from the ~ / .wine / drive_c directory.
- Use the virtual machine to run and test suspicious applications.
The .xsession-errors file clogs up all disk space !!! 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 user
2) we change the rights to home directories to 700
* 3) register the command in sudoers (visudo)
first_user comp_name = (second_user) NOPASSWD: / program_ with_complete_path
4) in the first user, we write the command xhost + local to the autoload DE: second_user
5) in the shortcut to run the program we write
sudo -u second_user / program_c_full_path
then the first user will be able to more or less safely run programs on behalf of the second user.
Asterisks mark items for which root rights are needed.