Advertisement
SpawnHappyJake

WINE Basics

Jul 7th, 2011
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.10 KB | None | 0 0
  1. Ok, there's several things you should know about using WINE then:
  2.  
  3. *went in later and added a few to the top. You can go to terminal and do "wine --version" to find what version of WINE you have. Go to www.winehq.org and see what the latest version of wine is (right there on the front page). Ignore the latest stable. You want the latest.
  4.  
  5. To upgrade in Ubuntu, go to terminal and do "sudo apt-get install wine1.3". (Or, if this lasts this long, wine1.4 or whatever version they're on.) You might be one version behind if the packagers haven't compiled that version for you yet. That's ok.
  6.  
  7. But for the above to work, you have to have the wine repository, which to get for Ubuntu you do (and to install): "sudo add-apt-repository ppa:ubuntu-wine/ppa" then "sudo apt-get update" then when that's done, do "sudo apt-get install wine1.3" and then do "sudo apt-get update" again.
  8.  
  9. First you should know about prefixes (some might say that beginners don't need to worry about these, but it ties into deleting your .wine folder to start over.)
  10. A WINE prefix is a folder that contains one "WINE world". You can have one Windows program in its own "WINE world" and another program in its own "WINE world". This is done by putting one in one prefix and another in another prefix.
  11. Each prefix has its own registry and has its own virtual C: drive. So they will have their own windows folder their own users folder, all that. And their registries will be separate. And their settings will be separate.
  12.  
  13. If you don't specify a prefix when running a program in WINE, then the default prefix is used. The default default is a folder named ".wine" in you home folder. The .wine folder is hidden, so you have to tell your file browser to show hidden files and folders to show it to you if it isn't already showing hidden files and folders. In Nautilus, a common Linux file browser, pressing Ctrl + h while in the browser will make them show.
  14.  
  15. You can navigate to this folder and see that it contains a "drive_c" folder and files that contain that prefix's registry. If you go into the drive_c folder, you will be browsing that prefix's C: drive.
  16.  
  17. If you had a prefix at /home/deania/wow and another at /home/deania/halo and you ran a program in the /home/deania/wow prefix, it can still see and do stuff to the /home/deania/halo prefix because it can go to Z:\home\deania\halo\drive_c, provided Z:\ is linked to "/", which it is by default. "/" is you real root directory that contains your home folder, etc. So they're separate worlds, but they can see each other, like Earth and Mars. You could remove the Z: drive link and anything that links to anything containing any other prefixes if you wanted to shut them out from each other, but this is only necessary if you are trying to contain a virus or something. Don't use this method to try to contain a virus or something. Instead, make a virtual machine with no way of connecting to your "real" computer, which would be without a network connection, shared folders, or USB filters, etc.
  18.  
  19. To make a prefix, just make a folder and tell WINE to use it as a prefix. To use a folder as a prefix, go to terminal and do "WINEPREFIX=[path to prefix] wine [executable path]" and that executable will be ran through WINE in that prefix. To use a program with a prefix other than the default, you must specify that WINEPREFIX=[path to prefix] _every_time_ you want to run that program in that prefix. If you forget to specify the prefix even once, it will be ran in the default prefix. Even if you already said in terminal "WINEPREFIX=[path to prefix] wine [executable path]" in an earlier line in the terminal you are in, you have to specify the prefix for each line you want wine to run a program in a prefix other than the default prefix, and you have to specify in that line.
  20.  
  21. Each time you tell WINE to use an empty folder as a prefix, it sets it up by putting in a drive_c folder and making a registry for it, etc. That's why deleting your .wine folder and making a new .wine folder might help.
  22.  
  23.  
  24. Second, know about winecfg. You can go to terminal and do "wine winecfg.exe" to open the wine configuration window for your default prefix. "WINEPREFIX=[path to prefix] wine winecfg.exe" loads the wine configuration window for that prefix.
  25.  
  26. In winecfg, you can pick what Windows version you want WINE to mimic by default for that prefix by going to the "Applications" tab and selecting an option by "Windows Version".
  27. You can also add an application (you can have more than one program in the same prefix), select it, and have different settings for that one application. Anything you do in winecfg while that application is selected is applied to that application. Any application that isn't specifically called out in the "Applications" tab is used with the Default Settings, which you can also select and configure. Anything you do in winecfg while "Default Settings" is selected is applied to any program not specifically called out in the "Applications" tab, and is in the prefix you are running winecfg under.
  28.  
  29. Also in winecfg, you can go to the "Libraries" tab and select a dll to override a wine dll. Sometimes WINE dlls aren't good enough yet for certain programs, and you need to tell it to use a "real" Windows dll.
  30.  
  31. The "Graphics" tab lets you check off to emulate a virtual desktop, which makes programs ran by WINE be ran in a window (the virtual desktop). This, like everything else, only applies to the prefix you are running winecfg under, and if you have a specific application selected under the "Applications" tab, it only applies to that application in that prefix.
  32.  
  33. In winecfg, the "Drives" tab lets you assign a drive letter to a directory. Let's say you have a CD inserted and it is mounted at /media/BFN_PC. You can make a D: drive in that "Drives" tab and point it to /media/BFN_PC. This makes the D: drive (only seen by windows programs ran through wine of which this setting applies to them - have to be in the prefix winecfg is being ran in and have to be the application selected in the Applications tab or be covered by "Default Settings" in the Applications tab and this setting be done while "Default Settings" is selected.) be that CD. By default there is a Z: drive pointed at "/" as mentioned before.
  34.  
  35. You might have to go into winecfg and go to the "Audio" tab if you are having audio issues with programs ran in WINE.
  36.  
  37. Third, know about the registry editor. You can go to terminal and enter "wine regedit" to open the registry editor to view and/or edit the registry for the default prefix. You can do "WINEPREFIX=[path to prefix] wine regedit" to view and/or edit the registry for that prefix. It can import and export registry keys in *.reg files. The technical name for *.reg files is "NT4 formatted registry files".
  38.  
  39. Fourth, know about winetricks. You can go to terminal and do "sh /usr/bin/winetricks [or where ever it is] [insert winetrick(s) to do here]" to apply one or more winetricks to the default prefix. Or you can do "env WINEPREFIX=[path to prefix] sh /usr/bin/winetricks [or where ever it is] [insert winetrick(s) to do here]" to apply one or more winetricks to that prefix. Notice the "env" out in front if you want to specify a prefix this time.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement