Project 19B: Running Windows Programs Under Linux with Wine (Optional)

 < Day Day Up > 



Despite the fact that there is a Linux equivalent to most of the Windows programs that people use or need, there may be one or two programs that you will come to miss. For me it’s a freeware version of the Austrian card game Schnapsen. Fortunately, it is possible to run some Windows applications from within Linux with the help of a program called Wine.

The folks at Wine seem keen on pointing out that Wine is not a Windows emulator, preferring to call it a Windows compatibility layer. Whatever way you choose to look at it, its function is to allow you to run Windows apps without having Windows installed on your machine. That said, it is only fair to point out that Wine is still a work in progress. It works fairly well with some programs and not at all with others. There are some commercial versions of Wine that might work better in some cases (check out the links on the Wine homepage —www.winehq.org), but there’s no harm in giving the free official version a try first, especially now that you are about ready to move beyond non-geek status.

19B-1: Downloading and Installing Wine and WineSetuptk

Wine is not included in your Fedora Core system, but you can get it quite easily by going to www.winhq.org/site/download and clicking the Sourceforge icon under the Official Wine Versions heading. Once on the Sourceforge page, scroll down to the RedHat Packages section and then download the version appropriate for the system and processor you are using. For example, if you are running Fedora Core I on a Pentium II (or newer) machine, you would download wine-20040121-1fc1winehq.i686.rpm.

Another file that you will want to download is WineSetuptk, which is a graphical setup utility for Wine. To get the file, go back to the page where you started and scroll even further down to the Support Files section. Once there, download the winesetuptk RPM file (not the tarball). Once both files are on your hard disk, install Wine first and then WineSetuptk by simply double-clicking each file and then following the usual procedure you learned in Chapter 8.

19B-2: Setting Things Up

There isn’t really much you need to do to get Wine set up — WinSetuptk does most of the work for you. Run WinSetuptk by typing winsetuptk in either a terminal window or the Run Application dialog (Main menu > Run Application), after which the Wine Configuration Wizard will appear (Figure 19-12).

click to expand
Figure 19-12: Setting up Wine with WinSetuptk

The wizard is basically a simple three-click write-nothing process. Just click Next in the first screen, Next in the second screen, Finish in the third screen, and Wine will then create a sub-folder within your Home folder that acts as a pseudo Windows partition (/home/username/.wine/fake_windows), complete with all the folders you would normally find on a real Windows C: drive. If you are a dual booter, you can choose to use your real Windows partition instead of creating a fake one in the second screen of the wizard, but I would be reluctant to recommend doing that, at least not until you know what you’re doing.

19B-3: Installing and Running a Windows Program Under Linux

Once Wine is installed and set up, it really can’t do anything unless you try to run a Windows program. That being the case, in this part of the project you are going to download, install, and run a Boggle-like game from the Windows world called BookWorm Deluxe (Figure 19-13). BookWorm Deluxe is one of the Windows games available from PopCap Games (www.popcap.com), many of which seem to work fairly well under Linux with Wine.

click to expand
Figure 19-13: The Windows game BookWorm running under Wine

You should be aware that the games that you download from PopCap Games are all trial versions, not freebies, which means that you will eventually have to pay for any game you should want to keep using beyond the number of free games allowed. We have one foot in the Windows world right now, after all. For the purpose of this project, however, this fact should not be of great concern to you — you are just learning how to do things, and using some pretty cool games as your learning tools. And after all, who knows? You might find the games cool enough that you actually want to pay for them. Even if you don’t begin to feel that way, you can still play the free online Java versions of the games (available at the same site) if you installed the Java Runtime Environment and the Mozilla Java plugin earlier in this chapter.

To download BookWorm Deluxe, go to the PopCap Games site (www.popcap.com), and click the Deluxe Games button on the left side of the window. Once on the Deluxe Games page, simply click the Download Free button next to BookWorm. Once the download is complete, you will have a file called Bookworm_setup.exe in your Home folder. Double-click that file and Wine will spring to action for the first time as it runs the Windows installer (Figure 19-14) for BookWorm Deluxe.

click to expand
Figure 19-14: A Windows installer running under Wine.

All you really need do to start the installation process is click Next. The installer will create a BookWorm folder within a PopCap Games folder within the Program Files folder of your fake_windows partition. As the installer nears the end of the process, you will get a warning message telling you that the installer couldn’t create some link, after which you will be told that the installation has been aborted and that you probably cannot run BookWorm Deluxe. Just ignore all that, as all will be fine (in this case, at least).

Now you can run BookWorm Deluxe. The most straightforward way of doing this is to head over to your new fake_windows partition. You can do this by opening a Nautilus window and typing /home/username/.wine/fake_windows/Program Files in the Location box of that window and then hitting ENTER. Once there, double click the PopCap Games folder, and then the BookWorm Deluxe folder within that. Finally, just double-click BookWorm.exe and you will soon be impressing all those around you with the great depth and breadth of your vocabulary.

If you’re interested in what other applications are supposed to run under Wine, have a look at the Wine application database at http://appdb.winehq.org, which also tells what version of Wine a given application is known to work under, and what limitations, if any, a program has when running under Wine.



 < Day Day Up > 



Linux for Non-Geeks. A Hands-On, Project-Based, Take-It-Slow Guidebook
Linux for Non-Geeks: A Hands-On, Project-Based, Take-It-Slow Guidebook
ISBN: 1593270348
EAN: 2147483647
Year: 2003
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net