Wednesday, April 22, 2009

HowTo: Enemy Territory on Debian Linux

Wolfenstein: Enemy Territory is a free multiplayer FPS that takes place in the World World II pitting two teams (Allies and Axis) against each other for victory.

In this post I'll detail the steps required to install and update Enemy Territory, the ET Pro mod, PunkBuster and XQF on Debian GNU/Linux. As a bonus I'll also describe how to workaround sound problems with Enemy Territory on Debian 5.

These steps can be pretty much be reproduced in any Linux distribution. It should be noted that the steps were performed on Debian Lenny but should translate to newer releases.

1) Install and update Enemy Territory

Let's start by fetching the games' installer, make the downloaded file executable and run it to install the game:
$ wget -c http://ftp.freenet.de/pub/4players/hosted/et/official/et-linux-2.60.x86.run
$ su
# chmod +x et-linux-2.60.x86.run
#./et-linux-2.60.x86.run
Press OK in the popup.

Agree with the License Agreement by pressing ENTER at the License Agreement prompt and choosing YES on "Do you agree with the license?" popup that follows.

Choose NO at the "Would you like to read the CHANGES file?" popup. You can allways read the CHANGES file latter on if you want.

Choose the installation path. And press in the Symlink path popup press ENTER.

Install both Enemy Territory and Punkbuster by pressing the TAB key to move to the OK option.

The License Agreement for Punkbuster shows up. Press ENTER twice.

Choose to install the startup menu entries.

After this the game installs. Don't choose to start the game imediatlely as we haven't finished installing everything.

Now download its update:
$ wget -c http://darkstar.ist.utl.pt/games/et-2.60b.zip
Unzip the file:
$ unzip et-2.60b.zip
Change directory of the unziped directory and copy the update files to games' directory:
$ cd Enemy\ Territory\ 2.60b/linux
$ su
# cp * /usr/local/games/enemy-territory/
Logout from the root account:
# exit
Now start the game, create a player profile and quit. By doing so a .etwolf directory will be created in your home directory which includes a folder containing PunkBuster.

Inside the game you can check the installed version by pulling the console down by pressing ~ and typing version. It should output the following:
]\version

"version" is:"ET 2.60b linux-i386 May 8 2006" default:"ET 2.60b linux-i386 May 8 2006"
2) Install the ET Pro mod

Next let's install Enemy Territory's best mod: ET Pro.
$ wget -c http://bani.anime.net/etpro/etpro-3_2_6.zip
$ unzip etpro-3_2_6.zip
$ et
$ cp -R etpro ~/.etwolf
Now ET Pro will show under the Mods options in the games' main menu.

Note: If have other users using ET I suggest copying etpro to /usr/local/games/enemy-territory instead thus making the mod available to every user.

3) Update PunkBuster

Point to http://www.evenbalance.com/index.php?page=pbsetup.php scroll down and follow the Linux download to download PunkBuster update application.

Change directory to where you've downloaded the pbsetup.run and:
# su
# chmod +x pbsetup.run
# exit
$ cp pbsetup.run ~/.etwolf/pb
$ ./pbsetup.run
PunkBuster will ask to fetch updates and prompt for a License Agreement. Afterwards point to "Add a Game option" and choose Enemy Territory. Punkbuster will point the installation path to your username's .etwolf directory.

Note: If you want all your users to have Punkbuster updated run the above steps as root and point to the game's install directory which should be /usr/local/games/enemy-territory.

On the main PunkBuster window click on Enemy Territory to select it and press "Check for Updates". Quit PunkBuster after updating it.

4) Install XQF

To browse and filter server I recommend installing and using the XQF Game Server Browser:
$ su
# aptitude install xqf
XQF will identify the installed Enemy Territory so select the game and press "Update" to have XQF pull an updated server list.

I tend to play on www.Enemy-Territory.com by www.4netplayers.de server ;)

5) Fix sound issues

ET uses Linux's OSS sound infrastructure. If you don't have sound here's how to enable the needed kernel module at boot time:
$ su
# echo "snd_pcm_oss" >> /etc/modules
# modprobe snd_pcm_oss
And we're done! See you on the battlefield :D

Bonus section: etpro launch script

If you play etpro if can repeat the following steps to launch etpro directly (I'm assuming your shell is Bash):
$ echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
$ mkdir ~/bin
$ touch ~/bin/et-pro
$ chmod +x ~/bin/et-pro
$ vim ~/bin/et-pro
Add the following lines:
#!/bin/sh
cd "/usr/local/games/enemy-territory/"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
exec ./et.x86 "$@" +set fs_game etpro
Now you can launch etpro simply by:
$ et-pro

2 comments:

Anonymous said...

thx a lot man....
but when updating the game via pbsetup ( if the default directory is /usr/local/games/enemy-territory ) it should be executed by root
ordinary users can't write to that directory

tangram said...

You don't need to run it as root. Just run ET once for have it create the .etwolf directory, then copy pbsetup.run there and run it.