2. Compiling and installing dosemu

2.1. Where are the installation instructions?

The installation instructions are in the file INSTALL, included in the distribution.

2.2. Top problems while compiling and installing dosemu.

  1. Forgetting to read the README and INSTALL.

  2. Try to compile some old version of dosemu.

  3. Use dosemu with a kernel that does not have IPC compiled in.

  4. Compile with gcc older than 2.95.2, egcs older than 2.91.66 (1.1.2) or glibc older than 2.1.3.

  5. Forgetting to use a dosemu-freedos-bin tarball when no other DOS is available on the system.

  6. Run DOSEMU with partition access while they are already mounted.

2.3. How do I make a.out binaries?

Starting with version 0.64.4 there is no a.out support any more. If you absolutely need it, you must use version The configure script then should take care for this, if your setup is a standard setup.

2.4. How do I compile dosemu on a machine with low memory?

Marty Leisner reported (95/4/8) that:

If you have problems with running out of swap space you may want to add CFLAGS+=-fno-inline after CFLAGS is defined in src/dosext/dpmi/Makefile. Be careful before you do this and check for the existence of swap space. I found Linux crashes at times when it has no swap space.

2.5. Compilation fails with some strange error regarding "slang"

You probably have plugin_slang off in your compiletime-settings file. You need to change it to plugin_slang on and recompile.

2.6. What configurable options are available?

The compiletime-settings.help file describes the options you can change at compile time. README.txt describes the options you can change at run time.

2.7. Do I need to run dosemu as root?

No. Although most of dosemu drops root privilege after initialization, it is still safer to not run dosemu as root. Most normal DOS applications don't need dosemu to run as root, especially if you run dosemu under X. Thus you should not allow users to run a suid root copy of dosemu, wherever possible, but only a non-suid copy. You can configure this on a per-user basis using the dosemu.users file, or setup a configuration using sudo and use dosemu -s (see INSTALL).

Programs that require direct access to hardware ports (e.g. if the program needs to talk to some unusual hardware that is not supported by Linux and dosemu) require dosemu to run as root but printers, serial ports, mice, video cards and sound are emulated by dosemu so you won't usually need direct hardware access and won't need to run as root to use these. Some programs are just too sneaky for dosemu's hardware emulation to work properly though ...

You will need to edit dosemu.users (see dosemu.users.example) for any suid-root/sudo access beyond console graphics or run dosemu as root for hardware access.

2.8. How do I patch dosemu?

If you do patch dosemu from one version to another, do "make pristine;./configure; make". If you don't make pristine, at least the version of the new executable will be wrong, if the whole thing compiles at all (97/2/9).

2.9. What versions of DOS are known to run with dosemu?

All versions of DOS should work with dosemu, with the following caveats:

DOS 4.01 had problems by itself, so it won't work reliably with dosemu either.

With MsDos-7 aka Win95 you must not start the graphic shell at bootup. If you make the hdimage bootable with the so called "Rescue Disk" you are offered to make during the Windows installation, you get the right settings. If you use your normal Win95 installation to transfer the system files, have a look at the msdos.sys written on the hdimage and change the settings under the section [Options] to have entries like: