Dosemu

Jump to: navigation, search
DOSEMU stands for DOS Emulation, and allows you to run DOS and many DOS programs, including many DPMI applications such as DOOM and Windows 3.1, under Linux. A virtual machine (the DOS box) provides the necessary BIOS functions and emulates most of the chip devices (for example: timer, interrupt, and keyboard controller).
dosemu

SimCity in dosemu.jpg

SimCity 2000 running in dosemu.


Developer: Many - see AUTHORS file
License: GNU GPLv2
Web: http://www.dosemu.org


Installing and configuring

You can start DOSEMU using

$ dosemu

If you have never used DOSEMU before, and FreeDOS is present, then DOSEMU will boot, and present you with a welcome screen and a C:\> command prompt.

If for some reason it does not start, or DOSEMU crashes somewhere, look at ~/.dosemu/boot.log for details.

Starting with version 1.0.2, DOSEMU configuration files are no longer in /etc but in the user's HOME directory in ~/dosemu. DOSEMU no longer has the SUID bit set, so if you need access to hardware that requires root privileges, you must run DOSEMU as root.

Remember, that you can't use <Ctrl>-C within DOS to exit from DOS. For this you need to execute exitemu or, when using the 'DOS in a BOX' <Ctrl><Alt><PgDn>.

Your DOS drives are set up as follows:

Name Drive
A: floppy drive (if it exists)
C: points to the Linux directory ~/.dosemu/drive_c. It contains the files config.sys, autoexec.bat and a directory for temporary files. It is available for general DOS use.
D: points to your Linux home directory
E: points to your CD-ROM drive, if it is mounted at /media/cdrom
Z: points to the read-only DOSEMU and FreeDOS commands directory It actually points to ~/mydos/dosemu/drive_z; it appears read-only inside DOSEMU.

You can adjust these settings by editing ~/.dosemurc, c:\config.sys, or c:\autoexec.bat, or change the symbolic links in ~/.dosemu/drives.


DOSEMU modes of operation

There exist various ways of starting DOSEMU, depending on the environment and certain command line options. By default, in X, it will start using a special 'DOS in a Box' which provides a usual PC setup, using a 80x25 text mode. It also supports graphics. The box can be rescaled by dragging the window borders using the mouse.

However, in certain situation you may want to use a different mode.


Terminal mode

Terminal mode is automatically entered if you do not have X available, for instance when logging in remotely from a Windows system or at the Linux console. You can force it using:

$ dosemu -t

In this mode the display of graphics is impossible, but you can use full-screen DOS text mode applications. It is advisable to give the terminal window a size of 80 by 25 characters, or use "stty cols 80 rows 25" on the Linux console, before starting it because many DOS applications are confused about other sizes.

You can use the $_internal_char_set option in ~/.dosemurc or /etc/dosemu.conf to change the code page that DOSEMU thinks that DOS is using.


Dumb mode

For DOS applications that only read from standard input and write to standard output, without any full-screen usage, you can use dumb mode. To use this you must invoke DOSEMU like

$ dosemu -dumb

this has the advantage that

  1. the output of the DOS application stacks up in your scroll buffer and
  2. you can redirect it to a file such as
$ dosemu -dumb dir > listing
Note that editing is often restricted to BACKSPACE'ing.


SDL mode

You can start dosemu with the "-S" option to use the SDL library. In X it will just look like a regular DOS in a Box but with a different shaped text mode mouse cursor. You can also use this mode on frame buffer consoles.

$ dosemu -S

Console graphics mode

Console graphics mode is the hardest to setup and may potentially lock up your system, but if it works it gives you direct VGA hardware access which may be quicker and more accurate than the emulation used in X.

Icon-warning.png
Warning: If you need access to hardware that requires root privileges, you must run DOSEMU as root!

If you rely on the old configuration scheme, you can get it back by using dosemu.bin instead of dosemu (dos and xdos have been renamed to dosemu and xdosemu).


Running a DOS program directly from Linux

You can use something like

$ dosemu "/home/user/games/commander keen/keen1.exe"

which will automatically cause the DOS in DOSEMU to

  • cd to the correct directory,
  • execute the program automagically,
  • and quit DOSEMU when finished.


See also


External Links