Skip Navigation LinksHome > Descent 3 > Help > Linux Guide

Descent 3 Linux Guide

Written by Stickman

Prerequisites


Descent 3 Linux-specific Files

Contents

1.0 - Foreward (By Ryujin)
2.0 - Introduction
3.0 - Installing from an existing Windows install
     3.1 - If Windows is on the same computer as Linux
     3.2 - If Windows is on another computer
     3.2.1 - VM's
     3.3 - Copying platform-independent files
4.0 - Installing without a previous Windows install
     4.1 - Installing Descent 3 for Windows, but not really (checking for Wine)
     4.2 - Installing Descent 3 using Wine
     4.3 - Patching up
     4.4 - Installing the Mercenary add-on
     4.5 - Copying the Files
     4.6 - Removing unnecessary files
5.0 - Installing Linux-specific files
     5.1 - Unzipping the files
     5.2 - Changing permissions
     5.3 - Converting files to lowercase
     5.4 - Testing the game
     5.5 - Issues with Joysticks

 

1.0 - Foreward (By Ryujin)

The purpose of this helpful article by Stickman is to get you up and running on Linux. What follows is a detailed explanation of how to go about it. For those of you tech gurus, the short version is:  Use your existing copy or install a full Windows copy of the game somewhere (Windows or Wine), copy over the necessary core files to your Linux install, and then overwrite them with the Linux-specific files and set all files except those within the /online directory to be lowercase.  It's really easy actually. You'll be blowing up ships in Skybox in no time!  Read on.

 

2.0 - Introduction

First of all, if you think this is illegal, you're in the wrong place. The whole reason this pack exists is because the only Linux-native port of Descent3 was discontinued years ago, and copies of it are becoming extremely difficult to find. The company is no longer in business, and if they have a problem with me distributing the Linux-specific files, then they may feel free to contact me and ask nicely, and then I'll consider it. THIS IS NOT A FULL COPY OF THE GAME! You still need to buy a copy of Descent 3.

With that said, the increase in Linux use has people clamoring and begging for natively ported games, and I personally can't think of any better than Descent3. This game *deserves* to be played, and you can still pick up a Windows copy at Good Old Games.

The Linux port uses OpenGL for graphics, which doesn't support bump-mapping and a few other things. However, I have extensively benchmarked the Linux and Windows versions back-to-back on the same machine, and if anything, they run almost identically. People with buggy drivers may experience diversities, but all other things being equal you should if anything see slightly higher framerates in Linux, because it uses fewer resources, and you can tweak the system more easily. The only real requirement is a graphics card that supports OpenGL in Linux. Almost all nVidia, ATI, and Intel graphics chips are supported. Other than those, you're on your own.

On to the installation! There's two ways to do this: use an existing Windows install, or do it from scratch if Windows is not available (snicker). You'll see commands shown as starting with "user@linux$" which is the shell prompt. Don't type that part. Most newer Linux distros have a disabled root account, but you can get the same effect by using the "sudo" command to run anything that needs root privileges. I've modified the HOWTO accordingly, as using "sudo" should work on all distros.

 

3.0 - Installing from a Windows install

Okay, to do this, I used a pre-patched (1.4) Windows install, with the Mercenary add-on. This is by far the easiest way to do it. I have NOT tried it without patching the Windows version first! 1.5 patch should work, as only the MAIN.EXE and DMFC.DLL (and netgame files) are different, and we won't be using them anyway. Remember, everything in Linux is CASE SENSITIVE!

 

3.1 - If Windows is on the same computer as Linux

In Linux, mount your windows drive somewhere, like "/mnt/windows" or wherever. To do this, type

    user@linux$ sudo mount -t ntfs /dev/hda1 /mnt/windows

where /dev/hda1 is your windows partition (hda1 = first drive, first partition).

Your Windows install of D3 would then most likely be located at "/mnt/windows/Games/Descent3"

 

3.2 - If Windows is on another computer

In Windows, right-click the "C:\Games" folder and click "Sharing" to share it. Follow the instructions. You can share the folder as "games". Then open a command prompt and type "ipconfig" to see the machine's IP address. (note: do NOT share your machine's C:\ directory! It's already shared, and should be password protected anyway!)

In Linux, mount the network share by typing like so (substitute your Window machine's IP of course):

    user@linux$ sudo mount -t smbfs //192.168.1.666/games /mnt/windows -o username=guest,password=

Your Windows install of D3 would then most likely be located at "/mnt/windows/Descent3"

 

3.2.1 - VM's

Since I originally wrote this 5 years ago (as of Feb. 2010) the world of VM computing has exploded. Several really good free VM frontends like Virtualbox make having separate boxes almost obsolete. You can install Descent3 in a VM and copy the files over, it would work almost exactly like doing it over a network, as explained in section 1.2 only you would use the VM's built-in shared folder capabilities.

 

3.3 - Copying the platform-independent files

Create a directory like so:

    user@linux$ sudo mkdir /usr/local/games/Descent3

and here's what to copy over: (ALL FILES HAVE TO BE RENAMED TO ALL LOWERCASE! See section 3.3 for an easy way to do this!)

  • d3.hog
  • PPICS.HOG
  • EXTRA.HOG
  • EXTRA13.HOG
  • custom/* (where all your cool audio taunts and graphics are)
  • demo (can be empty)
  • missions/* (copy everything!)
  • movies/End.mve
  • movies/intro.mve
  • movies/Level1.mve
  • movies/Level5.mve
 The following files are for the Mercs Add-on only:
  • merc.hog
  • movies/mi.mve
  • movies/me.mve
  • missions/bluedev.mn3
  • missions/bluedev.txt
  • missions/bside.mn3
  • missions/bsidectf.mn3
  • missions/chaos.mn3
  • missions/havoc.mn3
  • missions/kata12.mn3
  • missions/kata12.txt
  • missions/mayhem.mn3
  • missions/merc.mn3
  • missions/poe.mn3
  • missions/stonecutter.mn3
  • missions/stonecutter.txt
  • missions/tri-pod.mn3
  • missions/tri-pod.txt

That's all you *need* from the Windows version! You could also copy the whole thing by typing:

    user@linux$ sudo cp -vR /mnt/windows/Games/Descent3/* /usr/local/games/Descent3

Doing this will copy over your pilots, taunts, logos, levels, etc. all at once. This is probably the easiest and fastest way to do it. Make sure you rename all the files *lowercase!!!!!* Yes, it matters!

Proceed to section 5, "installing the Linux-Specific files"

 

4.0 - Installing without a previous Windows install

Okay, obviously, you're going to need the Windows install CD's at least. For some dumb reason, Interplay stores all the files on the CD in a proprietary compressed format. Probably the most painless way to extract them is to use "wine" to "install" the game, copy the files, and then delete the folder. Here's how you do it:

 

4.1 - Installing Descent 3 for Windows, but not really (checking for wine)

Your Linux distro should have come with the option of installing "wine" which is a Windows API compatability layer. It allows you to run some Windows programs in Linux, without actually having to run Windows. "Why don't you just run Descent3 under wine?" you ask. Because, the native port has excellent hardware support, and the Windows version still requires DirectSound, among other things... trust me, using the native Linux version is a hundred times better.

To see if you have wine, type:

    user@linux$ wine --version

and you should see something like

    Wine 20050725

If you see "command not found" then you need to read the software instructions for your distro and install it. In Ubuntu, it would be: "sudo apt-get install wine"

 

4.2 - Installing D3 using wine

Pop in your Windows CD #1 and it should auto-mount. It will show up somewhere like "/mnt/cdrom" or "/media/cdrecorder" or maybe "/media/dvd". If all else fails, click the "CD-Rom Device" icon on your desktop! It should show you in the address bar where it's mounted.

Now we change to the CD's directory, let's say it's /media/cdrecorder:

    user@linux$ cd /media/cdrecorder

And then we run the setup like so:

    user@linux$ wine ./Setup.exe

It's case sensitive. The first time you run wine, it will create a /home/$USER/.wine folder, which is where your "Virtual Windows" will be located. This is normal. 

*nOOb alert*

You should now see the Descent3 setup program running. If so, read on. If not, check a few things.

    -Does it say "Drive not found"? This means wine doesn't have a drive letter mapped to your CD-rom.

                cd to ~/.wine/dosdevices and type "ls" to see what's there. If it says "file not found" then you have an older version of wine, try upgrading it. If it shows you something like "e: -> /media/cdrecorder" then check to see if it's pointing to where your CD is actually mounted. If not, then create a link to it by typing (NOT as root!):

                                user@linux$ ln -s /media/cdrom e:

                (Of course, substitute your drive's mountpoint for "/media/cdrom") Now try it again.

 

You can choose either "Standard" or "Full" installs here. If you choose 'Standard" then you'll have to copy the movie files over manually from both CDs. Not a big deal. If in doubt, just choose "Full".  It should ask you to change disks, and as long as your system automounts them, it should work (automounting may take a while). Once it's finished, it'll run (or try to run) the preview video. You may have to sit through it, but even if you close it, the install is completed. Do NOT run D3 yet!

 

4.3 - Patching Up

Now that you have the files installed, I highly recommend patching them to the most usable version (1.4). To do this, download the patch from here.

If you have a dual-jewel version that came from Wal-mart (bundled with the Mercs CD) then you'll have to run the Dual-Jewel fix and THEN the 1.4 patch. To download them to your desktop, type as follows:

*nOOb alert* you can highlight the commands with the mouse, copy them, and in the console press "Shift-Insert" to paste them!

    user@linux$ cd Desktop

    user@linux$ wget http://www.descentvalhalla.com/files/d3/patches/d3_us_1.0_djfix.exe

    user@linux$ wget http://www.descentvalhalla.com/files/d3/patches/d3us14patch.zip

    user@linux$ wine ./*d3_us_1.0_djfix.exe

    user@linux$ unzip ./d3us14patch.zip

    user@linux$ wine ./D3_US_1.4_Patch.exe

To get the 1.4 patch to install correctly, you're going to have to do a little bit of hacking. In the box where it asks you to locate Descent3.exe, you'll notice you can't locate the .wine directory!!

*n00b tidbit: any file or folder that starts with a dot is hidden!*

So how do we make this work? Click the "Up one folder" button to get to your home directory. The ".wine" doesn't show, so we'll type it in as such:

    ".wine/drive_c/Games/Descent3/Descent3.exe"

Click "Open" and it should ask you if you want to patch. Say yes, and let it do its thing.

 

4.4 - Installing the Mercenary Add-On

We're going to do this just like we did the others. Insert the Merc CD:

    user@linux$ cd /media/cdrecorder

    user@linux$ wine ./SETUP.EXE

And you're done! This step is necessary for a few reasons. One, the files aren't accessible directly from the CD. And two, you need the Merc Add-on to use the Black Pyro ship.

 

4.5 - Copying the Files

Now that we have all the files we need we can copy them to the new Linux Descent3 directory. We'll create it thusly:

    user@linux$ sudo mkdir /usr/local/games/Descent3

And if you want things quick and easy, copy *everything* from the fake Windows install there with:

    user@linux$ sudo cp -vR ~/.wine/drive_c/Games/Descent3/* /usr/local/games/Descent3

(Of course, substitute "stickman" for whatever your username is) You will have to rename any UPPERCASE files, see section 3.3

 

4.6 - Removing Unnecessary Files

At this point, we're ready to add the Linux files. If you like things tidy, then you'll want to only copy what's needed. See section 1.3 on which files are specifically needed! You can also delete "~/.wine/drive_c/Games/Descent3" to free up space. For that matter, if you've never used wine before now, you can safely remove the entire ".wine" directory, it'll create a new one again the next time you use it, just like it did at first!

 

5.0 - Installing the Linux-Specific Files

This is probably the shortest and easiest part of the whole process. Here's a list of the actual files we will need from the Linux version:

  • descent3 (executable)
  • nettest (executable)
  • descent3.dynamic (executable)
  • icon.xpm (the executable doesn't have an icon, like in Windows)
  • d3-linux.hog (you have to have this!)
  • netgames/Anarchy.d3m
  • netgames/co-op.d3m
  • netgames/ctf.d3m
  • netgames/entropy.d3m
  • netgames/hoard.d3m
  • netgames/hyperanarchy.d3m  (need to rename to "hyper-anarchy.d3m")
  • netgames/monsterball.d3m
  • netgames/robo-anarchy.d3m
  • netgames/tanarchy.d3m     (need to rename to "team anarchy.d3m")
  • online/Direct TCP~IP.d3c
  • online/Parallax Online.d3c (not really needed, it doesn't work anymore anyway)

 

5.1 - Unzipping the Files

You've probably already opened this archive with some graphical archiving tool. Otherwise, how would you be reading this? But seriously, we need to extract the Linux files into the right place as such (assuming you saved this file on the desktop):

    user@linux$ cd /usr/local/games/Descent3

    user@linux$ sudo tar -xvzf ~/Desktop/D3-linux-files.tar.gz

And you should see a stream of filenames scrolling by as it extracts them.  That was easy, no?

 

5.2 - Changing Permissions

Since we've been creating directories as root, and we want *everybody* to be able to play, we need to change permissions on the directory. We do this first by changing its ownership (replace stickman with your username):

    user@linux$ sudo chown -R stickman:users /usr/local/games/Descent3

And then we make it readable by everybody:

    user@linux$ sudo chmod -R a+r /usr/local/games/Descent3/*

You'll also want to make a link by typing:

    user@linux$ sudo ln -s /usr/local/games/Descent3/descent3 /usr/local/bin/descent3

This lets you start the game without having to type the whole path.

 

5.3 - Converting Files to Lowercase

This will save you TONS of headaches! Copied the Merc files over, but they're not showing up? Something not working right? THIS IS HOW YOU FIX IT! This simple little script converts ALL files in the directory it's run in to *all lowercase* which is what the Linux version of D3 is expecting! You can run this script in ALL the directories EXCEPT the "online" folder, just in case you forgot to rename something. Just copy and paste (shift+insert) and hit enter to run it. YOU HAVE TO RUN THIS for the movies, levels, and so on to work.

===snip===

for file in *; do mv $file $(echo $file | tr [[:upper:]] [[:lower:]]); done

===snip===

It doesn't work if the files have spaces in their names, and you should NOT run it in the "online" folder. You should only have to use this in the "missions" and "movies" folder, and maybe in the main Descent3 folder.

 

5.4 - Testing The Game

The first time you start the game, it will create a new "~/.loki/descent3" folder.

If you want to use your old taunts and graphics, copy the Windows "Descent3\custom" folder to "~/.loki/descent3/custom"

Local user-specific files and settings will override the main ones. This way each person who logs in can have their own settings, savegames, logos, etc. Anything you put in the "/usr/local/games/Descent3/custom" folder will be usable by everybody.

 

5.5 - Issues with Joysticks, etc.

Descent 3 normally looks for joystick devices at /dev/js0 and /dev/js1, and so forth. However, many new distros will load USB joysticks as "/dev/input/js0" and D3 will not see them.

To fix this, run: "sudo ln -s /dev/input/js0 /dev/js0" which makes a link where D3 will see it.

If you get an error about "libGL not found" that's because either 1. you don't have an OpenGL compatible video card, or 2. D3 is looking for a version of the GL library called

"/usr/lib/libGL.so"

But chances are in your distro, it's actually called something like:

"/usr/lib/libGL.so.185.18.36"

It still works the same, so once again symlinks to the rescue. Use something like this to create a link to the real libGL: (change it to match your actual libGL file)

    user@linux$ sudo ln -s /usr/lib/libGL.so.185.18.36 /usr/lib/libGL.so

Also, all the Linux D3 command line switches are *DIFFERENT!* Try this for starters:

    user@linux$ descent3 -n -c -f -o

This starts it with No intro, no Cd, Fullscreen, and Opengl (default). These included files were taken from the 1.4b Linux version, so you should NOT need to download and run the Linux-specific patches. Munk was brilliant enough to write up a nifty program that works around the nefarious "Linux Checksum Bug" which is actually a bug in the Windows version... these two revelations (that, and what you're reading now) will allow you to toss that Windows box permenantly! Munk's checksum workaround is available for download from my website.

Happy Hunting! I'll see you in the mines.

 

Questions?

  1. Run a search on the forums and if you can't find the answer, make a post! There are very helpful Descenters there.
  2. Pose your question in chat at #Descent3 on irc.gamesurge.net