Howto install Quake 3 Arena on Xubuntu
Posted on Friday, May 29, 2015 by TheBlackzone
Quake 3 Arena (Q3A for short) has been one of my favorite computer games and I guess I played it just as much as the original Quake game. Recently I fell into the mood to play it again and decided to install it on my Linux Desktop PC. The general process of the installation is quite straightforward, but there are some pitfalls…
Update September 2020 - Please read first
A recent email I received regarding this post had me revisiting it in order to see how much of it still applies to more recent versions of Linux. Before I proceed, be aware that these days a much more comfortable solution is available making the process I described in my post completely obsolete.
Nowadays most Linux distribution include a version of ioQuake3, an improved version of the original Quake 3 engine. While still providing full compatibility with the original game, it includes lots of bugfixes (especially, the sound issue described in this post) and many new features.
Installing ioQuake3 just takes a simple
sudo apt install quake3
or
sudo apt install ioquake3
command and you are ready to go.
That being said, the procedure I described in my post still works, but got a little more complicated when it comes to the "no sound" issue. The original source of the "et-sdl-sound" hack is no longer available and you have to resort to the source code of it that is hosted on github.
Since the github repository isn't very verbose on how to build the program, here's a brief description how to do it (you need a GCC C++ build environment set up):
First, get source by cloning the repository
git clone https://github.com/adlerweb/et-sdl-sound
Install the prerequisites:
sudo apt install gcc-multilib g++-multilib sudo apt install libc6-dev-i386 sudo apt install libsdl1.2-dev
Finally,
cd et-sdl-sound make
will build the required file "quake3-sdl-sound" (amongst others).
If building from source isn't your cup of tea, ask a friend to help you out. I am unable to provide further assistance on this topic as I recommend to use ioQuake3 anyway.
(End of update note)
The Linux version of Q3A has been around since the game came out in December 1999 and the game binaries as well as the game files of the demo version can be freely downloaded. In order to play the full game, however, you need the original retail CD of the game.
The installation of the game is pretty straightforward, except for a pesky sound issue and the fact that you need some additional libraries because you want the game to run in a 64-bit environment.
This short howto is mainly intended for my own reference in case I need to install the game again. I hope it is helpful to others, but don't blame me if it doesn't work whith your setup or things go wrong. As always, everything you do is at your own risk.
That said, let's go...
Oh, and just in case you are interested in the hardware I installed to game on: I'm using a standard PC with Intel i7 processor, a GeForce GTX 660 graphics card, Intel on-board audio and 8 GB RAM. As the title suggests the system is running Xubuntu Linux 14.04, 64-bit (x86_64).
Installation
01 - Get the Point-Release package
This package includes the game binaries as well as the demo game files. Download it from the id Software FTP server with
EDIT 2018-10-04: id Software's FTP server seems to be down so you need to search for a mirror using your favorite search engine. For your convinience, here's one.
wget ftp://ftp.idsoftware.com/idstuff/quake3/linux/linuxq3apoint-1.32b-3.x86.run chmod +x linuxq3apoint-1.32b-3.x86.run
02 - Prepare for installation
Since we are on 64-bit Linux and the package is made for an 32-bit environment, we cannot install the package directly. If you try you'll see an error like
This installation doesn't support unknown on Linux / x86_64
So, to fix this let's unpack the Point-Release with
./linuxq3apoint-1.32b-3.x86.run --target ./q3install
The above error message will occur anyway, but the installation files remain unpacked in the q3install
folder.
Now we need to edit the setup file:
cd q3install vim setup.sh
Use your favorite editor instead of vim
if you like.
Within the function DetectARCH
line 33 needs to be changed from
i?86 | i86*)
to
i?86 | i86* | x86*)
03 - Install
Before we proceed we need some additional libraries, since Q3A is an 32-bit application and we are in an 64-bit environment
sudo apt-get install gcc-multilib sudo apt-get install libx11-6:i386 sudo apt-get install libxext6:i386 sudo apt-get install freeglut3:i386
Now execute
sudo ./setup.sh
and answer the questions:
Do you agree with the license? [Y/n] => Y Please enter the installation path [/usr/local/games/quake3] => ENTER Please enter the path in which to create the symbolic links [/usr/local/bin] => ENTER Option: 'Quake III: Team Arena' ? [Y/n/?] => N Option: 'Dedicated server' ? [Y/n/?] => N Option: 'PunkBuster client/server files' ? [Y/n] => Y Do you agree with the license? [Y/n] => Y Do you want to install startup menu entries? [Y/n] => Y Continue install? [Y/n] => Y Installation complete. Would you like to start now? [Y/n] => N
The game is now installed to the folder /usr/local/games/quake3/
04 - Copy game data from the original CD
Now let's get the game data for the full game. Insert and mount your Quake 3 Arena retail CD and copy the following files (my CD is mounted at /media/tbz/QUAKE3
):
Copy the file pak0.pk3
to your baseq3
folder
sudo cp /media/tbz/QUAKE3/Quake3/baseq3/pak0.pk3 /usr/local/games/quake3/baseq3/ sudo chmod 644 /usr/local/games/quake3/baseq3/pak0.pk3
Copy the default configuration to your user settings:
mkdir ~/.q3a mkdir ~/.q3a/baseq3 cp /media/tbz/QUAKE3/Quake3/baseq3/q3config.cfg ~/.q3a/baseq3 chmod 644 ~/.q3a/baseq3/q3config.cfg
05 - Start the game and enter your CD key
Notice: There will be no sound - see next step. But first, let's complete the installation. Run the game with
/usr/local/games/quake3/quake3
and enter your CD key when prompted. Then exit the game.
06 - The pesky "no sound" issue
A little background about the sound issue
Undoubtedly you will notice that the game lacks any sound output and maybe you have even noticed the following message when the game starts:
------- sound initialization ------- /dev/dsp: No such file or directory Could not open /dev/dsp ------------------------------------
or, if you run some kind of sound proxy, this
------- sound initialization ------- Sorry but your soundcard can't do this ------------------------------------
The problem is, that Q3A, as well as a whole lot of other "old" software, has been built atop the "Open Sound System (OSS)" which has become obsolete in Linux since kernel version 2.6. OSS is still around and used in other Unix-like operating systems, but Linux has switched to ALSA, the "Advanced Linux Sound Architecture" which is incompatible.
If you search the web for a solution, you will find a lot of tips that suggest doing things like
echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss echo "quake3.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
Unfortunately those tips don't work anymore since Canonical decided to remove the OSS compatibility layer from the Ubuntu kernel. Unfortunately, this also renders packages like oss-compat
and osspd
useless, which are intended to provide OSS compatibility.
The Solution.
I spent a whole day on trying out various compatibility layers, sound proxies, etc. with the frustrating result that none of them worked. I was even thinking of compiling a new kernel in order to get the OSS compatibility layer back again.
But fortunately, while researching the problem, I stumbled upon the "et-sdl-sound" hack by Pyry Haulos et al.
In short, this hack squeezes its own "compatibility library" between the game and the ALSA sound system and replaces the OSS sound function calls at runtime.
To use it, we need the following libraries
sudo apt-get install libsdl-sound1.2:i386 sudo apt-get install libasound2-plugins:i386
Then we need to get and install the quake3-sdl-sound hack with
EDIT 2018-10-04: The download URL for quake3-sdl-sound.gz doesn't work anymore. The sources however are available at github.com
wget http://nullkey.kapsi.fi/et-sdl-sound/quake3-sdl-sound.gz gunzip quake3-sdl-sound.gz chmod +x quake3-sdl-sound
Now we Edit ./quake3-sdl-sound
vim quake3-sdl-sound
and uncomment and change the Variable LIBSDL
to
LIBSDL="/usr/lib/i386-linux-gnu/libSDL-1.2.so.0"
At this point we can finally run
./quake3-sdl-sound
and enjoy Quake 3 Arena to the max :-)
Sources
Here are some related resources to the installation procedure
- id Software FTP Server (seems to be offline now)
- Linux Quake III Arena Known issues
- et-sdl-sound Hack
- Q3A sound fixes (just for reference, they don't work anymore)