Saturday, November 24, 2012

How To: Prevent use of global menu in Ubuntu Unity

I didn't really mind when Ubuntu switched from using Gnome to their own Unity Interface. Today however, I've had issues with two desktop applications which were unable to play nicely with Unity.

The first one was the preview version of IntelliJ IDEA 12 which is due to be released next month. I reported the issue on the JetBrains Issue Tracker so hopefully it'll get resolved by the time it's released.

I later decided to use Gimp to create a new wallpaper for my desktop. After maximising the window I found that I was unable to access any of the menu options as the dropdown menus appear behind the application. Thankfully a very good post on askubuntu.com showed a quick workaround for the problem. By adding "env UBUNTU_MENUPROXY=0" to the 'Exec' line in the '.desktop' file you can force an application not to use the global menu.

So in the case of Gimp you would do:
$ sudo vim /usr/share/applications/gimp.desktop

Then edit the 'Exec' line to look something like this:
Exec=env UBUNTU_MENUPROXY=0 gimp-2.6 %U

Sunday, August 12, 2012

Using recursion to find prime numbers

Occasionally I like to go back over basic programming concepts by doing simple programming exercises. It's a good practice that I think any developer can benefit from. Today I've been doing some JavaScript and found myself needing to do a google search to remind myself about recursive functions as they're not something I use often. There seem to be loads of horrible examples out there so I've decided to post the code I ended up using.
for (counter = 1; counter <= 23; counter++) {
    if (isPrime(counter, counter -1)) {
        console.log(counter + " is a prime numer.");
    }
}

function isPrime(number, step) {
    if(step <=1)
        return true;
    if(number % step === 0) {
        return false;
    }
    return isPrime(number, step-1);
}

Thursday, June 21, 2012

How To: Get Android ADB working on 64-bit Linux

I recently did a clean install of Fedora 17 on to a Sun Ultra 40 Workstation to use as my development environment at work. The Android SDK requires the 32-bit versions of glibc, ncurses-libs, libstdc++, and others. On an Ubuntu based system this would be handled using ia32-libs. On Fedora however you need to be a little more specific about the individual packages. If using a 64-bit Fedora installation you'll need to run something similar to the following.
$ sudo yum install alsa-lib.i686 glibc.i686 glibc-devel.i686 ncurses-libs.i686 libstdc++.i686 libzip.i686 libX11.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686 SDL.i686 zlib.i686 zlib-devel.i686 mesa-libGL.i686
This is similar to the way in which the dependencies are downloaded on Arch Linux using the multilib and lib32 packages:
# pacman -Syu multilib-devel lib32-zlib lib32-ncurses lib32-sdl gcc gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-glibc

Friday, June 08, 2012

Humble Indie Bundle gets even better

A few days ago I purchased the Humble Indie Bundle to get Superbrothers: Sword & Sworcery EP, Amnesia: The Dark Descent, LIMBO, Bastion, and Psychonauts. It was a good deal then so I was pretty impressed when I went back to the site today to find that they have added Braid, Super Meat Boy, and Lone Survivor. The bundle was already a good deal but now it has become an amazing deal - buy it now while there's still time.

Wednesday, May 02, 2012

How To: Fix Nvidia graphics issue in Ubuntu 12.04

Since updating my Ubuntu system to 12.04 I have been experiencing problems with the machine hanging. After spending considerable time reading through forum threads, I found that the solution was to remove the Nvidia driver that was installed via the Ubuntu repositories (v295.40) and manually install the latest driver from Nvidia (v302.07).

The first step was to download the driver from  the Nvidia website:
http://www.nvidia.com/object/linux-display-amd64-302.07-driver.html

Make sure that the file is executable:
$ chmod 755 NVIDIA-Linux-x86_64-302.07.run
Before running the desktop environment needed to be stopped:
$ sudo stop lightdm
Then using Ctrl + Alt + F6 to get to another command prompt I ran the file as root:
$ sudo sh NVIDIA-Linux-x86_64-302.07.run
The installer was able to detect that I had dropped back to the Nouveau driver and gave an option to disable it on next reboot. I agreed to this option then rebooted using:
$ sudo shutdown -r now
This time the system had booted up without the Nvidia or Nouveau drivers so I repeated the steps to stop the graphical environment and run the installer again. On completion I was able to reboot my system into what is now, once again, a stable system.

Saturday, April 28, 2012

UCubed 2012

Today I'm at MadLab (Manchester Digital Laboratory) for a free event called UCubed. The purpose of the event is to encourage people to get involved with the GNU/Linux community, with the main focus being on Ubuntu and Debian based distributions.

With the release of Ubuntu 12.04 LTS being just a few days away it's a good opportunity for people that haven't already been using the beta release to see what changes are coming in Precise Pangolin.

MadLab host all kind of events worth going to, so if you happen to be in the area check out their events page to see what's available.

Tuesday, April 10, 2012

European Road Trip

This weekend my course work got put on hold by a rather unexpected journey through eight different countries within just four days. A week ago a good friend of mine asked if my girlfriend and I would accompany him as he drove his van to Budapest to help some in-laws move home. It seemed like a nice little adventure so we agreed and set off during the early hours of Friday morning on a round trip of over two and a half thousand miles.


We went via the A1 to the south coast to catch a ferry from Dover to Dunkirk, then headed east through Belgium into Germany where we stopped for food in Frankfurt and then again in Nuremberg where we got a hotel for the night. The following morning we headed south-east into Austria then Hungary, finally arriving in Budapest on Saturday evening.

We set off a little late on Sunday as loading up the van took a lot longer than we'd anticipated, although we still somehow managed to squeeze in a little sight-seeing before leaving the city. As we wanted to make the trip a little more interesting we decided to take a bit of a detour and head through Slovakia into the Czech Republic so that we could have a meal in Prague on the way.

The relaxed approach backfired on us however as by the time we left Prague it was pretty late and we still had a long way to go. A combination of closed roads and a lack of diversion signs in Germany meant that we wasted a lot of time making little progress so we decided to call it a night and managed to find a place to stay in Leipzig (which seemed like a German version of Milton Keynes). This meant us getting up at the crack of dawn on Monday as we had a ferry to catch and were still about eight hours drive from Dunkirk.

The drive west was an endurance test. This was made worse by the fact that somewhere around either the Netherlands or Belgium an entire network of roads had sprung up since the sat-nav had last been updated, resulting in a wrong turn being made and the best part of an hour wasted. We got to the docks in Dunkirk in time to see our ferry depart and had to wait it out a few hours for the next one. On the plus side though we didn't have to empty the entire contents of the van for border control. The final stretch up to Leeds seemed like an eternity but we finally made it back and still had time for a pub meal on the way.

Tuesday, March 20, 2012

How To: Install Arch Linux

Today I started a new position as a Software Developer at NTI Leeds. I'm going to be working on Android projects initially but may move on to iPhone development later in the year. As with most first days I spent some time setting up a development environment.

The machine I am using is a pretty average hardware spec, so I decided to install Arch Linux as it's supposedly pretty good for performance.

Arch Linux is a lightweight rolling-release distribution, that is to say that once it is installed the the system can be continually updated to keep up with the latest version rather than a new version being released periodically as is commonly done with other distros such as Ubuntu or Fedora. As Arch Linux can be a little more daunting for new users I have documented some steps on this page which I use for my system. As I use a 64-bit system and am in the UK some of these steps may need to be changed depending on your requirements. Additional help can be found on the Arch Linux Wiki.

Some steps to take during the Arch Linux Installation:


Most of the steps required can be found on the Official Installation Guide. Once the install cd has been booted you can start the installation process by using:
/arch/setup

Partitioning the Hard Drives:


When partitioning the hard drive I opted for setting fixed partitions using the Ext4 filesystem (it's a bit too soon to use Btrfs). On hindsight I think I would have been better off using LVM (Logical Volume Manager) and will do so next time. If you intend to do development work you may find /usr/lib taking up a lot of space. Also, ~/.pacmanCache can grow fairly large so it's a good idea to give yourself enough space. The installer uses the following defaults:
  • 32 MB ext2 /boot partition
  • 256 MB swap partition
  • 7.5 GB root partition
  • /home partition with the remaining space
Disk space is cheap so something like this is fine:
  • 32 MB ext2 /boot partition
  • 512 MB swap partition
  • 15 GB ext4 root partition
  • /home ext4 partition with the remaining space

Locale:


Some localization information is kept in /etc/rc.conf. This file is the main configuration file for the system so you will need to return here fairly often to change settings. For the UK make sure the LOCALIZATION block in /etc/rc.conf looks like the following:
# LOCALIZATION
# ------------
HARDWARECLOCK="UTC" 
TIMEZONE="Europe/London" 
KEYMAP="uk" 
CONSOLEFONT=
CONSOLEMAP=
LOCALE="en_GB.utf8" 
DAEMON_LOCALE="yes" 
USECOLOR="yes"
Now create the following file /etc/locale.conf and add the following:
LANG=en_GB.UTF-8
LC_MESSAGES=C
A list of available locales is stored in /etc/locale.gen. Edit the file and uncomment the lines for UK then save and exit the file (keep the US also as a fallback):
en_GB.UTF-8 UTF-8
en_GB ISO-8859-1
en_US.UTF-8 UTF-8
en_US ISO-8859-1
Once this is done you need to run locale-gen as the root user

Arch Linux Post Installation:


Once your new system has been installed it's time to start configuring it. First you'll need need some packages. Packages are installed on Arch Linux using pacman:
pacman -S 
Before we start installing any packages make sure that pacman is downloading packages from servers in your location by editing /etc/pacman.d/mirrorlist. On my system I simply uncommented all of the UK mirrors:
## Great Britain (Try GB first)
Server = ftp://mirror.lividpenguin.com/pub/archlinux/$repo/os/$arch
Server = http://mirror.lividpenguin.com/pub/archlinux/$repo/os/$arch
Server = ftp://mirror.bytemark.co.uk/archlinux/$repo/os/$arch
Server = http://mirror.bytemark.co.uk/archlinux/$repo/os/$arch
Server = ftp://mirror.cinosure.com/archlinux/$repo/os/$arch
Server = http://mirror.cinosure.com/archlinux/$repo/os/$arch
Server = ftp://mirrors.uk2.net/pub/archlinux/$repo/os/$arch
Server = http://archlinux.mirrors.uk2.net/$repo/os/$arch

## Ireland (if none in england try Ireland)
Server = ftp://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/$arch
Server = http://ftp.heanet.ie/mirrors/ftp.archlinux.org/$repo/os/$arch
Once the file has been saved you need to run pacman -Syy to force a refresh of all package lists.

Install useful tools and libs:


As this is a 64-bit system if you install packages such as 'base-devel' you will encounter problems later when dealing with software that requires 32-bit libs. Use the multilib-devel instead to be able to deal with 32 bit and 64 bit.
pacman -Syu vim mlocate ntp multilib-devel lib32-zlib lib32-ncurses lib32-sdl gcc gcc-multilib gcc-libs-multilib binutils-multilib libtool-multilib lib32-glibc

Install 'sudo' and create a user that is a sudoer:

useradd -m -g users -G audio,lp,optical,storage,scanner,video,wheel,games,power -s /bin/bash 
pacman -S sudo
Now that sudo is installed you'll need to make your user a sudoer. This is done using 'visudo', however now that vim has been installed you can use the following to use vim as the editor:
EDITOR=vim visudo
My preferred way to do this is to uncomment the following line so that any user that belongs to the 'wheel' group can use sudo.
%wheel ALL=(ALL) ALL

Install audio:


Edit /etc/modprobe.d/modprobe.conf by adding the following (this is to ensure that the 'snd-pcsp' module loads last):
options snd-pcsp index=2
Now install alsa:
pacman -S alsa alsa-utils alsa-oss

Install a graphical desktop environment (Gnome 3 in this case):

pacman -S xorg xorg-server xorg-xinit xorg-server-utils xterm gnome gnome-extra gnome-system-tools dbus gdm gnome-packagekit gnome-settings-daemon-updates gnome-tweak-tool gnome-shell-extension-alternative-status-menu
To get Xorg to use my UK keyboard layout I had to edit /etc/X11/xorg.conf.d/10-evdev.conf:
vim /etc/X11/xorg.conf.d/10-evdev.conf
then add the following to the 'evdev keyboard catchall' section:
Option "XkbLayout" "gb"
If you want your system to boot into a graphical environment rather than the command line then you'll need to edit your /etc/rc.conf file again. This time you need to edit the DAEMONS section. It should look similar to the following:
# DAEMONS
# -------
#
DAEMONS=(syslog-ng dbus network netfs crond alsa gdm)

Install Firefox, Chromium, and some additional fonts:

pacman -S ttf-dejavu ttf-droid ttf-liberation ttf-ubuntu-font-family ttf-freefont ttf-inconsolata monaco-linux-font chromium firefox
That's it! By now you should have a light weight Linux environment to work in. At this point there was still much that I had to install such as git, subversion, Java, Android SDK, Eclipse and Sublime Text. When I get time I may write a follow up article.

Wednesday, February 15, 2012

My customised IntelliJ IDEA theme

During the last few years I have used an IDE called IntelliJ IDEA for Java projects. Unfortunately the default colour scheme is not much to my liking so I decided to create my own colour scheme inspired by the dark grey background and pastel colours that Sublime Text uses. Originally it was my intention to recreate the default theme of Sublime Text but after making a few adjustments the resulting theme ended up being rather different.

My IDEA theme can be downloaded here: Samael-IDEA-Theme.xml

The themes for IDEA are done using XML files which are kept in:
C:\Users\username\.IntelliJIdea10\config\colors
Or the equivalent config folder for Mac:
~/Library/Preferences/IntelliJIdea10/colors
IntelliJ checks the contents of the folder on startup, so if you add the file whilst using IDEA it will not be available in the IDE until you restart it.

Monday, January 30, 2012

Custom colours for Vim using Villustrator

If like me, you like to use visually appealing colour schemes within the terminal, check out Villustrator. This handy little web-based tool provides a visual way in which to create a custom colour scheme for Vim. Simply edit the colours to your liking then click the Download button and save the '.vim' file to:
~/.vim/colors/
Once this is done you will need to set your new theme by editing your vimrc file.
vim ~/.vimrc

Thursday, December 22, 2011

Desura is now available for Linux

On a recent visit to the Desura website I noticed that they have a Linux client available (released last month). This is great news for both Linux gamers and developers alike. It allows for any game developer with a Linux compatible game to sell their product to Linux users across multiple distros with limited fuss.

I highly recommend any Linux user with an interest in games to download the installer to their home directory and start browsing through the available games.

Saturday, November 26, 2011

Doom 3 source is now available!

As I mentioned in my post in January, I have a lot of respect for id software and especially John Carmack, who has kept to his promise of release the source for Doom 3. It's been made available on GitHub by Timothee Besset:

https://github.com/TTimo/doom3.gpl

There has already been a good few fixes put in place by various other GitHub users. It'll be interesting to see what kind of open source games will be released off the back of this engine.

Friday, July 22, 2011

How To: Substitute words using vim

It's always nice when you learn something useful. I've been using vim for a while but I only use a fraction of its functionality. Today I picked up a nice little feature for substituting words. While in Normal Mode use:
:%s/word/substitution/gc
The g and c on the end are not required but they suit my needs. The g is to search globally and the c is used so that it will ask you to confirm the substitution each time it comes across a matching work. Always better to play it safe.

Wednesday, July 06, 2011

How To: Install Unreal 2004 on Ubuntu Linux

It's unfortunate that Epic will never release a native Linux installer for UT3 but UT2004 is still, after all these years, a great game to play after a long day at work.

This guide aims to provide all the steps needed to get up and running in Ubuntu 11.04 (64-bit), as well as a few additional tweaks. Much of the information here was found on the Ubuntu Forums, I just wanted to keep it all together. The installation was done using the DVD version of the game (released by Atari).

Things to consider before you continue

Unreal 2004 is pretty old now so it's not just a case of running the installer. There is nothing hard about the installation though. The two main issues are that the game requires an old version of the GNU Standard C++ Library and the sound uses OSS (Open Sound System) which has been disabled in Ubuntu for some time. Another problem that effects 64 bit users is that after applying the 3369.2 patch the game does not start. This is easily remedied by editing the startup script.

Download libstdc++.so.5

Ubuntu 11.04 uses libstdc++.so.6 but libstdc++.so.5 is still available through the repositories:
sudo apt-get install libstdc++5

Run the installer

When running the installer, I recommend using the default settings as it'll make things easier. When the installation is complete it'll ask if you want to run the game select no otherwise you'll be running it as the root user.
sudo sh /media/UT2004_DVD/linux-installer.sh

Update to the latest patch - 3369.2

December 2005 saw the last patch for the game being released: ut2004-lnxpatch3369-2.tar.bz2
To install it the contents need to be extracted then copied to the installation directory (which be default is "/usr/local/games/ut2004/").
tar -jxvf ut2004-lnxpatch3369-2.tar.bz2
cd UT2004-Patch/
sudo cp -R * /usr/local/games/ut2004/


Fix the startup script

After patching the game I found that running ut2004 from the terminal would no longer start the game. This can be fixed by editing the startup script using a text editor such as gedit or vim to replace 'ut2004-bin' (the 32-bit binary) with 'ut2004-bin-linux-amd64' (64-bit binary):
sudo vim /usr/local/games/ut2004/ut2004

Solve the audio problem

At this point running ut2004 in the terminal should start Unreal. However, you may see an error "open /dev/[sound/]dsp: No such file or directory" and find there is no sound. You can get around this by launching the game with the PulseAudio OSS Wrapper (padsp):
padsp /usr/local/bin/ut2004

Create a launcher

To make the integration with the Ubuntu desktop a little nicer I chose to create my own launcher. To start with I got a 256x256 pixel png icon for the game and moved it to "/usr/share/icons/hicolor/256x256/apps/" and set the permissions for it:
sudo mv ut2004-256px.png /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
sudo chown root:root /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
sudo chmod 644 /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png

I then created a .desktop file in "~/.local/share/applications/". This can be done in any text editor using something like:
gedit ~/.local/share/applications/ut2004.desktop
Then it's just a case using the following within the file:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=/usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
Name[en_GB]=Unreal 2004
Exec=padsp /usr/local/bin/ut2004
Name=Unreal 2004
Icon=/usr/share/icons/hicolor/256x256/apps/ut2004-icon.png

You will need to log out and back in again, then the launcher will be available along with the rest of your applications.

Improve the graphics and enable dynamic shadows

Ok that's it you're done. You should start the game up and configure the settings for optimum performance. Most people by now will have a pc that can easily play this at full settings. Once you've had a play around with the game and already maxed all the settings in the game menu, do the following for that little extra.

In your home directory will be a hidden .ut2004 folder that contains your save games and settings. Some parameters will need to be set in UT2004.ini and User.ini. Find the relevant sections as described below. For the sections that require an amount in MB, make sure to use a value based on your hardware.

~/.ut2004/System/UT2004.ini

[Engine.Engine]
DetectedVideoMemory=384 (Number in MB, usually set to 0 by default)

[Engine.GameEngine]
CacheSizeMegs=128 (Number in MB, usually set to 64. Set higher for better performance)

[OpenGLDrv.OpenGLRenderDevice]
UseRenderTargets=True (required for dynamic shadows)
UseVSync=True (Set False by default. 'True' provides a more consistent framerate.)
UseVBO=True (Gives access to the OpenGL VBO. Set True for performance gain.)
UseVSync=True (This appears twice in the settings, for some reason. Set this to True as well.)
UsePixelShaders=True (Set to False by default. Gives access to pixel shaders.)

~/.ut2004/System/User.ini

[UnrealGame.UnrealPawn]
bPlayerShadows=True
bBlobShadow=False

[Engine.Vehicle]
bVehicleShadows=True

Wednesday, June 08, 2011

31 years old today

It's my birthday today so I'd booked the day off work. This didn't stop me from working however. I spent a few hours finishing off some integration tests that I was working on yesterday. Doing work on a day off really shows how things have changed for me since I went to University. Five years ago I wouldn't have worked on a day off but since finding work in IT my entire outlook has changed.

I did make sure that I spent some of the time relaxing however. After a short blast of Crysis 2 I turned my attention toward reading about John Carmack and id Tech. I really hope that id Tech 4 will be open sourced soon.

Wednesday, May 04, 2011

I'm now on to my 4th Steinberger guitar

Ned Steinberger's headless guitars have always appealed to me. The first one I owned was a bass which I'd purchased in my teens. I've since had a "Steinberger Spirit GT Pro Deluxe" and a "Steinberger Spirit GU-7R" which I recently sold. The Spirit range are the budget versions made of wood with EMG Select pickups. My most recent Steinberger, which arrived today, is the real deal. A Steinberger Synapse SS2F in white. This thing is a combination of graphite and hard maple with two EMG USA pickups (EMG-81 & EMG-85). It sounds amazing and is with out a doubt the best guitar I've owned.

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.
/usr/share/ati/fglrx-uninstall.sh
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:
/usr/src/kernels/
So for example, typing uname -r I could see my kernel version was 2.6.35.10-74.fc14.x86_64, so once I installed the kernel-devel package:
yum install kernel-devel
I had the following folder:
/usr/src/kernels/2.6.35.10-74.fc14.x86_64/
The Catalyst installer will also need the gcc compiler so make sure that is also installed:
yum install gcc
Download the ati-driver-installer-11-1-x86.x86_64.run 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 ati-driver-installer-11-1-x86.x86_64.run
Then run the file:
./ati-driver-installer-11-1-x86.x86_64.run
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:
/usr/share/ati/fglrx-install.log

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:
ftp://ftp.idsoftware.com/idstuff/doom3/linux/doom3-linux-1.3.1304.x86.run
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:
  • libX11.so.6
  • libXext.so.6
  • libGL.so.1
  • ld-linux.so.2
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 libX11.so.6
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 libXext.so.6
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 libGL.so.1
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 ld-linux.so.2
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/doom3-linux-1.3.1302.x86.run
Now you can run the install file using:
# sh /path/to/installer/doom3-linux-1.3.1302.x86.run
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 hwhq.com 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 OpenOffice.org 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:
/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/

Download the new versions:
ftp://qa-upload.services.openoffice.org/jl162/libjvmfwk.dylib.3
ftp://qa-upload.services.openoffice.org/jl162/sunjavaplugin.dylib

Backup original libs:
mv /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3 /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3_BAK
mv /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib_BAK

Copy the new libs files in place:
cp ~/Downloads/libjvmfwk.dylib.3 /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3
cp ~/Downloads/sunjavaplugin.dylib /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib

Tuesday, June 29, 2010

Going to Guatemala

Since completing my degree course I immediately started working full time hours. It's been non-stop over the last three years but for the next two weeks I'm finally going to be taking a well deserved break. In a few hours I'll be flying out to Guatemala, which will be my first time crossing over the Atlantic. I recently got a new job for a software company so on my return I expect to be pretty busy finding my feet for a while.