Unreal Tournament
Unreal
Install only a bare minimum locally, get the rest from the noexec
mounted NFS share:
NFSDIR=/mnt/nfs/data/games/Unreal sudo mkdir /opt/unreal && cd /opt/unreal for f in $NFSDIR/*; do sudo ln -vs "$f"; done sudo rm Save System sudo rsync -avP $NFSDIR/Save . # Allow games to be saved, locally sudo rsync -avP $NFSDIR/System .
Allow some users to modify configuration files and to save games:
sudo chgrp staff Save && sudo chmod g+s Save # Create new files with the correct group sudo setfacl -m g:staff:rw Save/*.usa System/{Unreal,User}.ini sudo setfacl -m g:staff:rwx Save
Start the game with Wine:
wine32 System/Unreal.exe
Unreal Tournament
Loki Software[1] once provided some Linux gluecode to make Unreal Tournament available on Linux. There's a howto on the Ubuntu wiki[2] on how to install UT, let's see how far we get on a Debian/amd64 system:
- Have a copy of "UT" or "UT GOTY" ready
MD5 726aede817997a2aefccb8c20601d760 unreal.tournament_436-multilanguage.run MD5 7012dc6caaa9453dcf8951474556912a unreal.tournament_436-multilanguage.goty.run MD5 82e71a81de1eaf4e09648372c0ca7289 unreal.tournament.official.bonus.pack.collection.run
Ubuntu
$ wget https://launchpad.net/ubuntu/+source/gtk+1.2/1.2.10-18.1build2/+build/484191/+files/libgtk1.2-common_1.2.10-18.1build2_all.deb $ wget https://launchpad.net/ubuntu/+source/gtk+1.2/1.2.10-18.1build2/+build/484189/+files/libgtk1.2_1.2.10-18.1build2_amd64.deb $ wget https://launchpad.net/ubuntu/+source/glib1.2/1.2.10-19build1/+build/462713/+files/libglib1.2ldbl_1.2.10-19build1_amd64.deb $ md5sum libg*deb 7115a3779d81896434e7e5b1165e5163 libglib1.2ldbl_1.2.10-19build1_amd64.deb e2b9d99fb16cd5ffa10c386e8d252e47 libgtk1.2_1.2.10-18.1build2_amd64.deb 4839680726bdecdab9f9c64aab797474 libgtk1.2-common_1.2.10-18.1build2_all.deb $ sudo dpkg -i libgtk*.deb libglib*.deb
Debian
To install an older version of libgtk
resp. libglib
, we can temporarily add the old Debian/lenny
archive to our sources.list:
deb https://archive.kernel.org/debian-archive/debian/ lenny main
Add the (old) Debian release key:
gpg --recv-keys 4D270D06F42584E6 gpg --armor --export 4D270D06F42584E6 | sudo apt-key add - sudo apt-get update
Now we should be able to install the package:
$ sudo apt-get install -t lenny libgtk1.2 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libglib1.2ldbl libgtk1.2-common The following NEW packages will be installed: libglib1.2ldbl libgtk1.2 libgtk1.2-common 0 upgraded, 3 newly installed, 0 to remove and 83 not upgraded. Need to get 1,303 kB of archives. After this operation, 3,297 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 https://archive.kernel.org/debian-archive/debian/ lenny/main libgtk1.2-common all 1.2.10-18.1 [208 kB] Get:2 https://archive.kernel.org/debian-archive/debian/ lenny/main libglib1.2ldbl amd64 1.2.10-19 [138 kB] Get:3 https://archive.kernel.org/debian-archive/debian/ lenny/main libgtk1.2 amd64 1.2.10-18.1 [956 kB] [...]
As Debian/lenny is not not maintained any more (and won't receive any updates), we can disable the archive again in /etc/apt/sources.list
and set these old packages to hold
so that they won't get removed or updated:
$ for p in libglib1.2ldbl libgtk1.2 libgtk1.2-common; do echo $p\ hold | sudo dpkg --set-selections; done $ dpkg --get-selections | grep hold libglib1.2ldbl hold libgtk1.2 hold libgtk1.2-common hold
We could even remove the old key:
sudo apt-key del 4D270D06F42584E6
Installation
Let's try to install UT now via the command line installer:
export TMPDIR=$(pwd)/tmp && mkdir -p tmp # Use another location if TMPDIR is mounted noexec export SETUP_CDROM=/mnt/cdrom/ # Where the UT or UT GOTY installation CD is mounted
Try the UT GOTY installer and pass some arguments to setup.sh
./unreal.tournament_436-multilanguage.goty.run --nox11 -- -n -i /opt/ut -b $HOME/bin
The help text from unreal.tournament_436-multilanguage.goty.run
:
./unreal.tournament_436-multilanguage.goty.run [options] [--] [additional arguments to embedded script] with following options (in that order) --confirm Ask before running embedded script --noexec Do not run embedded script --keep Do not erase target directory after running the embedded script --nox11 Do not spawn an xterm --nochown Do not give the extracted files to the current user --target NewDirectory Extract in NewDirectory --tar arg1 [arg2 ...] Access the contents of the archive through the tar command -- Following arguments will be passed to the embedded script
The help text, from the embedded setup.sh
./setup.sh -h Usage: setup.sh [options] Options can be one or more of the following: -b path Set the binary path to <path> -h Display this help message -i path Set the install path to <path> -c cwd Use an alternate current directory for the install -f file Use an alternative XML file (default setup.data/setup.xml) -n Force the text-only user interface -o opt Enable the option named "opt" from the XML file. Also enables non interactive operation. Can be used multiple times. -p pref Specify a path prefix in the installation media. -v n Set verbosity level to n. Available values : 0: Debug 1: Quiet 2: Normal 3: Warnings 4: Fatal -V Print the version of the setup program and exit
Configuration
Adjust ~/.loki/ut/System/UnrealTournament.ini
:
[Engine.Engine] GameRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice AudioDevice=Audio.GenericAudioSubsystem WindowedRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice RenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice ViewportManager=SDLDrv.SDLClient [SDLDrv.SDLClient] InvertVertical=True StartupFullscreen=True FullscreenViewportY=768 FullscreenViewportX=1024 WindowedViewportY=600 WindowedViewportX=800 # Performance related MinDesiredFrameRate=120.000000 NoFractalAnim=True NoDynamicLights=True Decals=False NoLighting=True ScreenFlashes=False SkinDetail=High TextureDetail=High CurvedSurfaces=False UseVSync=False
Usage
With all the necessary dependencies installed, we should be able to play:
$ cd /opt/ut/System $ ldd ./ut-bin linux-gate.so.1 (0xf770b000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76d6000) libnsl.so.1 => /lib/i386-linux-gnu/libnsl.so.1 (0xf76bd000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76a1000) Engine.so => ./Engine.so (0xf7448000) Core.so => ./Core.so (0xf72d9000) libSDL-1.1.so.0 => ./libSDL-1.1.so.0 (0xf723a000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf71f5000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7080000) /lib/ld-linux.so.2 (0x565b2000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf6f2e000) libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf6f19000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6ef3000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6eef000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6ee8000)
To get working audio: AudioDevice=ALAudio.ALAudioSubsystem
has been changed to Audio.GenericAudioSubsystem
but we still need a 32 bit version of the PulseAudio OSS Wrapper.
$ sudo apt-get install libpulsedsp:i386 $ dpkg -L $_ | grep -F \.so /usr/lib/i386-linux-gnu/pulseaudio/libpulsedsp.so
Try with:
LD_PRELOAD=/usr/lib/i386-linux-gnu/pulseaudio/libpulsedsp.so padsp ./ut-bin
Errors
If UnrealTournament.ini
is b0rked, UT doesn't seem to start at all:
$ ./ut-bin Signal: SIGSEGV [segmentation fault] Aborting. Segmentation fault
Or:
$ ./ut-bin Signal: SIGIOT [iot trap] Aborting.
Sometimes UnrealTournament.log
has some clues on what went wrong.
NFS
We have a working copy of UT on our NFS server, but the client mounts all NFS shares with noexec and we're unable to execute System/ut-bin
:
$ ls -lgo System/ut-bin -rwxr-xr-x 1 91336 Dec 8 2002 System/ut-bin $ System/ut-bin bash: System/ut-bin: Permission denied $ strace -e execve System/ut-bin execve("System/ut-bin", ["System/ut-bin"], [/* 54 vars */]) = -1 EACCES (Permission denied) strace: exec: Permission denied +++ exited with 1 +++
We don't want to mount with exec
so let's just copy System
and symlink the rest:
UTNFS=/mnt/nfs/data/games/UT UTLOC=/opt/ut mkdir -m0755 $UTLOC tar -C $UTNFS -cf - System | tar -C $UTLOC -xf - cd $UTLOC for f in $UTNFS/*; do ln -s "$f"; done # As System already exists, ignore the error from ln(1)
UT 2004
Installation
The original UT 2004 CD can be installed without the linux-installer.sh
[4] script too.[5]
Mount the CDROM somewhere and create an installation directory:
DIR=/opt/ut2004
sudo mount -o ro,loop Unreal_Tournament_2004.iso /mnt/cdrom
sudo mkdir $DIR
sudo chown bob:users $DIR
Install unshield
to extract the .cab
files:
sudo apt-get install unshield # Or cabextract for Fedora systems
Put (symlink) all the .cab
files into one place and install into the installation directory:
cd /tmp
for f in /mnt/cdrom/Disk?/data?.*; do ln -sv $f; done
unshield -D 1 -d $DIR x data1.cab # This will extract data1.cab and all the other .cab files
While all the contents have been extracted, we need to clean up some things now. Change to the installation directory and:
cd $DIR rm -rf _* All_UT2004.EXE/ mv English_Sounds_Speech_System_Help/* . && rmdir English_Sounds_Speech_System_Help/ mv English_Manual/Manual.pdf Help/ && rmdir English_Manual/ mv All_Help/* Help/ && rmdir All_Help/
Remove the All_
prefix from the directories:
ls -d All* | while read f; do mv -iv "$f" ${f##All_}; done # This works with bash
We still need to apply the latest Linux patch:
tar --strip-components=1 -C $DIR -xvf ~/ut2004-lnxpatch3355.tar # GNU/tar is needed here to omit
# the UT2004-Patch/
prefix
We'll need a CDkey
as well:
$ cat > System/CDkey xxxxx-xxxxx-xxxxx-xxxxx ^D
Almost there. We need the followng for Audio support:
sudo apt-get install libopenal1 sudo ln -s /usr/lib/x86_64-linux-gnu/libopenal.so.1 $DIR/System/openal.so
We're are on an x86-64 system and will use the ut2004-bin-linux-amd64
binary - some libraries may still be missing:
$ ldd System/ut2004-bin | grep not ./libSDL-1.2.so.0 => not found libstdc++.so.5 => not found
Install with:
sudo apt-get install libsdl1.2debian libstdc++5 cd $DIR/System sudo ln -s /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
Similar for Fedora systems:
sudo dnf install SDL compat-libstdc++-33.x86_64 openal-soft sudo ln -s /usr/lib64/libSDL-1.2.so.0 $DIR/System/libSDL-1.2.so.0 sudo ln -s /usr/lib64/libopenal.so.1 $DIR/System/openal.so
With that in place, UT2004 should be able to start!
NFS
We have a working copy of UT2004 on our NFS server, but the client mounts all NFS shares with noexec and we're unable to run the executable. Let's create symlinks to the game's content and just keep the System
directory local:
UTNFS=/mnt/nfs/data/games/UT2004 UTLOC=/opt/ut2004 sudo mkdir -m0755 $UTLOC sudo tar -C $UTNFS -cf - System | tar -C $UTLOC -xf - cd $UTLOC for f in $UTNFS/*; do sudo ln -s "$f"; done # As System already exists, ignore the error from ln(1)
Commands
Some commands may only work in Unreal or UT:
stat fps # Show FPS god # Cheat :-) invisible allammo # Get ammunition loaded # Get all weapons summon rifle|flak|eightball|flashlight # Get things, see below fly # You feel much lighter walk ethereal # Wander through walls
Things to summon:[6]
automag dispersionpistol stinger gesbiorifle razorjack minigun asmd flakcannon eightball rifle amplifier armor asbestossuit bandages book cannon chair - use it to climb on things chest clip dampener - silencer escapepod flare flashlight forcefield grenade health invisibility jumpboot jumpboots kevlarsuit moon - nali nalifruit nalistatue powershield rocket scubagear searchlight - flashlight, but brighter seeds shieldbelt steelbox superhealth table toxinsuit translator vase voicebox weaponpowerup woodenbox