NEN HELEN BOTERHAM AGAIN!!!
2.2 Installing Quake
Download the Necessary Files
All the necessary files for Linux Quake are available at id Software's ftp site, ftp.idsoftware.com. This site can be quite busy at times,so you may want to use one of these mirror sites instead:
* ftp.cdrom.com/pub/idgames/idstuff (California, USA)
* ftp.gamesnet.net/idsoftware (California, USA)
* ftp.linuxquake.com/lqstuff (Ohio, USA)
* ftp.stomped.com/pub/mirror/idstuff (Minnesota, USA)
* mirrors.telepac.pt/pub/idgames (Lisbon, Portugal)
* download.netvision.net.il/pub/mirrors/idsoftware (Haifa, Israel)
Create the Installation Directory ++
The first thing you'll need to do is decide where you want to install Quake. The "standard" location is /usr/local/games/quake. This is where the .rpm packages put Quake. If you choose to install somewhere else, please substitute the appropriate path wherever /usr/local/games/quake is mentioned.
Note to Redhat users: If you plan on installing QuakeWorld from the rpm packages, you should probably install Quake in /usr/local/games/quake, since the rpms install to this directory by default.
So go ahead and create the directory you'll install Quake in, and cd to it. The rest of these instructions will assume that this is your current directory.
mkdir /usr/local/games/quake
cd /usr/local/games/quake
Installing From a Quake CD
If you're installing from a Quake CD-ROM, read on. Otherwise you have permission to skip this section.
There are at least two versions of the Quake CD in circulation. I've got one from the early days that has Quake version 1.01 on it. Iv'e seen other CDs that contain version 1.06. You have 1.01 if you see files on your CD called quake101.1 and quake101.2. If instead you see a file called resource.1, you have a newer CD. Mount your Quake CD now and determine which version you've got. In the example below, replace /dev/cdrom and /mnt/cdrom with the device file and mount point appropriate for your sysem:
mount -t iso9660 /dev/cdrom /mnt/cdrom
ls /mnt/cdrom
* If you have a resource.1 file on your CD, you can skip ahead to the next bullet. For a version 1.01 CD, you'll need to download the Quake shareware package to update the .pak files after the installation. The last bullet in this section explains this.
o Concatenate the two resource files from your CD to a single file on your hard disk:
cat /mnt/cdrom/quake101.1 /mnt/cdrom/quake101.2 > resource.1
o Now continue on to the next paragraph, but when I refer to /mnt/cdrom/resource.1, you should use /usr/local/games/quake/resource.1 instead.
* Now it's time to extract the Quake files. The resource.1 file on your CD is really an lha archive (lha is a file compression and archiving format like zip or tar). We'll use the lha(1) command to extract it. If lha is not already installed on your system, you can get it from
ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.
lha e /mnt/cdrom/resource.1
When lha is done, your Quake directory will contain a bunch of new files. A directory called id1/ will also be created. The files in this directory are the only ones that are important for Linux Quake, so you can safely remove everything else. If you're totally new to Quake, or even if you're not, you may want to hang on to the *.txt files. On my system, I throw all the readmes that accumulate into a doc/ directory. So:
cd /usr/local/games/quake
mkdir doc
mv *.txt doc
rm -f *
* If you installed from a version 1.01 CD, now you need to overwrite your id1/pak0.pak file with the one from the Quake shareware version. Install the shareware version as described in Shareware Version Install, only install it in some temporary directory so you don't overwrite your real Quake files. When you've extracted all the shareware files, copy the id1/pak0.pak file from the temporary shareware directory to your /usr/local/games/quake/id1 directory. After that, you can erase the temporary shareware files.
That's it for installing from the CD. You can jump ahead to section " Installing the Linux Binaries" now.
The Quake data files are now installed. Move ahead to " Installing the Linux Binaries".
Shareware Version Install
The single-episode shareware version of Quake is freely available for download from id's ftp site. It has all the features of the full version, with a couple of major limitations: You can't play QuakeWorld with it, and you can't play custom or modified levels.
Installing the shareware version of Quake isn't really much different than installing from the CD.
See section Download the Necessary Files for the location of the shareware distribution. Download it and extract it to your Quake directory:
cd /usr/local/games/quake
unzip -L /wherever/you/put/it/quake106.zip
Now you've got (among others) a file called resource.1 that's really an lha archive (lha is a file compression and archiving format like zip or tar). We'll use the lha(1) command to extract it. If lha is not already installed on your system, you can get it from
ftp://sunsite.unc.edu/pub/Linux/utils/compress/lha-1.00.tar.Z.
lha e resource.1
When lha is done, your Quake directory will contain a bunch of new files. A directory called id1/ will also be created. The files in this directory are the only ones that are important for Linux Quake, so you can safely remove everything else. If you're totally new to Quake, or even if you're not, you may want to hang on to the *.txt files. On my system, I throw all the readmes that accumulate into a doc/ subdirectory. So:
cd /usr/local/games/quake
mkdir doc
mv *.txt doc
rm -f *
Now you're ready to install the Linux binaries.
2.3 Adding the Linux Binaries
Decide which of the three flavors of Quake you'd like to install:
* X11 Quake allows you to run Quake in a window on your X desktop. It's the least exciting client, but it's a great, safe way to test your installation.
* Squake is the SVGAlib Quake client. It runs full screen on your console.
* GLQuake is the OpenGL Quake client, the One True Way to play Quake if you have a 3Dfx accellerator card.
Download the packages you want (see section Download the Necessary Files) and extract them to your Quake directory like so:
cd /usr/local/games/quake
tar -xzf XXXX-i386-unknown-linux2.0.tar.gz
2.4 Setting Permissions
Quake and QuakeWorld servers can be run by any user. The Quake clients, however, need access to your sound and graphics cards, which requires privileges that normal users don't have. One (bad) way to deal with this is to always run Quake as root. Responsible system administrators will cringe at this filthy suggestion. Making the Quake binaries setuid root is a more acceptable solution. Quake can then be run by regular users and still have the privileges it needs to access the sound and graphics devices. Setuid presents a security risk, though. A clever user could exploit a bug or security hole in Quake to gain root access to your system. Of course, if you don't run a multi-user system, this is may not be a big concern.
squake is the only Quake client that must be run with root permissions. With a little work, you can run the X and GL clients without setuid. Running X and GL games without setuid in the Tips and Tricks section tells how to make this work.
If you plan to run squake, make it setuid root with the following commands:
chown root squake
chmod 4755 squake
If you've decided it's ok to run quake.x11 and glquake setuid root on your system, you can repeat the above commands for these binaries as well.
2.5 X11 Quake
If you installed the X11 client, now's a good time to try it out. You may need to do further configuration for glquake and squake, but at this point quake.x11 should be ready to go.
cd /usr/local/games/quake
./quake.x11
If all is well, a small Quake window should appear with the first demo running in it. You should hear sound effects and possibly music, if your CD is in the drive. If any of this fails to occur, please see the Troubleshooting section for help.
2.6 SVGAlib Quake
Both squake and glquake require SVGAlib to run (glquake uses SVGAlib to process keyboard and mouse input, in case you're wondering). SVGAlib comes with most modern Linux distributions, and must be properly configured before squake or glquake will run correctly.
libvga.config is SVGAlib's configuration file. On most systems you'll find it in either /etc or /etc/vga. Make sure the mouse, monitor, and video card settings in this file are correct for your system. See the SVGAlib documentation for more details.
If you don't already have SVGAlib on your system, download it from the location mentioned in the files section above.
If you have a RedHat 5.x or other glibc-based Linux distribution, see Glibc, RedHat 5.x, Debian 2 considerations in the Troubleshooting/FAQs section for important information about compiling libraries for use with Quake. A precompiled libc5 SVGAlib binary is available at
http://sunsite.unc.edu/pub/Linux/libs/graphics/svgalib-1.3.0.libc5.bin.tar.gz for those who don't want to deal with the hassle of compiling for libc5.
You should run squake from a virtual console. It won't run from X unless you're root when you start it. And running a game as the root user is something that should be avoided. So if you're in X, do a CTRL+ALT+F1, login and then:
cd /usr/local/games/quake
./squake
Running SVGA and GL games from X in the Tips & Tricks section below explains how to launch SVGA and GL Quake from X without manually switching to a virtual console.
2.7 GLQuake
Hardware-accelerated OpenGL Quake is Quake the way God intended it to be. There is no substitute, and once you've experienced it there's no going back.
To run glquake, you need a 3D card with the Voodoo, Voodoo2 or Voodoo Rush graphics chipset on it. There are specific issues to be dealt with if you have a Voodoo Rush card, and I won't go into them now because frankly, I wouldn't know what I was talking about. A future version of this HOWTO will cover Rush issues (If somebody wants to write about Voodoo Rush issues, I'll gladly include it here).
The SVGAlib, Glide, and Mesa libraries must all be installed and configured properly on your system for glquake to work. The following sections will very briefly cover what you need to do to get them going.
Bernd Kreimeier's (
[email protected]) Linux 3Dfx HOWTO (
http://www.gamers.org/dEngine/xf3D/howto/3Dfx-HOWTO.html) is good source for further information.
The 3dfx.glide.linux newsgroup on the 3dfx news server (news.3dfx.com) is another good source of information about the intersection of Linux, glide, Mesa and Quake.
SVGAlib
glquake uses SVGAlib to get input from the mouse and keyboard, so you'll need to configure it as outlined in section SVGAlib Quake.
Glide ++
Glide is a library that provides an API for programming 3Dfx based cards. If you want the Mesa graphics library to use your 3Dfx card, you've gotta have it.
Do NOT use the Linux Glide library distributed at 3Dfx's web site. It's more than a year out of date. You're bound to have problems if you try to use it. The latest version of glide can always be found at
http://glide.xxedgexx.com/3DfxRPMS.html. Select the package(s) appropriate for your system, and install according to the instructions on the web page.
Note that unless you download the 3Dfx device driver package in addition to the Glide library, you will only be able to run Glide applications (like GLQuake) as root. Install the /dev/3dfx module and you can play GLQuake as a regular user. PentiumPro/Pentium II users have an additional incentive for downloading this driver: it can dramatically increase your framerate. The driver enables support for MTRRs, a memory-caching feature of these CPUs. See
http://glide.xxedgexx.com/MTRR.html for a better explanation of this feature.
Once you have glide installed, try out the test program that comes with it. Remember this program: it's a good way to reset your display if you ever have a glide application (like GLQuake) crash and leave your screen switched off. NOTE: run this test from a VC, not X! It's possible for the test app to lose mouse and keyboard focus in X, and then you'll have no way of shutting it down.
/usr/local/glide/bin/test3Dfx
Your screen should turn blue and prompt you to hit any key. After you press a key you should be returned to the prompt. 3dfx.glide.linux on 3dfx's news server (news.3dfx.com) is a great source of information for Linux glide-specific problems.
Mesa
Once glide's installed, you need to install Mesa, a free OpenGL implementation by Brian Paul (
[email protected]). Luckily, you won't have to look far, because Mesa 2.6 is included with the QLQuake & QuakeWorld binaries. All you have to do is move it to the right place:
cd /usr/local/games/quake
cp libMesaGL.so.2.6 /usr/local/lib
ldconfig
The RedHat distribution comes with a (IMO) broken ld.so configuration. /usr/local/lib is not part of ld.so's search path by default, so anything you install there won't get used. You can remedy the situation by adding the line /usr/local/lib to your /etc/ld.so.conf file, or including /usr/local/lib in your $LD_LIBRARY_PATH. Alternatively, you could install all new libraries someplace like /lib, but this approach seriously offends my tidy nature.
If you want to upgrade Mesa to a more recent version (Mesa 3.0 is the most recent version as of this writing), you can download the latest from
ftp://iris.ssec.wisc.edu/pub/Mesa If you have a RedHat 5.x or other glibc-based Linux distribution, see Glibc, RedHat 5.x, Debian 2 considerations in the Troubleshooting/FAQs section for important information about compiling libraries for Quake.
After you've built it according to the instructions, you will have to do two things:
* Remove your old Mesa installation. If you previously installed a libMesaGL.so.2.6 as described above, you must remove it or Quake may not use the new version.
cd /usr/local/lib/
rm -f libMesaGL.so.2*
* If the new Mesa has a major version number that's greater than 2, you need to create a link to it with the name libMesaGL.so.2:
cd /usr/local/lib/
ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
ldconfig
Now switch to a VC (CTRL+ALT+F1) and start glquake.
cd /usr/local/games/quake
./glquake