To install Quake II on your Linux system, you'll need some flavor of the official Quake II distribution from id. This will be either the retail Windows CD-ROM that you bought at your favorite software store, or the demo version you downloaded from the net. See Download the Necessary Files for details on acquiring the demo version. Alternatively, if you've already got Quake installed on a Windows machine, you can use the relevant files from that installation.
You will need, as a bare minimum, the following:
All the necessary files for Linux Quake II 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:
The Quake II files mentioned in in this section are:
Other software mentioned:
The first thing you'll need to do is decide where you want to install
Quake II. The "standard" location is
This is where the
.rpm packages put Quake II. If you choose
to install somewhere else, please substitute the appropriate path wherever
/usr/local/games/quake2 is mentioned.
So go ahead and create the directory you'll install Quake II in, and cd to it. The rest of these instructions will assume that this is your current directory.
mkdir /usr/local/games/quake2 cd /usr/local/games/quake2
Place your Quake II CD in your CD ROM drive, and mount it:
mount -t iso9660 /dev/cdrom /mnt/cdrom
If your CDROM is typically mounted elsewhere, substitute its location
/mnt/cdrom. If you're not sure where your CDROM is
mounted, please see the documentation for your particular
There'll be a bunch of unnecessary Windows files hanging around that you can safely delete:
cd /usr/local/games/quake2 cp -r /mnt/cdrom/Install/Data/* .
rm -f /usr/local/quake2/*.dll rm -f /usr/local/quake2/quake2.exe rm -f /usr/local/quake2/baseq2/gamex386.dll
Note that this doesn't mean you have to mount your Quake II CD every time to want to play Quake II. If the game can't load the videos, it just won't display them.
cd /usr/local/games/quake2 mkdir baseq2 cp /mnt/cdrom/Install/Data/baseq2/pak0.pak baseq2 cp -r /mnt/cdrom/Install/Data/baseq2/players baseq2 ln -s /mnt/cdrom/Install/Data/baseq2/video baseq2/video
If you have Quake II installed under Windows on a different machine, you
can transfer the files in
quake2\baseq2\ to your Linux system
via FTP or some other mechanism. Keep in mind that the filenames on your
Linux system must be in lower case for Quake II to find them, so you may
have to rename them after the transfer. Also note that it may be
necessary to delete your Windows installation after you do this to remain
in compliance with the terms of id's software license. It's not my fault
if you do something illegal.
If your Windows and Linux systems are on the same machine, you have two
options: copy the files from your Windows partition to your Linux
partition, or link to the necessary files from Linux. Both options will
work equally well. You'll just save a lot of disk space when you link
instead of copy.
As usual, replace
/win95/games/quake2 in the following examples
with the correct path to your Windows partition and Quake II installation.
cd /usr/local/games/quake2 cp -r /win95/games/quake2/baseq2 .
This second method requires that the Windows partition you're linking to be writeable by users, which may not be appropriate for all systems. By making your Windows partition writeable, you are giving all users the opportunity to destroy your entire Windows installation. If that's ok with you, modify your
cd /usr/local/games/quake2 ln -s /win95/games/quake2/baseq2 .
/etc/fstabto mount the Windows partition with the options umask=002,gid=XXX, where XXX is the group id number of the "users" group. Look in
/etc/groupfor this information. When
fstabis updated, umount and re-mount the Windows partition and you're done.
You're done installing the Quake II data files. Move ahead to " Installing the Linux Binaries".
id Software has a freely available demo version of Quake II at their ftp site. It's a 40 megabyte download. The demo includes all features of the full version, including multiplayer, but it only comes with three levels, so it may be difficult to find a server to play on.
See the section Download the Necessary Files above for the location of the Quake II demo. Download it and place it in your Quake II directory.
The demo distribution is a self-extracting zip file (it's self-extracting in other OS's anyway). You can extract it with the unzip(1) command, which should be included in most modern distributions. If you don't have unzip, you can download it from the location listed in the Download the Necessary Files section.
cd to your Quake II directory and extract the archive:
cd /usr/local/games/quake2 unzip q2-314-demo-x86.exe
Now we've got to delete some things and move some other things around:
rm -rf Splash Setup.exe mv Install/Data/baseq2 . mv Install/Data/DOCS docs rm -rf Install rm -f baseq2/gamex86.dll
The Quake II demo is now installed. You just need to add the Linux binaries.
There are four Linux Quake II packages available for download:
Install just one of these packages. Each contains the same files, they're just linked against different libraries. Redhat 5.x users should choose the the glibc rpm package. Users of glibc based systems without rpm support should use the glibc tar package. The libc5 rpm is for Redhat distributions prior to 5.0 and other distributions that use the rpm package format. The libc5 tar.gz package is for Slackware and everyone else.
See the Download the Necessary Files section for the location of the Linux Quake II files.
Installation of the rpm packages should be as simple as:
su root rpm -Uvh quake2-xxxxx.i386.rpm
Rpm may complain that it can't find
Glide library is only necessary if you have a 3Dfx card and want
to run Quake II in GL mode. If you don't plan to use the GL
mode, you can override the glide dependency with the
su root rpm -Uvh quake2-xxxxx.i386.rpm --nodeps
To install, just untar the file in your Quake II directory. Do it as root so the proper file permissions get set:
cd /usr/local/games/quake su root tar -xzf qwcl2.21-i386-unknown-linux2.0.tar.gz
If you ran
tar as root when installing
the Quake II package on your system, the file permissions should
be properly set already. The
quake2 executable was
installed setuid root so that it can access the graphics devices
on your system. For security, the
libraries are owned by root and writeable only by him. If root
doesn't own the libraries, or they're world writeable,
quake2 will refuse to run.
If you plan to only run Quake II with the GL or X renderers, your
quake2 doesn't need to be setuid root. See
Running X and GL games without setuid in
the Tips and Tricks section below for information on running Quake
II without root permissions.
For security reasons, there is a
quake2.conf file, which
tells Quake II where to find the rendering libraries (
it needs. It contains only one line, which should be
the path to your Quake II installation. Quake II looks for this
/etc. If you installed Quake II from an
.rpm file, this file was installed for you. If you
installed from a
.tar package, you need to create it
su root cd /usr/local/games/quake2 pwd > /etc/quake2.conf chmod 644 /etc/quake2.conf
Quake II should be ready to run under X now. Give it a try:
cd /usr/local/games/quake2 ./quake2 +set vid_ref softx
If all is well, after a pretty significant pause, a small Quake II window will 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 section Troubleshooting for help.
You need SVGAlib installed and configured if you're going to use either the ref_soft or ref_gl renderers. (Quake II uses SVGAlib to process keyboard and mouse input, in case you're wondering why you'd need it for the GL renderer). SVGAlib comes with most modern distributions, and must be properly configured before Quake II will run correctly outside of X.
libvga.config is SVGAlib's configuration file. On
most systems you'll find it in either
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.
You should run Quake II from a virtual console when using the ref_soft or ref_gl renderers. It won't run from X unless you're root when you start it, and that's not advisable. So if you're in X, do a CTRL+ALT+F1, login and then:
cd /usr/local/games/quake2 ./quake2 +set vid_ref soft
Running SVGA and GL games from X in the Tips & Tricks section below explains how to launch SVGA and GL Quake II from X without manually switching to a virtual console.
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 Quake II in GL mode, 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
quake2 to work. The
following sections will very briefly cover what you need to do to get
Bernd Kreimeier's ( firstname.lastname@example.org) 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.
Quake II uses SVGAlib to get input from the mouse and keyboard, so you'll need to configure it as outlined in section SVGAlib Renderer.
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 Quake II) as root. Install the
/dev/3dfx module and you
can play Quake II 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
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 Quake II) 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.
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.
Once glide's installed, you need to install Mesa, a free OpenGL implementation by Brian Paul (email@example.com). Luckily, you won't have to look far, because Mesa 2.6 is included with the Quake II binaries. All you have to do is move it to the right place:
cd /usr/local/games/quake2 cp libMesaGL.so.2.6 /usr/local/lib ldconfig
The RedHat distribution comes with a (IMO) broken
/usr/local/lib is not part of
search path by default, so anything you install there won't get used.
You can remedy the situation by adding the line
/etc/ld.so.conf file, or including
$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:
libMesaGL.so.2.6as described above, you must remove it or Quake II may not use the new version.
cd /usr/local/lib/ rm -f libMesaGL.so.2*
cd /usr/local/lib/ ln -s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2 ldconfig
With Quake II version 3.19, an alternative to the Mesa library is
lib3dfxgl.so is a mini-GL driver optimized
for Quake that provides better framerates than Mesa.
This is a port of a driver that 3Dfx developed for Quake
under Windows. It's included in the Quake II package, and there's
no reason you shouldn't use it.
lib3dfxgl.so requires that the Glide library
be installed in order to access your 3Dfx card.
With version 3.20, using this driver instead of Mesa is much easier
than it was previously. There's a new CVAR,
you set to indicate which GL driver
quake2 should use. To
run with the
lib3dfxgl.so driver, do:
./quake2 +set vid_ref gl +set gl_driver lib3dfxgl.so
To run with Mesa, do:
./quake2 +set vid_ref gl +set gl_driver libMesaGL.so
Note that the
.so files you refer to must exist in your
quake2 directory. A symbolic link is fine if, say, your Mesa library
/usr/local/lib and you don't want to have two copies
ref_glx.so is linked against standard OpenGL libraries
instead of Mesa. This allows Quake II to run on other 3D
hardware that is supported by other OpenGL implementations. At
this time, I dont' know of any OpenGL implementations that
support hardware other than 3Dfx, but this renderer ensures that
when they appear, we'll be able to play Quake II with them.
Use of the GLX interface also removes GL Quake II's dependency on SVGAlib for keyboard and mouse input.
This is a GLX application, and as such, must be run from X.
You can use this client with Mesa/3Dfx if you install Mesa and
Glide as explained in the previous section, then set the
$MESA_GLX_FX environment variable to "fullscreen" before
export MESA_GLX_FX=fullscreen ./quake2 +set vid_ref glx +set _windowed_mouse 1
+set _windowed_mouse 1 option? Remember that
this is an X application which happens to use your 3Dfx card.
Even though the display takes up your entire screen, Quake II is
stil running in a window. This means that if you're not
very careful, you could move the mouse pointer outside
the Quake II window, and Quake II will suddenly stop responding
to mouse and keyboard input.
+set _windowed_mouse 1
avoids this problem by telling
quake2 to grab the mouse
and not let it move outside its window.
This section will cover command line options that are specific to the Linux version of Quake II. There are plenty of other Quake II options, but they're beyond the scope of this HOWTO. Check out some of the sites listed in section General Quake Information for this kind of information.
These are actually cvars (client variables) that you can set in the Q2
console, but it makes the most sense to set them on the command line.
Set them with
+set on the command line, like:
./quake2 +set cd_dev /dev/hdc
Name of the CD-ROM device.
Disable CD audio if value is nonzero
Set sound bit sample size. Default is 16.
Set sound sample speed. Usual values are 8000, 11025, 22051 and 44100. If set to zero, causes the sound driver to attempt speeds in the following order: 11025, 22051, 44100, 8000.
Indicates stereo or mono sound. Defaults to 2 (stereo). Use 1 for mono.
Don't do any output to stdout. Use this if you don't want all the console output dumped to your terminal.
Linux's strength as an internet server make it a perfect platform for running an internet Quake II server. This section will touch on the basics and Linux-specific aspects of starting up a Quake II server. Try http://www.3dgw.com/hellsgates/serverguide.htm for more detailed Quake II server setup information.
You can start a Quake II "Listen" server from within the game via the Multiplayer menu. This allows you to host a game and participate in it at the same time.
To start a Listen server, start Quake II, bring up the Quake II menu with the ESC key, and select Multiplayer. It should be pretty self-explanatory from there.
For a permanent, stand-alone Quake II server that needs to run without constant attention, using the Listen server is impractical. Quake II has a Dedicated server mode that is better suited to this type of use. A dedicated server is started from the command line and uses fewer system resources than a Listen server because it doesn't start the graphical client piece at all.
To start a dedicated server, use the command line option
dedicated 1. You can set additional server parameters either on the
command line or in a config file that you
+exec on the command
line. Your config file should reside in the
A few common server options are listed below. To set options on the
command line, do
+set fraglimit 30. Options are set the same way
in a config file, only you don't want the
+ before the
set. Invoke your config file like this:
Number of frags required before the map changes
Time in minutes that must pass before the map changes
The name of your Quake II server. This is an arbitrary string and has nothing to do with your DNS hostname.
The maximum number of players that can connect to the server at once.
For enough Quake II console and command line information to choke a horse, see Farenheit 176 ( http://www.planetquake.com/f176).
Quake II modifications like Capture the Flag, Jailbreak, and Lithium
II are very popular extensions of the original Quake II game. Some
mods reside entirely on the server (Lithium), and some also require changes
to your client (CTF). For server only mods, you just connect normally
and play. Client-side mods require you to install additional files in
quake2 directory before you can play.
Generally, installation of a client-side mod consists of just downloading the client package and upacking it in your Quake II directory, but you should refer to the mod's documentation for specific details. It may be necessary to download a Linux-specific package in addition to the main (Windows) client package. Also be aware that all mods may not be available for Linux.
Client-side mod packages usually contain a new
file and one or more
.pak files. Other new files may be
included as well. These new files will be installed in a subdirectory
below your Quake II directory. Use
+set game mod-dir
on the command line to run the mod. Rocket Arena 2, for example, gets
installed in a directory called
arena. To play RA2,
your would start your client like so:
./quake2 +set game arena
Since this is by far the most popular variation of multiplayer Quake II, I've included specific instructions for installing this mod. Capture the Flag for Quake II is available from id's ftp site. Download it, then install like so:
cd /usr/local/games/quake2 mkdir ctf cd ctf unzip -L /wherever/you/put/it/q2ctf102.zip
Start Quake II with
+set game ctf to play CTF.
Running a Quake II mod on a server isn't much different than running one
on the client side. Generally you'll need to install
server.cfg files in a new subdirectory and then start your
Where XXXX above is the name of the mod's new subdirectory. The exact procedure will vary from mod to mod, of course. See the mod's documentation for specific details.
./quake2 +set game XXXX +set dedicated 1 +exec server.cfg
The entire game, with the exception of the engine itself, resides in a
gamei386.so. Quake II mods are created by
changing the contents of this file. The C source is freely available
Download the Necessary Files above)
for anyone to download and modify.
After you've downloaded the source, here's how to get started with it:
cd /usr/local/games/quake2 mkdir mymod cd mymod gunzip /wherever/you/put/it/q2src320.shar.Z sh /wherever/you/put/it/q2src320.shar
You'll be presented with a bunch of legalese that you must answer
yes to, then the game source will be extracted. Building a new
gamei386.so out of these sources is accomplished with a simple
make. You can run Quake II with the newly compiled library like
cd /usr/local/games/quake2 ./quake2 +set game mymod
Not too exciting yet, since what you just built is identical to the
gamei386.so, but this should be good information for
aspiring mod authors.
/mnt/cdromand Quake II is installed in
If you want to install the video sequences:
cd /usr/local/games/quake2 cp -r /mnt/cdrom/Data/all/* xatrix/ rm -f xatrix/gamex86.dll
Play The Reckoning like this:
cp -r /mnt/cdrom/Data/max/xatrix/video xatrix
cd /usr/local/games/quake2 ./quake2 +set game xatrix
/mnt/cdromand Quake II is installed in
If you want to install the video sequences:
cd /usr/local/games/quake2 cp -r /mnt/cdrom/Data/all/* rogue/ rm -f rogue/gamex86.dll
Play Ground Zero like this:
cp -r /mnt/cdrom/Data/max/rogue/video rogue
cd /usr/local/games/quake2 ./quake2 +set game rogue