Keen in Linux

From KeenWiki

Jump to: navigation, search

This page intends to be a complete tutorial on how to setup your Linux system to run Keen and other DOS applications.

Contents

What you need

  • A x86-based Linux distribution (not tested with non-x86, should work anyway).
  • Commander Keen: any of the official games.
  • DOSBox: you can get the latest version source code at the official website. Some distributions already include DOSBox in their installation media or online package repositories, but most likely it's an outdated version. If you get the latest version at DOSBox's website, you might need to install additional dependences/development packages for building it from source code. The pro is you can get some machine-specific optimizations that may or may not improve DOS programs performance. The dependencies for version 0.70 are:
    • GNU C/C++ compilers, GNU Make: provided by most distributions
    • SDL library (+development package, see above): vital for DOSBox.
    • SDL Sound (+development package): ?
    • SDL Image (+development package): ?
    • C/C++ development files

Compiling DOSBox

Note: if you are not building from source code you can skip this section. Download DOSBox's source code (should be a tarball named dosbox-X.Y.tar.gz, with X and Y the version numbers) and decompress it in any folder where you have read/write access with your regular user account. You can do it via a graphical user interface tool (such as Ark) or manually from a text terminal (you'll have to use it anyway):

$ tar -zxvf dosbox-X.Y.tar.gz

That will decompress the package to the current directory. Then, you might want to check the README and INSTALL files provided in the DOSBox source root directory. You'll probably want complete optimizations, so just:

$ ./configure --enable-inline

To generate the makefiles. You can use any switches with configure if you need them, but don't forget to run configure.

$ make

Running make in the same directory the configure script is located at, will start the building process. At the end, assuming everything built successfully, you can do:

$ make install

And everything will install to the target directory provided by you (./configure --prefix=somedir) or the default (/usr/local). If you are installing DOSBox in /usr/local or any other directory where only root can write to, you'll have to

$ sudo make install

instead. If you don't know the root password (i.e., it is not your computer), you might have wanted to use the --prefix switch in the configure call, so that make install is performed in a directory of your user without root privileges. For example:

$ ./configure --enable-inline --prefix=$HOME

Installs DOSBox to your user home directory when doing make install, so the final DOSBox executable should be in $HOME/bin/dosbox.

Installing DOSBox (RedHat Package Manager)

If you followed the steps above (i.e. built the program from its source code), you don't need to read this section. If you didn't, know that you must have root permissions before installing the RPM package.

Just access the root account and install the RPM:

$ su
Password:
$ rpm -i dosbox-X.Y.rpm
$ exit

And DOSBox will be installed in the /usr tree.

Mounting Keen's directory in DOSBox

Run DOSBox, by:

$ dosbox -c mount C /media/hdaY/somepath

Where -c (etc.) is for automatically mounting /media/hdaY/somepath (real directory) to DOSBox's drive C: (replace the C with any letter you want). After that, assuming you have KEEN.EXE in /media/hdaY/somepath, you just have to enter in DOSBox's command prompt:

Z:\>c:
C:\>keen

Recommendation: mount directories which contain 8.3 filenames (8 letters filename, 3 letters extension) to avoid issues with your DOS-based programs.

Configuring DOSBox for running Keen

You built/installed DOSBox; now you want to play. For some people, it might be a straightforward step, depending on your system specs. Other people might have problems trying to run Keen (i.e. it lags, sound does not work, it needs more memory), so here it is a configuration guide for those who want to manually edit/write the dosbox.cfg file. If you don't want to waste your time with all this stuff, look for GUI frontends in DOSBox's downloads page.

TODO

See also

Keen in Windows

Personal tools