IntroductionIt's probably best to think of WINE prefixes sort of like virtual machines. They're not virtual machines, but they do behave somewhat similarly. A WINE prefix is a folder that contains all of the WINE configurations as well as all of the Windows pieces that WINE uses for compatibility, including libraries and a registry. The default WINE prefix is
~/.wine, but different and multiple prefixes can be used.
So, why would anyone want multiple WINE prefixes? Well, the idea of prefixes takes the compartmentalization provided by
winecfgeven further. Since some applications require more system-wide edits like registry entries and
.dllsto run, the potential for conflicts between these applications rises. It's not all that common for programs running in WINE to break each other, but it does happen. This is especially true if you're dealing with some 32bit applications on a 64bit WINE install.
The best way to handle prefixes is to keep a general one for most applications. This one will be the default, and you can use different configurations in
winecfgto separate out applications. Then, for especially problematic applications, run them in a separate prefix and create scripts or shortcuts to launch them specifically.
Creating A PrefixCreating a new WINE prefix is very easy. It's as simple as specifying it when you run a command in WINE.
$ WINEPREFIX=~/.newprefix winecfg
winecfgis a good first command to run because you'll probably want to play with the settings there anyway, and it won't mess up anything else.
If you need that new prefix to be a 32bit one, just specify that too.
$ WINEPREFIX=~/.new32prefix WINEARCH="win32" winecfgIt will do the exact same thing, but the prefix created will be a 32bit one. Again, this is and especially useful thing to be able to do when dealing with older uncooperative 32bit applications.
Using Multiple PrefixesUsing multiple WINE prefixes can be cumbersome. There isn't really a great way to do it, so you're going to have to rely on your own scripts and shortcuts. The concept itself is fairly simple and really just involves specifying the prefix that you'd like to use when you run an application.
$ WINEPREFIX=~/.wine-wow wine $HOME'/.wine-wow/drive_c/Program Files (x86)/World of Warcraft/Wow-64.exe'The above command would select the
.wine-wowprefix and run the World of Warcraft executable located in the prefix using WINE.
You can choose to launch via the command line with commands like the one above or create graphical launchers using those commands. Either way will work just as well. It's really a matter of preference. If you do prefer graphical launchers, every major desktop environment supports creating them with custom commands, so once everything is properly configured, you shouldn't have to think much about it.