Wine is an open source application that can be installed within a Linux operating system to allow Linux users to execute programs that were originally written for Microsoft Windows. Additional information can be found in the Wine Wikipedia article and the Wine HQ web site. The scope of this article will initially be focused on installing Wine, and hopefully will be expanded later to include information on its usage.
ALERT: Wine HQ warns against using the Debian repositories recommended below, as they “are very out of date”. For the newest version, follow the Wine HQ instructions for Debian Etch, after first uninstalling the old version of wine and libwine (sudo apt-get remove wine libwine) – you won't need to re-install libwine, as it is no longer used. The instructions below work, but until Wine and Debian work out their issues, it's only going to work for an older version of Wine.
NOTE: The “very out of date” Debian repositories have the advantage that they set up file associations in Firefox, so that when you download an .exe file you are immediately given the option of executing it in Wine. Using the Wine HQ repositories seems to result in .exe files being recognized as binary with only a “Save” option (uncomfortable but more secure).
Update: The latest wine 1.0 is now available compiled for the Eeepc from the xepc.org repositories. This should be the preferred version to install.
(Instructions are forthcoming - help with this section is welcome).
Until this section is written, instructions are available on the Cardbox web site, or you can just follow the Graphical User Interface instructions immediately below with the step-by-step screenshots.
NOTE: the following instructions guide you to add just the debian repository contradicting which http://wiki.eeeuser.com/addingxandrosrepos can be read to state you should install a whole sequence, paying particular attention to the pinning (priority) sequence.
1. Open Terminal (Ctrl-Alt-T)
2. Enter sudo synaptic
3. From the menu choose Settings, Repositories
The repositories shown should resemble below. Don't proceed past this step unless you are sure you know what you are doing.
4. While looking at the repositories, click New and enter the following values into the respective fields:
URI: http://ftp.us.debian.org/debian
Distribution: stable
Sections(s): main non-free contrib
To install the xepc.org latest version instead, enter the following values:
URI: http://updates.xepc.org/
Distribution: p701
Sections(s): main
5. Follow the instructions in the Information popup: Click Close to close the popup and then click Reload.
6. Wait a few minutes while Synaptic downloads the package information. You should see a progress indicator as shown below.
7. In the list of packages on the right, find “wine” either by scrolling through the list or typing the first few letters. There should be three relevant packages (“wine”, “wine-doc” and “wine-utils”) as shown below.
8. Double-click to pick “wine” and then click the Mark button on the popup dialog that appears. The other two packages are not within the scope of this article.
9. Click the Apply button to install your packages and then click the Apply button on the following dialog that appears (after first verifying that your package is listed in the “To be installed” list).
10. Synaptic will now display a progress indicator while it downloads your packages.
11. Next Synaptic will display a progress indicator while it installs the new packages.
12. Finally, Synaptic will tell you it is finished installing the packages. You may review the log for errors, if you wish. Anything reported there currently resides outside the scope of this article.
13. It would be hygienic to restore the state of Synaptic to what it was before you added the extra repositories in step 4. From the menu choose Settings, Repositories, and disable the two extra Debian repositories by using the check box next to each one. (You could also delete the repositories altogether, but simply disabling them makes it easier to use them again in the future). Then repeat step 5 so that Synaptic rebuilds its lists based on the reduced set of repositories.
ALTERNATE METHOD!
i've heard stories of people following the winehq debian directions and being able to download and install the latest wine version through command line or synaptic.
it was IMPOSSIBLE FOR ME. i always just ended up with the old version 9.25 that way.
so - what to do to install the latest WINE easy and hassle free and very much akin to just downloading and installing an app in windows:
http://wine.budgetdedicated.com/archive/index.html
you can just scroll down and download the debian etch LATEST VERSION! after you download, you can use the file manager, right click on it and install the package! that will install wine!
(p.s. the link above is a link from the debian install instructions at winehq and it is listed as an ARCHIVE… but thank goodness they have the presence of mind to keep the LATEST VERSION THERE TOO!!! YAY!!!)
(p.s.2. because you are installing from a PACKAGE [which this is], you can easily UNINSTALL the package later too, just like as if you're using the repositories. you just need to have the original package around somewhere [if not, you can always just download it again])
FINALLY,
wine seems to run many older windows apps (95, 98) much better than even win xp! so if you want to use older apps that are not old enough to run on dosbox but not new enough to run on xp, try linux and wine!
(Instructions are forthcoming - help with this section is welcome).
Not sure if this will help or not… feel free to edit:
After a successful install of WINE, simply running the program at the command line with no arguments (ie, just type wine and press enter) will bring up a GUI allowing the user the option of configuring wine.
* for 0.9.49 version onwards, configuration window is called by winecfg.
I hope this helps
(Instructions are forthcoming - help with this section is welcome).
In the simplest sense, once wine is installed if you are running a program which will run under wine, you just run it.
So, if for example, you downloaded the setup.exe for Ocean from bahai-education.org, you could just go to a console, cd to the directory you downloaded the setup file to and type
./setup.exe
and it would bring up wine and just run it.
When wine installs, it sets up a “virtual drive c” in a folder in your home directory… /home/user/.wine/drive_c and your programs will be installed there, so when I made a menu shortcut to Ocean.exe I said:
wine /home/user/.wine/drive_c/ocean/Ocean.exe
and it just runs. If there are compatibility problems past that, you get to dig into the wine documentation for help. Many many windows programs tho, “just run.”
Note: It is always better to use DOS or Windows style path than the Unix style to run wine. e.g.
wine 'C:\Games\Tron\tron.exe'
Some Windows program just don't run with the Unix path. So, if you put your Windows program in a SD, then it is always easier to assign a drive letter, say D:\ to your SD with winecfg.
Another way to run it:
Install the rox-filer from debian repositories, you can then in the file Manager (not Xandros), right click on the exe, and set run action … to wine,this need to be done one time only, then you can double click on any exe file to run it. (saving you the ssd spaces to house the file.)
Yet another easier way to run wine:
Run the wine File Manager by typing winefile in a console. This will bring a File Manager that looks like the Windows Explorer. Then you can navigate to the directory that contains your Windows program and double click on the exe file to launch the Windows program. This method also avoids many error you may encounter with strange folder name (e.g. “D:\ ”) that Windows (I mean wine) found it difficult to understand.
Wine will run many Windows programs out of the box, but some may need additional tweaks. For example, a certain program ABC may need a specific version of Windows library foo.ocx or foo.dll in C:\Windows\system32\. If you run this program on the command line with Wine, you will be able to see a missing library error message: library foo.dll is missing.
To overcome this error, you can simply copy the missing library from the Windows box on your desktop to the corresponding location in ~/.wine/drive_c/, then run the wine registry in a console to register the library:
wine regsvr32 foo.dll
and for unregistering:
wine regsvr32 /u foo.dll
To have some idea what programs will run under wine and how to do it (in case of trouble), you can visit Wine AppDB at http://appdb.winehq.org/.
To make life easier for end-users like us, WineHQ has provided a script called winetricks that helps to download and install various redistributable runtime libraries sometimes needed to run programs in Wine. To download,
wget http://www.kegel.com/wine/winetricks
and to run it, e.g.
sh winetricks vb6run
This will install the Visual Basic 6 runtime package to wine.
To have some idea what packages are available, visit http://wiki.winehq.org/winetricks.