Friday, January 28, 2011

ATI Radeon HD6000 series drivers for Linux

I recently decided to splash out and buy myself an ATI 6950 graphics card as it supports OpenGL 4.1 and I want to write programs that use the latest features. Anyway, after a few weeks of not even using he card due to the lack of Linux drivers for the 6900 series, this week ATI finally released Catalyst 11.1 with support for the new cards.

I was a little too eager to get it installed which resulted in a blank screen after reboot. However, the usual combo of Ctrl + Alt + F3 then running the un-installer got everything back to normal.
The problem was that as this was a fairly new system, I had not yet installed gcc or the kernel-devel packages. So for anyone out there that is having problems setting up their ATI graphics card under Linux, specifically Fedora, these steps may be of some help.

Before you install Catalyst there are a few bits you'll need. You'll need to be ROOT and it would be a good idea to update your system but not essential. You do however need gcc and the kernel-devel packages mentioned above. The kernel-devel package will add the relevant files for your current kernel version in:
So for example, typing uname -r I could see my kernel version was, so once I installed the kernel-devel package:
yum install kernel-devel
I had the following folder:
The Catalyst installer will also need the gcc compiler so make sure that is also installed:
yum install gcc
Download the file from the ATI/AMD website. Then navigate to the file using the terminal. You will need to make the file executable before you can run it so use:
chmod 755
Then run the file:
That's it, you should be good to go. You will need to reboot your system for the changes to take effect. Before you do however it is a good idea to take a quick look at the log file for errors:

Sunday, January 23, 2011

How To: Install Doom 3 on Fedora 14 (64-bit)

I have a lot of respect for id software as they are one of the few game developers that have released large budget games with native installers for Linux. Doom 3 was released in 2004 and although the discs only contain a Windows installer, id provided a native Linux installer on their website. The latest version is 1.3.1 build 1304, released 2007 and available here:
Unfortunately a 64 bit build was never made but Doom 3 will still run on a 64-bit system providing you have the 32-bit libraries that are required.

This guide will run you through the steps that are needed to install the game on a current Linux distro. I'm using Fedora 14 but the steps should be similar for other systems. You will need root access in order to follow these steps.

Step 1 - Download the required dependencies:

You'll need the following libraries on your system:
In order to find out what package you need to install to get the required file, use yum along with the whatprovides option:
# yum whatprovides
It will state what package provides the lib file:
libX11-1.3.4-3.fc14.i686 : Core X11 protocol client library
So the next step is to install libX11:
# yum install libX11-1.3.4-3.fc14.i686
Follow this process for the other libraries that are needed:
# yum whatprovides
Output: libXext-1.1.2-2.fc14.i686 : X.Org X11 libXext runtime library
# yum install libXext-1.1.2-2.fc14.i686
Now for LibGL:
# yum whatprovides
Output: mesa-libGL-7.9-1.fc14.i686 : Mesa libGL runtime libraries and DRI drivers

So now you install mesa-libGL:
# yum install mesa-libGL-7.9-5.fc14.i686
Then just follow the same procedure for ld-linux
# yum whatprovides
Outputs: glibc-2.12.90-21.i686, so now to install glibc
# yum install glibc-2.12.90-21.i686
Step 2 - Download and run the install file:

Download the install file from id's ftp site using the link provided earlier. The permissions will need to be changed so that the file is executable:
# chmod 644 /path/to/installer/
Now you can run the install file using:
# sh /path/to/installer/
At this point the installer will run through a couple of questions such as where you want to install to. By default Doom 3 installs to: /usr/local/games/doom3

Step 3 - Copy pk4 files from the installation discs:

Now to copy the required 'pk4' files from the install discs. This is the slowest part as it will take a few minutes for each file to be copied over to your hard drive. If you went with the default options during the installation, the files being copied will need to be placed in: /usr/local/games/doom3/base

The files that need to be copied are as follows:

Disc 1:
  • /media/DOOM3_1/Setup/Data/base/pak002.pk4
Disc 2:
  • /media/DOOM3_2/Setup/Data/base/pak000.pk4
  • /media/DOOM3_2/Setup/Data/base/pak001.pk4
Disc 3:
  • /media/DOOM3_3/Setup/Data/base/pak003.pk4
  • /media/DOOM3_3/Setup/Data/base/pak004.pk4

To copy the files use the following commands, changing discs as needed:
# cp /media/DOOM3_1/Setup/Data/base/pak002.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak000.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak001.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak003.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak004.pk4 /usr/local/games/doom3/base/
If you are also installing the Resurrection of Evil Expansion Pack, you will also need to copy 'd3xp/pak000.pk4' to your d3xp/ directory: /usr/local/games/doom3/d3xp

Once you have copied the files from the discs, listing the contents of the directory will show that the permissions need changing:
ls -l /usr/local/games/doom3/base/
To set them correctly use chmod:
# chmod 644 /usr/local/games/doom3/base/*
Finishing up - Fix audio and resolution problems:

At this point you will have a shortcut in the Aplications menu to run the game but there are some final steps you may need to take. The first problem is that the sound engine in Doom 3 is based on OSS which has been disabled since Fedora 11.

To re-enable OSS you will need to edit /etc/modprobe.d/dist-oss.conf and uncomment the line within the file. Once this is done, reboot so that the changes take effect.

The second issue is the resolution. You may find that you cannot set Doom 3 to use the full native resolution of your monitor. If this is the case then simply edit your DoomConfig.cfg file (Resurrection Of Evil has its own DoomConfig.cfg).
vim .doom3/base/DoomConfig.cfg
The lines you will need to edit are:
seta r_mode "-1"
seta r_customHeight "####"
seta r_customWidth "####"
If r_mode is not set to "-1" the game will ignore your custom settings. (Thanks to for the resolution fix).

That's it! Doom 3 is now ready to go.

If you do have any problems then my advice would be to run Doom 3 with the log file enabled:
/usr/local/games/doom3/doom3 +set developer 1 +set logfile 1
Then to look at the log file use:
tail ~/.doom3/base/qconsole.log
Refer to the Doom 3 GNU/Linux FAQ if you need further information.

Monday, January 17, 2011

OpenOffice - JDK not detected on Mac OSX Snow Leopard

In October 2010 Apples Mac OSX software update (Java 6 u22) broke compatibility with 3.2.1 (and earlier versions).  To fix the problem you will need to replace two lib files: libjvmfwk.dylib.3 and sunjavaplugin.dylib

These files are located in:

Download the new versions:

Backup original libs:
mv /Applications/ /Applications/
mv /Applications/ /Applications/

Copy the new libs files in place:
cp ~/Downloads/libjvmfwk.dylib.3 /Applications/
cp ~/Downloads/sunjavaplugin.dylib /Applications/