Tuesday, April 24, 2012

HowTo: Enemy Territory on CentOS 6.2 / SL 6.2

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, namely:
1) Download the necessary files
2) Install and update Enemy Territory
3) Install updated Punkbuster files
4) Generate an etkey
5) Fix sound problem
6) Setup widescreen resolution

These steps can be pretty much be reproduced in any Linux distribution, though some such as Gentoo and Arch Linux have Enemy Territory packages in their package management systems. It should be noted that the steps were performed on CentOS 6.2 but should translate to future CentOS 6.x releases.

1) Download Enemy Territory 2.60 and 2.60b update

Download et-linux-2.60.x86.run, et-2.60b.zip update, updated Punkbuster and the et-sdl-sound.gz sound fix:

  1. $ wget -c http://ftp.freenet.de/pub/4players/hosted/et/official/et-linux-2.60.x86.run
  2. $ wget -c http://darkstar.ist.utl.pt/games/et-2.60b.zip
  3. $ wget -c http://etkey.org/et_linux.zip
  4. $ wget -c http://nullkey.kapsi.fi/~stuff/et-sdl-sound/et-sdl-sound.gz

 

2) Install and update Enemy Territory

Change to root, attribute execute permissions to the installer, install Enemy Territory 2.60, install the 2.60b update, create a profile and check the game's version:

  1. $ su
  2. # chmod +x et-linux-2.60.x86.run
  3. #./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 always read the CHANGES file latter on if you want. Choose the installation path and press OK in the Symlink Path popup. Install both Enemy Territory and Punkbuster. Choose to install the startup menu entries. After this the game installs. Don't choose to start the game immediately as we haven't finished installing everything.

Install the 2.60b update:

  1. # unzip et-2.60b.zip
  2. # cp Enemy\ Territory\ 2.60b/linux/* /usr/local/games/enemy-territory/
  3. # exit

Now start the game, create a player profile identifying profile name, connection speed and clicking on Enable Punkbuster; exit the game. 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"  

3) Install updated Punkbuster files

Remove old Punkbuster files, extract the last Punkbuster update and place it in the created profile:

  1. $ rm -rf ~/.etwolf/etmain/pb
  2. $ unzip et_linux.zip -d pb
  3. $ cp -R pb ~./etwolf/etmain/

4) Generate an etkey

Point to http://etkey.org/pages/etkey-home.php, press the Get an ETKEY button, download the file and store it under ~./etwolf/etmain/.

5) Fix sound problem

The most dreadful any Linux Enemy Territory player can witness:
 ------- sound initialization -------  
 /dev/dsp: No such file or directory  
 Could not open /dev/dsp  
 ------------------------------------  
Luckily we can use the SDL backend which Enemy Territory will use as audio device replacing /dev/dsp and OSS.

Install SDL, extract the et-sdl-sound script, make it executable and accessible to all and edit the et launcher to have Enemy Territory use SDL instead of OSS:

  1. # yum install SDL -y
  2. # gzip -d et-sdl-sound.gz
  3. # chmod a+x et-sdl-sound
  4. # chown root:root et-sdl-sound
  5. # mv et-sdl-sound /usr/local/games/enemy-territory/
  6. # vim /usr/local/games/enemy-territory/et

 #!/bin/sh  
 # Needed to make symlinks/shortcuts work.  
 # the binaries must run with correct working directory  
 cd "/usr/local/games/enemy-territory/"  
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.  
 ./et-sdl-sound "$@"  

6) Setup widescreen resolution

If you have a widescreen monitor follow the instructions on my previous blog post HowTo: Widescreen resolutions on Enemy Territory.

And we're done installing Enemy Territory!

Lately I've been playing at [fp].:Demolition_Centre as tangram"FreeBSD~ or tangram"GNU/Linux~. See you on the battlefield :D

4 comments:

Anonymous said...

Thank you!

tangram said...

Glad to help a fellow ET player ;)

If you need anymore help setting up ET on CentOS or any other distribution let me know.

Nathan Shuman said...

I'm brand new to linux and im trying to start up an ET server on CentOS 6.5. I've managed to find all files online and have them downloaded. When I attempt to run et-linux-2.60.x86.run, I get the following error: /setup.sh: /root/.setup6232: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
This CentOS 6.5 is making me learn linux the hard way, took all day off and on to get a user account access to sudo... I had to write a line in the sudoers file to get the sudo group full access =\
Thanks for your help!

tangram said...

Hi Nathan,

This blog post deals with the client side installation of the game. It was also performed on CentoOS 6.2.

Having said that I never attempted to install an ET server so I'm not aware of the install procedure.

Good luck,
tangram.