Upload
sololeos
View
219
Download
0
Embed Size (px)
Citation preview
8/12/2019 Wine Bottles Ziemecki.net
1/2
Wine: Using Bott lesHome Blogs dziemecki's blog
Something I often see mentioned, but rarely explained, is the concept of Wine(which is not an emulator) bottles. Once I was able
to understand the concept, it became much easier to run (certain) Windows applications in Linux. Let me share a little.
A Wine bottle" is a collection of Wine libraries, settings, and applications. One can run as many bottles as the hard drive will hold.
The bottle concept is important because the modifications one might make to enable application A" can totally hose application
B". There are someconfiguration options within a bottle that can be set on an application level, but when you need to over-write a
certain DLL in the System32 folder or use a non-standard audio driver, or some similar low level change, you are going to want to
do that in a separate bottle.
You can start using bottles at any time. Just install Wine in whatever manner works best for you, or start with what you have if its
already installed. One thing to note is that, with most GUI desktops, the Wine bottle referred to by the CLI and configuration tool is
the default" bottle. Unless you specifically direct a command to a different bottle, all changes are to the default.
To invoke (call or reference) a non-default bottle, you must first open up the CLI and enter something like this:
export WINEPREFIX=$HOME/.wine-test
The default Wine bottle is stored someplace like ~/.wine. In this case, we are invoking a newbottle called .wine-test". Once you
export" your Wine prefix, any commands entered into that CLI window will be applied only to the invoked bottle, and all other
bottles will be unimpacted.
To install an application into this new bottle, launch the installation file from this same window using thewinecommand:
wine ~/downloads/testsetup.exe
Once the installation completes, the application will be stored in the Program Filessub-directory of the new bottle.
e.g.
.wine
.wine-test
Program Files
Common Files
Internet Exploration
Test Application
users
Windows
...
Since the Wine configuration tool in your GUI menu system only impacts the .wine" bottle, youll need to call the new bottles
configuration tool from this same CLI window, again, after issuing the exportcommand.
export WINEPREFIX=$HOME/.wine-test
winecfg
From here, you would set all the normal Wine configurations like DLL overrides, video and audio driver choices, and Windows
version. Hit Apply" and close the tool when you are done, and the changes have been made to your bottle.
To make registry changes to the new bottle, invoke it and call regedit:
export WINEPREFIX=$HOME/.wine-test
regedit
Note that using exportprefix means theWINEPREFIXenvironment needs to be explicitly set only once per CLI session. As long
as that CLI window is open, any Wine commands will only reference the invoked bottle. I f you close the window, and open a new
one without setting the environment, any subsequent commands would be applied to the default .wine" bottle. This applies also to
tools like winetricks or PlayOnLinux. Alternately, you can callWINEPREFIXalone in-line with any command to set the environment
and then forget it immediately.
WINEPREFIX=$HOME/.wine-test winetricks win2k
WINEPREFIX=$HOME/.wine-othertest winetricks vista
e: Using Bottles | ziemecki.net http://ziemecki.net/content/wine-using
2 01/04/1
8/12/2019 Wine Bottles Ziemecki.net
2/2
by dziemecki
A final note on the use of bottles. Once an applications usefulness has passed, youll generally want to un-install it to free up
resources. This will often not work well in Wine, especially if the original installation wasnt a complete success or the application
has become otherwise corrupt. Bottles offer a short-cut solution: delete the bottle and everything within it - registry, applications,
and system files - is gone. Run an export command and you start over clean.
Dan Ziemecki
Anonymous (not verified) | Sat, 09/24/2011 - 09:44
e: Using Bottles | ziemecki.net http://ziemecki.net/content/wine-using
2 01/04/1