Sunday, May 20, 2012

HowTo: Enemy Territory on x86_64 CentOS 6.2 / SL 6.2

Update 21/05/2012:
I'm getting Punkbuster kicked out of the game by random game integrity violations. I'm trying to identify a solution, until then I figure what's wrong I can't recommend following this how-to.
If you're reading this and manage to fix the problem, please let me know in the comments.
Update 04/06/2012:
Installed ET on Ubuntu 12.04 x86_64 both the manual way and using the get-deb package and the result is the same: random PB kick on servers running Punkbuster.

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 on 64-bit CentOS, namely:
1) Download the necessary files
2) Install i686 libraries
3) Install and update Enemy Territory
4) Install updated Punkbuster files
5) Generate an etkey
6) Fix sound problem
7) Setup widescreen resolution
8) Bonus section: troubleshooting

It should be noted that the steps were performed on CentOS 6.2 x86_64 thus should translate to RHEL and Scientific Linux..

1) Download Enemy Territory 2.60 and 2.60b update

Download, update, updated Punkbuster and the et-sdl-sound.gz sound fix: 
  1. $ wget -c
  2. $ wget -c
  3. $ wget -c
  4. $ wget -c

2) Install i686 libraries

Enemy Territory is a 32-bit application as such for a 64-bit CentOS a few i686 libraries are needed:
  1. # yum install glibc.i686 libX11.i686 libXext.i686 libstdc++.i686 pulseaudio-libs.i686

Enemy Territory requires 3D acceleration which commonly implies NVIDIA or AMD/ATI graphic cards and associated proprietary drivers.

User of NVIDIA cards are required to install nvidia-x11-drv-32bit which provides the compatibility 32-bit files for the 64-bit proprietary NVIDIA driver:
  1. # yum install nvidia-x11-drv-32bit

I'd assume that users of AMD/ATI graphics card need to install fglrx-x11-drv-32bit which provides similar files for the proprietary AMD driver, however I don't have an AMD/ATI card to verify.

3) 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
  3. #./

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
  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" is:"ET 2.60b linux-i386 May 8 2006" default:"ET 2.60b linux-i386 May 8 2006"  

4) 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 -d pb
  3. $ cp -R pb ~./etwolf/etmain/

5) Generate an etkey

Point to, press the Get an ETKEY button, download the file and store it under ~./etwolf/etmain/.

6) 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.i686
  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

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

The et-sdl-sound script needs to be edit so that PulseAudio is used has the SDL audio driver.
  1. # vim /

7) 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

8) Bonus section: troubleshooting

 /lib/ bad ELF interpreter: No such file or directory  
  1. # yum install glibc.i686

 ./et.x86: error while loading shared libraries: cannot open shared object file: No such file or directory  
  1. # yum install libX11.i686

 ./et.x86: error while loading shared libraries: cannot open shared object file: No such file or directory  
  1. # yum install libXext.i686

 ----- Client Initialization Complete -----  
 ----- R_Init -----  
 ...loading QGL_Init: dlopen failed: cannot open shared object file: No such file or directory  
 ----- CL_Shutdown -----  
 RE_Shutdown( 1 )  
 ----- CL_Shutdown -----  
 Sys_Error: GLimp_Init() - could not load OpenGL subsystem  
  1. # yum install nvidia-x11-drv-32bit

  1. # yum install fglrx-x11-drv-32bit

No comments: