One of the biggest limitation that most user have when they would like to migrate from Microsoft Windows to Linux is that some application they are too familiar with (and maybe have spent some money on to get the license) is available only for Windows. Fortunately there is Wine (http://www.winehq.org/) an Open Source (and free) implementation of the Windows API on top of X, OpenGL, and Unix.
What that means is that all the most common Windows functions that Windows programs use have been rewritten to use the Linux functions instead. Through this mapping it is possible to run Windows applications on Linux even if they are not ported yet.
Sound good, doesn’t it? Well … I have been able to personally run all the Windows application I needed (just World of Warcraft mainly and merely a few other games, to be honest), but I found some pain. Wine is doing a very good job and it is evolving very fast, but it is not completed yet and that means that some application may not be able to run well (yet).
First thing you have to do before throwing Windows and jump to the Linux+Wine wagon is to check for the application you absolutely need on Wine Application Database; there you can find vital information on if the program can run well under Wine, or if it requires some tweaking in order to run, or eventually if does not run at all.
How to install Wine:
Assuming that you found on the Wine Application Database that your application run well (or fairly well for your need) and you have installed Linux on your machine (there are other critical considerations you should analyze before this step, but unfortunately this area is outside the scope of this article), let’s install Wine.
Before you can install Wine, the developers suggest to uninstall any previous version. I personally recommended that if you have installed Wine with an installer from sources different from the Wine’s official site (for example the Wine package bundled with your Linux distribution); if you downloaded Wine directly from the official site and you always stayed on par with the updates the uninstall should be unecessary. Anyway you can read the “Removing old Wine versions” article on the Wine official site.
Already complied and updated binary packages for Wine can be found at the WineHQ download page. The full source code is available for both the current Wine development tree and every Wine release here.
The download page contain links to HOWTO for all major Linux distribution regarding how install Wine on them, so for the sake of brevity I will not report them here.
Wine’s developers suggest that every time you are upgrade Wine you should run the wineprefixcreate command to ensure that you have all default registry values set.
How to install Windows applications
Once you have installed Wine, the first thing you have to do before installing the particular Windows program you need is to go back to the Wine Application Database and verify if there are particular notes on the installation process of your application and take note about them. I will state here the common scenario on installing any Windows application, but if you find that some of these notes actually give you the full process for installing your specific software, it is better for you if you follow these.
On normal circumstances the installation of a Windows application is identical of the procedure in Windows except (at least for my experience) that the CD-ROM autorun function does not work (so you have to manually navigate on the CD-ROM folder and launch the installer from there).
Basically you can just click on the installer executable and it will either automatically run under Wine or the system will shows you the classical prompt asking you which program to use to open the file (like the one for strange document files) and you should tell it to use Wine (the main binary is /usr/bin/wine); from there you can follow the install process as if you were using Windows.
Particular note is to be given to installers that use the Microsoft Installer system and that end with the “.msi” extension instead of the usual “.exe”; for those you have to open a terminal (the Linux counterpart of the Windows command prompt) navigate to the folder where the installer is located and run “wine msiexec /i xyz.msi” without quotes and where “xyz.msi” stand for the filename of the installer.
How to run Windows applications
Once the program is installed make sure you have fulfilled all the notes you found (if you did) regarding the install on the Wine Application Database.
In the most cases the installer should have placed the usual shortcut icon on the desktop, but you can find the application also on the Main Menu (the K menu on KDE, I don’t know the name on Gnome, but basically I’m referring the the Linux counterpart of the Start Menu in Windows) under the “Wine” folder; click that shortcut and your program should start as you have experienced on Windows.
In case the installer did not create any shortcut (very rare and usually because the installer wasn’t programmed to create any) you can create it by yourself; the command should be like the following:
env WINEPREFIX=”/home/[user]/.wine” wine “C:\[program location]\[program.exe]”
where [user] should be replaced with your Linux user account and [program location]\[program.exe] with the path to the program executable like it would have appeared on Windows.
You can also start your program from the console, but usually you should do that only when you want to grab eventual error messages related to the program (I will explain the reason on the next section); to do that do the following:
- Open the console;
- Go to “/home/[user]/.wine/drive_c/” directory (where [user] should be replaced with your Linux user account);
- If you do ls (the Linux counterpart of the “dir” command for the Windows command prompt) you should see different folders that are named like the folders you usually find in Windows;
- Go to the directory where your program is installed;
- Write “wine [program.exe]” and hit return.
You should see the window of your program opening, but if you ALT-TAB to the console you will find various messages related to the execution of the program.
From the now on, you should be able to use the program as usual.
How to troubleshoot the application
As I mentioned, Wine is not completed yet (Windows is made by many API), so it may happen that an application does not run smoothly as expected; it may shows errors, or have features that do not run as expected, or else.
In most cases these applications already have their problem listed on the Wine Application Database, so you may find information there how to fix them; if you find no information, it may be worth trying to ask (you can post messages on the Wine Application Database) since it may happen that a solution has been found, but it has not been posted yet. Eventually if it is you who have found a way to make an application work you should share it and therefore contribute to the evolution of Wine.
If you plan to request help on the Wine Application Database, first you should try to run the program from the console, as I explained in the previous section, so you can see more details on the eventual errors and you should copy them and paste on your message.
What if the application doesn’t work
Unfortunately, as some application has resolvable issue, some other application cannot run at all yet on Wine.
This article started on the assumption that, while you may want to try to migrate to Linux, you are holding to Windows exactly because of these applications that you cannot really work without and that are not available to Linux, therefore if this the case it would be better to wait some more time and check back the Wine Application Database from time to time.
What if the application was working, but has since broken in a new version of Wine
Wine is a large and complex project and it is developed by many programmer; while it usually allow the program to evolve faster and become better, sometimes an attempt to change a part of the program may cause another part of the program to break. This problem is known as “regressions”. Unfortunately this kind of bugs can only be found through intensive use of the program and since the developers do not have access to every Windows application in order to test every patch, it is the duty of the the community to report these regressions.
As every bug report, if you want to report it you should be prepared to include any information that may help the developers to triangulate the problem like , but not limited to, the last working version of Wine and which version didn’t, how you installed Wine (from source, binary packages, etc.), and which distribution (and relative version) of Linux you are using. Since the bug is specific of running a particular Windows program, you should fill the report on the Application Database page for that application.
Note that while the information you provided on the report are important to find the problem, the search is still not immediate and therefore it may happen that the bug takes quite some time to be fixed. If you would like to get the problem fixed sooner the only way is paradoxically to invest time with a “regression test”; a “regression test” is basically a hybrid version of the program based on the working version of Wine with the addition of just part of the modifications contained on the newest release; by keeping changing the modification included on this hybrid version it is possible to isolate the specific modification that created the bug. If you are willing to partecipate to a “regression test” you can follow this link.
Linux offer many benefits compared to Windows, but being a different Operative system also bring difficulties; of these difficulties one of the biggest is to be bound to a legacy application that does not natively run on Linux.
Wine is one of the best solutions of this problem, bringing back Linux on the rose of choices on how you want to set the computer serve you.
Wine’s Home Page: http://www.winehq.org/