Project 8A: Working Directly with RPM Packages

 < Day Day Up > 



If all that information I just gave you about RPMs seems a bit much, don’t worry. Installing RPM packages is quite an easy task. Usually, you can install an RPM package simply by double-clicking the RPM package file. In this project, you will get a chance to install four RPM packages in this manner.

8A-1: Installing Skoosh

Let’s start out this project by installing a simple little sliding-tile puzzle game called Skoosh (Figure 8-1). Skoosh is not included with Fedora Core, so you will have to download it yourself. You can do this by going to http://dag.wieers.com/ packages/skoosh. Once there, download the most recent file appropriate for the version of Linux you are running (e.g., rh90 for Red Hat Linux 9.0 or rhfc1 for Fedora Core 1, and so on) by simply clicking on the file name. The Skoosh file only weighs in at about 150KB, so the entire download process should be over very quickly.


Figure 8-1: The sliding-tile puzzle game, Skoosh

Once the Skoosh RPM file is on your hard disk, you are ready to install it. To do this, just double-click the Skoosh file. You will then be prompted for your root password, so type that in and click OK. A completed System Preparation window will then appear, telling you how many packages will be installed and how much disk space will be used when the installation is completed (Figure 8-2). To continue, click Continue.

click to expand
Figure 8-2: Preparing to install Skoosh

A progress bar will show how things are coming along during the rather short installation period, and when it’s all over. . . pffftt, the progress window will dis- appear, and all will be right with the world. Pretty easy, isn’t it!

Once Skoosh is installed, you can run it by going to the Main menu and selecting Games > Skoosh Tile Puzzle. By the way, if you prefer using an image of your own to the one that comes with Skoosh, you can do so by going to the Settings menu and selecting Preferences. Once in the Skoosh Preferences window, click the Browse button to navigate to the location of the image you wish to use.

8A-2: Installing Frozen-Bubble

So far everything has been quite easy. Unfortunately, this isn’t always the case; sometimes you will find that the RPM package you are trying to install contains system dependencies that your system is not set up to handle. To illustrate this point, let’s look at the Frozen-Bubble game.

Frozen-Bubble (see Figure 8-3) started out as a standard game in the Mandrake Linux distribution, but because of its popularity it made its way to SuSE and even Windows. It is a pleasant game with cool graphics and music. It is also very attractive, in that you just can’t lose. Unlike other arcade-style games, Frozen-Bubble lets you do a game level over and over and over and over until you get it right.

click to expand
Figure 8-3: Playing Frozen-Bubble

Frozen-Bubble and Perl-SDL can both be downloaded from http://freshrpms. net/packages. When you go to that page, locate and click the link for the version of Linux you are using. Once on the package page, look at the list on the left of the page and click the frozen-bubble link. This will bring you to the download page. To download the file, right-click the tiny floppy disk icon near the top of the page, and select Save As in the pop-up menu. Once you’ve done that, look at the list on the left side of the page again, and download the file perl-SDL using the same procedure.

Installing Frozen-Bubble and Perl-SDL

Installing the two files is very simple. However, if you install Frozen-Bubble before Perl-SDL, you will experience what is often referred to as “dependency hell.”

To see what I mean (don’t worry, nothing bad will happen), double-click the Frozen-Bubble RPM file, and the Package Manager will do its usual dependency search. In this case, it will find that your system is lacking the Perl-SDL package, and it throws up a window telling you so (see Figure 8-4). In order to get around this problem, close the warning window by clicking OK, and then just double- click the Perl-SDL file and install it. Once Perl-SDL is installed, go on and install Frozen-Bubble in the same manner.

click to expand
Figure 8-4: The Package Not Found warning window

In the case of Frozen-Bubble, there is only one extra file needed, but sometimes there are more. Worse yet, sometimes some of those required files that you download and try to install have dependencies of their own — the truly hellish scenario. Of course, as these dependency files might be required by other RPM packages you try to install in the future, you may well find that this dependency problem will gradually lessen for you over time.

Running Frozen-Bubble

Once you have installed the two files, you can play Frozen-Bubble by going to the Main menu and selecting Games > More Games > Frozen Bubble. That’s all there is to it; unless you end up playing the game until the middle of the night (and coming in to work late as a result), you will be more than pleased with the results of this project.

I should mention here that you cannot use your mouse in Frozen-Bubble. Once the game starts, you can begin playing a game by pressing ENTER. After that, use the left and right cursor keys to aim your ball, and then use the up cursor key to shoot it. To quit the game, press the ESC key once, which will bring you to the high scores window where you can input your initials. Once you are done with that, press ENTER (or press the ESC key again to skip over it), which will bring you back to the opening screen. Finally, hit ESC again, and the game will close.



 < 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