Play GOG version of Defender’s Quest on Linux

Note: Instructions for Ubuntu 12.10 x64

I bought Defender’s Quest from GOG rather than use the Linux version from the official site. Why?
– Don’t have to pay extra VAT because I’m from EU
– Extra goodies (soundtrack, etc)
– GOG download servers will be up for a long long time, so I’m sure I can always grab the game from there again if I lose my local backup.

FIRST install the demo. See here.

If all that works, leave the demo installed (we’ll use those files).
The following instructions assume you have the demo installed in ~/Games/DefendersQuestDemo.

If so, then proceed:

1/ Buy Defender’s Quest from GOG.com
2/ Download the Mac install file defenders_quest_1.0.0.4.dmg in ~/Downloads
3/ Open terminal (ctrl + alt + t)


cd ~/Downloads
wget http://vu1tur.eu.org/tools/dmg2img-1.6.4.tar.gz
tar xzf dmg2img-1.6.4.tar.gz
sudo apt-get install libghc-zlib-dev libghc-bzlib-dev libssl-dev
cd dmg2img-1.6.4
make
(ignore the warnings, if you have dmg2img file in the current dir after compilation, it should be ok)
./dmg2img -p 4 ~/Downloads/defenders_quest_1.0.0.4.dmg
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop ~/Downloads/defenders_quest_1.0.0.4.img /mnt
cd /mnt/Defenders\ Quest.app/Contents/Resources/Defenders\ Quest.app/Contents/Resources/
rm -fr ~/Games/DefendersQuestDemo/share/*
tar cf - * | ( cd ~/Games/DefendersQuestDemo/share/ ; tar xvf - )
cd ~/Games
mv DefendersQuestDemo/ DefendersQuest
cd DefendersQuest/bin
mv DefendersQuestDEMO DefendersQuest

Now start the game from terminal:

./DefendersQuest &

It should work fine now. Congratulations.

You may get prompt to update your version:

From here you can download the .deb file or whatever version your prefer using.
If you just want to update your game (like I do), select the tar file. It will download it somewhere in /tmp (it says on the screen where it is saved).
Close the game and update your files like this:


cd ~/Games
tar xzf /tmp/FlashTmp.oaD1fm/defenders_quest_1_0_50.tar.gz

Relaunch game and now you have the latest version:

cd ~/Games/DefendersQuest/bin
./DefendersQuest &

Cleanup (optional):

cd
sudo umount /mnt
rm ~/Downloads/defenders_quest_1.0.0.4.*
sudo apt-get purge libghc-zlib-dev libghc-bzlib-dev libssl-dev
sudo apt-get autoremove
rm -fr ~/Downloads/dmg2img*

Defender’s Quest (Demo) on Ubuntu 12.10 x64

Download the needed files.

cd ~/Downloads
wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin
wget http://www.defendersquest.com/files/defenders_quest_demo_1_0_1_linux/defenders_quest_demo_1_0_1.tar.gz

Install 32-bit libs:

sudo apt-get install ia32-libs

(Get a cup of tea since it takes a while).

Now install Adobe Air:

sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
./AdobeAIRInstaller.bin

After Adobe Air installs successfully, just remove the links again:

sudo rm /usr/lib/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0.2.0

To install the game, I use the tarball because I don’t like .deb files that much for games (personal preference).

mkdir ~/Games/ ; cd ~/Games/ ; tar xzf ~/Downloads/defenders_quest_demo_1_0_1.tar.gz
cd DefendersQuestDemo/bin
./DefendersQuestDEMO

This will launch the game in a window. You can select fullscreen & other resolutions from the options, but since this doesn’t really change the size of the game itself, you might just as well play in a window.

Set resolution in “Avadon: The Black Fortress”

For some reason, when starting this game (from Humble Bundle) on linux, I don’t get any screen for settting the resolution. It defaults to 1024*768 fullscreen.

To change it manually just edit this file:

~/.local/share/Avadon/Avadon.ini

GOG versions of Broken Sword 1/2 [ScummVM]

Ubuntu 12.10

sudo add-apt-repository ppa:arx/release
sudo apt-get update
sudo apt-get install scummvm innoextract

Download GOG classic versions in ~/Downloads

cd ~/Downloads
innoextract setup_broken_sword.exe
mkdir ~/Games
mv app ~/Games/Broken_Sword_1_Classic
rm -fr tmp

Now add the game in ScummVM.

Same for BS2, however, the intro vid didn’t work… So I had a look in BS2 folder, the intro file is in a folder called Extras, while in BS1 it’s in a folder called video. Not sure why.. So, after you extracted the game, just do this:

cd ~/Games/Broken_Sword_2_Classic (or wherever you moved the app folder of BS2)
ln -s ./Extras video

Now everything works fine.

Quick Notes: Linux Gaming From Scratch

  1. Download latest stable Ubuntu 64-bit. Put it on USB stick and boot from it (F12).
  2. Next, next, next. Reboot. Done.

Notes on Nvidia drivers

Latest drivers aren’t always available in the Ubuntu repos. The easiest way is probably to add the Ubuntu-X PPA and upgrade from there.

You can check here when the latest drivers are added:
https://launchpad.net/~ubuntu-x-swat/+archive/x-updates/+packages

1. First install linux-source and headers, in Ubuntu 12.10, else it goes terribly wrong (don’t ask me why..)

sudo apt-get install linux-source
sudo apt-get install linux-headers-generic

2. If you already have nvidia drivers installed remove them.

sudo apt-get purge nvidia-current nvidia-current-settings
sudo apt-get purge nvidia-current-updates nvidia-current-updates-settings
sudo apt-get purge nvidia-current-experimental-304 nvidia-current-experimental-304-settings

3. Now add the PPA and install the driver.

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
(reboot)

Add additional software

Skype:

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt-get update
sudo apt-get install skype

Spotify:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
sudo sh -c 'echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list'
sudo apt-get update && sudo apt-get install spotify-client-qt

Desura:

wget http://www.desura.com/desura-x86_64.tar.gz
tar xvzf desura-x86_64.tar.gz
mkdir ~/Games
mv desura ~/Games
cd ~/Games/desura
./desura &

Steam:

cd ~/Downloads
wget http://media.steampowered.com/client/installer/steam.deb
software-center steam.deb

Mumble:

sudo apt-get install mumble

Tweaks

Use fluxbox instead of Unity
sudo apt-get install fluxbox

1/ sudo apt-get install preload
2/ ext4:
– noatime,barrier=0,errors=remount-ro
– GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash rootflags=data=writeback” in /etc/default/grub
3/ swapiness
Add vm.swappiness=10 in /etc/sysctl.conf
4/ disable cups & bluetooth
/etc/init/cups.conf
/etc/init/bluetooth.conf
Comment the line with “start on”.
5/ Reboot