10. Problems and fixes

10.1. Security issues

A full featured Dosemu needs to be suid root, e.g to access ports. Most dos programs don't need this however so when running under X you usually do not need to run dosemu as root. Dosemu runs as suid "root" only at the initialization stage, and drops this right thereafter, except in a forked "port server" (where necessary). But with DPMI, the Dos client program can access the whole user space, hence also can modify the dosemu code itself. This cannot lead to privilege elevation but may crash DOSEMU. There are several other important security considerations discussed in the Security section of README.txt.

10.2. dosemu says "ERROR: general protection" and terminates when I run some program

This will happen if your program uses DPMI and you do not have DPMI enabled. Try changing the line:

    $_dpmi = (off)

in dosemu.conf to:

    $_dpmi = (nnnn)

where nnnn is the number of kilobytes of memory you wish to give to the DOS program (e.g. Doom requires about 4000 kilobytes).

Another likely cause is that your program uses VCPI (see EMUfailure.txt for more details) or some other means of switching to protected mode (other than DPMI), in which case it will never work under dosemu.

If none of these is the case, see Section 1.14.

10.3. Dosemu dies when booting. I have Win95 installed.

Dosemu relies that the Dos-Version on the hdimage and the Drive you map to contain command.com are the same. If not, dosemu will crash sooner or later. With the dual boot option Win95 offers when pressing the F4, F5 and F8 keys with the "Starting Win95" text, versions on the Win95 drive may swap. Take special care for command.com. Let your shell variable in config.emu point to the correct static version of command.com, e.g.: shell=c:\win95\command.com c:\ /P /E:1024 (97/02/28)

10.4. Dosemu hangs! How can I kill it?

Switch to another console and type dosdebug, then type kill (it may take a while but will work eventually).

10.5. Dosemu crashed and now I can't type anything.

Daniel Barlow reported (95/4/8) that:

If you have no terminal or network access that you can use to log in, you may have to press the reset button. If you can still get a usable shell somehow, run kbd_mode -a to switch the keyboard out of raw mode, and/or stty sane on the console so that you can see what you're typing.

A useful thing to do is to use a script to run dosemu, and run kbd_mode -a automatically right after dosemu. When dosemu crashes, the script usually will resume running, and execute kbd_mode -a.

Alternatively, if the magic SysRq key is enabled in the Linux kernel, you can use Alt-SysRq-r to switch to xlate mode, and use Alt-Fn to switch to any other console (including X, if your screen display is thoroughly broken).

10.6. I've enabled EMS memory in dosemu.conf but it does not help.

Rob Janssen reported (94/7/11): Don't forget to load the provided ems.sys from config.sys.

10.7. How do I get rid of all those annoying "disk change" messages?

(94/8/11) Grab and install klogd. Try:

    ibiblio.org:/pub/Linux/system/Daemons/sysklogd1.2.tgz

10.8. Why won't dosemu run a second time after exiting in console mode?

Aldy Hernandez reported (94/7/8): You should disable your video and/or BIOS caching.

10.9. Why will dosemu run in a term but not in the console?

JyiJiin Luo reported (94/4/19): I experienced exactly the same problem before. I figured out all the video shadow in my AMI BIOS must be disabled. Now dosemu runs fine on my system.

10.10. How can I speed up dosemu?

In some cases it is useful to play with the value of the HogThreshold variable in your dosemu.conf file.

Daniel Barlow reported (95/4/8): HogThreshold should now be set to approximately half of the BogoMips value that the system reports on boot.

10.11. How do I see debugging output?

Daniel Barlow reported (95/4/8): As of dosemu 0.60, debugging output is redirected to a file specified on the command line. Use dosemu -D+a -o /tmp/debug to log all debug output to /tmp/debug. There should no longer be any need to redirect stderr.

10.12. Why are my keystrokes echoed ttwwiiccee??

Nick Holloway reported (94/2/22) that:

After running dos after playing with some stty settings, I was getting doubled key presses. I can now reveal what the reason is!

It only happens when dos is run on the console with `istrip' set. This is (I think) because the raw scancodes are mutilated by the `istrip', so that key release events look like key press events.

So, the input processing needs to be turned off when using the scan codes on a console (it wouldn't be a good idea to do it for tty lines).

10.13. Dosemu scrambles my screen?

For those graphics cards not fully supported in dosemu, with allowed console graphics a dosemu crash may leave your console in a scrambles and nearly unusable way. To prepare for that situation, Spudgun posted the following solution. First save your registers when running on the console ~> cat /usr/bin/savetextmode ~> restoretextmode -w /etc/textregs ~> restorefont -w /etc/fontdata Then, when a crash happened, run following script: restoretextmode -r /etc/textregs restorefont -r /etc/fontdata restorepalette

If it doesn't fix it nothing will! I also found having an X server running sometimes put my Vid card's registers into a strange state where this script made things worse I think since changing X servers and/or running savetextmode on a vt while X was running helped. (97/04/08)

10.14. MS FoxPro 2.6 won't run

FoxPro 2.6 doesn't run on network drives. Alexey Naidyonov states on that problem: And I guess your FoxPro files are on lredir'ed disk, yeah? The matter is that FoxPro doesn't run on such disk, but when I said $_hdimage="/dev/hda? ..." in dosemu.conf, it runs.