This section of the document by Hans, <email@example.com>. Last updated on Mar 20, 1998.
Most of DOSEMU configuration is done during runtime and per default it expects the system wide configuration file /etc/dosemu.conf optionally followed by the users /.dosemurc and additional configurations statements on the commandline (-I option). The builtin configuration file of a DEXE file is passed using the -I technique, hence the rules of -I apply.
In fact /etc/dosemu.conf and /.dosemurc (which have identical syntax) are included by the systemwide configuration script /var/lib/dosemu/global.conf, but as a normal user you won't ever think on editing this, only dosemu.conf and your personal /.dosemurc. The syntax of global.conf is described in detail in README-tech.txt, so this is skipped here. However, the option -I string too uses the same syntax as global.conf, hence, if you are doing some special stuff (after you got familar with DOSEMU) you may need to have a look there.
In DOSEMU prior to 0.97.5 the private configuration file was called /.dosrc (not to be confused with the new /.dosemurc). This will work as expected formerly, but is subject to be nolonger supported in the near future. This (old) /.dosrc is processed after global.conf and follows (same as -I) the syntax of global.conf (see README-tech.txt).
The first file expected (and interpreted) before any other configuration (such as global.conf, dosemu.conf and /.dosemurc) is /etc/dosemu.users. Within /etc/dosemu.users the general permissions are set:
Each line in dosemu.user corresponds to exactly one valid user count, the special user `all' means any user not mentioned earlier. Format:
The below example is from etc/dosemu.users.secure, which you may copy to /etc/dosemu.users.
Note that the above `restricted' is checked in global.conf and will disable all secure relevant feature. Setting `guest' will force setting `restricted' too.
The use of `nosuidroot' will force a suid root dosemu binary to exit, the user may however use a non-suid root copy of the binary. For more information on this look at README-tech, chapter 11.1 `Priveleges and Running as User'
Nevertheless, for a first try of DOSEMU you may prefer etc/dosemu.users.easy, which just contains
to allow evrybody all weird things. For more details on security issues have a look at README-tech.txt chapter 2.
After /etc/dosemu.users /etc/dosemu.conf (via global.conf) is interpreted, and only during global.conf parsing access to all configuration options is allowed. Your personal /.dosemurc is included directly after dosemu.conf, but has less access rights (in fact the lowest level), all variables you define within /.dosemurc transparently are prefixed with `dosemu_' such that the normal namespace cannot be polluted (and a hacker cannot overwrite security relevant enviroment variables). Within global.conf only those /.dosemurc created variables, that are needed are taken over and may overwrite those defined in /etc/dosemu.conf.
The dosemu.conf (global.conf) may check for the configuration variables, that are set in /etc/dosemu.users and optionaly include further configuration files. But once /etc/dosemu.conf (global.conf) has finished interpretation, the access to secure relevant configurations is (class-wise) restricted while the following interpretation of (old) .dosrc and -I statements.
For more details on security setings/issues look at README-tech.txt, for now (using DOSEMU the first time) you should need only the below description of /etc/dosemu.conf ( /.dosemurc)
All settings in dosemu.conf are just variables, that are interpreted in /var/lib/dosemu/global.conf and have the form of
where `n' ist a numerical or boolean value and `s' is a string. Note that the brackets are important, else the parser won't decide for a number expression. For numers you may have complete expressions ( such as (2*1024) ) and strings may be concatenated such as
Hence a comma separated list of strings is concatenated.
Controling amount of debug output
DOSEMU will help you finding problems, when you enable its debug messages. These will go into the file, that you defined via the `-o file' or `-O' commandline option (the later prints to stderr). In dosemu.conf you can preset this via
where the string contains all you normally may pass to the `-D' commandline option (look at the man page for details).
Basic emulaton settings
To enable INT08 type timer interrupts set the below on or off
Wether a numeric processor should be shown to the DOS space
Which type of CPU should be emulated (NOTE: this is not the one you are running on, but your setting may not exeed the capabilities of the running CPU). Valid values are: 8086
To let DOSEMU use the Pentium cycle counter (if availabe) to do better timing use the below
For the above `rdtsc' feature DOSEMU needs to know the exact CPU clock, it normally calibrates it itself, but is you encounter a wrong mesurement you may overide it such as
NOTE: `$_rdtsc' and `$_cpuspeed' can not be overwritten by /.dosemurc.
If you have a PCI board you may allow DOSEMU to access the PCI configuration space by defining the below
Defining the memory layout, which DOS should see:
Note that (other as in native DOS) each piece of mem is separate, hence DOS perhaps will show other values for 'extended' memory. To enable DPMI (by giving it memory) is a security concern, so you should either not give access to dosemu for normal users (via /etc/dosemu.users) or give those users the `restricted' attribute (see above).
There are some features in DOSEMU, that may violate system security and which you should not use on machines, which are `net open'. To have atleast a minimum of protection against intruders, use the folling:
The above is a string of which may be given or not, hence
would only effect execution of DEXEs. If you are not a `restricted' user (as given via /etc/dosemu.users) the above settings won't apply. To disable security checking atall set
NOTE: `$_secure' can not be overwritten by /.dosemurc.
For the similar reasons you may `backout' some host, which you don't like to have access to dosemu
The items in the lists are blank separated, `odd_hosts' checks for remote logins, `diskless_hosts' are meant to be maschines, that mount a complete tree, hence the checked host is the host DOSEMU is running on (not the remote host). However, read README-tech,txt for more details on what actually is disabled.
NOTE: `$_*_hosts' can not be overwritten by /.dosemurc.
If you want mixed operation on the filesystem, from which you boot DOSEMU (native and via DOSEMU), it may be necessary to have two separate sets of `config.sys,autoexec.bat,system.ini'. DOSEMU can fake a different file extension, so DOS will get other files when running under DOSEMU.
As you would realize at the first glance: DOS will not have the the CPU for its own. But how much it gets from Linux, depends on the setting of `hogthreshold'. The HogThreshold value determines how nice Dosemu will be about giving other Linux processes a chance to run.
If you have hardware, that is not supported under Linux but you have a DOS driver for, it may be necessary to enable IRQ passing to DOS.
Here you tell DOSEMU what to do when DOS wants let play the speaker:
And with the below may gain control over real ports on you machine. But: WARNING: GIVING ACCESS TO PORTS IS BOTH A SECURITY CONCERN AND SOME PORTS ARE DANGEROUS TO USE. PLEASE SKIP THIS SECTION, AND DON'T FIDDLE WITH THIS SECTION UNLESS YOU KNOW WHAT YOU'RE DOING.
NOTE: `$_ports' can not be overwritten by /.dosemurc.
This section applies whenever you run DOSEMU remotely or in an xterm. Color terminal support is now built into DOSEMU. Skip this section for now to use terminal defaults, until you get DOSEMU to work.
`term_updfreq' is a number indicating the frequency of terminal updates of the screen. The smaller the number, the more frequent. A value of 20 gives a frequency of about one per second, which is very slow. `escchar' is a number (ascii code below 32) that specifies the control character used as a prefix character for sending alt, shift, ctrl, and function keycodes. The default value is 30 which is Ctrl-^. So, for example,
When running DOSEMU from console (also remote from console) or X you may need to define a proper keyboard layout. This is done either by choosing one on the internal keytables or by loading an external keytable from /var/lib/dosemu/keymap/* (which you may modify according to your needs). Both sets have identical names (though you may add any new one to /var/lib/dosemu/keymap/*):
You define an internal keytable such as
where `name' is one of the above. To load a keytable you just prefix the string with "load" such as
Note, however, that you have to set
to use this feature under X, because per default the keytable is forced to be neutral (us). Normally you will have the correct settings of your keyboard given by the X-server.
When being on console you might wish to use raw keyboard, especially together with some games, that don't use the BIOS/DOS to get their keystrokes.
However, be carefull, when the application locks, you may not be able to switch your console and recover from this. For details on recovering look at README-tech.txt (Recovering the console after a crash).
NOTE: `$_rawkeyboard' can not be overwritten by /.dosemurc.
The `keybint (on)' allows more accurate of keyboard interrupts, It is a bit unstable, but makes keyboard work better when set to "on".
X Support settings
If DOSEMU is running in its own X-window (not xterm), you may need to tailor it to your needs. Here a summary of the settings and a brief description what they mean. A more detailed description of values one can be found at chapter 2.2.14 (X Support settings) of README-tech.txt
Video settings ( console only )
!!WARNING!!: IF YOU ENABLE GRAPHICS ON AN INCOMPATIBLE ADAPTOR, YOU COULD GET A BLANK SCREEN OR MESSY SCREEN EVEN AFTER EXITING DOSEMU. Read doc/README-tech.txt (Recovering the console after a crash).
Start with only text video using the following setup in dosemu.conf
After you get it `somehow' working and you have one of the DOSEMU supported graphic cards you may switch to graphics mode changing the below
If you have a 100% compatible standard VGA card that may work, however, you get better results, if your card has one of the DOSEMU supported video chips and you tell DOSEMU to use it such as
Note, `s3' is only an example, you must set the correct video chip else it most like will crash your screen.
NOTE: `video setting' can not be overwritten by /.dosemurc.
Disks and floppies
The parameter settings via dosemu.conf are tailored to fit the recomended usage of disk and floppy access. There are other methods too, but for these you have to look at README-tech.txt (and you may need to modify global.conf). We strongly recommend that you use the proposed techique. Here the normal setup:
When you installed DOSEMU (`make install') you will have a bootable hdimage in the file /var/lib/dosemu/hdimage.first. It contains a very tiny installation of FreeDos, just to show you that it works. A hdimage is a file containing a virtual image of a DOS-FAT filesystem. Once you have booted it, you (or autoexec.bat) can use `lredir' to access any directory in your Linux tree as DOS drive (a -t msdos mounted too). Look at chapter 6 (Using Lredir) and for more details on creating your own (better) hdimage look at chapter 4.3 of this README (Making a bootable hdimage for general purpose). Chapter 4.4 also describes how to import/export files from/to a hdimage.
Now, what does the above `vbootfloppy' mean? Alternatively of booting from a virtual `disk' you may have an image of a virtual `floppy' which you just created such as `dd if=/dev/fd0 of=floppy_image'. If this floppy contains a bootable DOS, then
will boot that floppy. Once running in DOS you can make the floppy available by (virtually) removing the `media' via `bootoff.com'. If want the disk access specified via `$_hdimage' anyway, you may add the keyword `+hd' such as
In some rare cases you may have problems accessing Lredir'ed drives (especially when your DOS application refuses to run on a 'network drive'), though I personally never happened to fall into one of this. For this to overcome you may need to use socalled `partition access'. The odd with this kind of access is, that you never should have those partition mounted in the Linux file system at the same time as you use it in DOSEMU (which is quite uncomfortable and dangerous on a multitasking OS such as Linux ). Though global.conf checks for mounted partitions, there may be races that are not caught. In addition, when your DOSEMU crashes, it may leave some FAT sectors unflushed to the disk, hence destroying the partition. Anyway, if you think you need it, here is how you `assign' real DOS partitions to DOSEMU:
The above will have `hdimage.first' as booted drive C:, /dev/hda1 as D: (read/write) and /dev/sdc4 as E: (readonly). You may have any kind of order within `$_hdimage', hence
would have /dev/hda1 as booted drive C:. Note that the access to the /dev/* devices must be exclusive (no other process should use it) except for `:ro'.
COM ports and mices
We have simplified the configuration for mices and serial ports and check for depencies between them. If all strings in the below example are empty, then no mouse and/or COM port is available. Note. that you need no mouse.com driver installed in your DOS environment, DOSEMU has the mousedriver builtin. The below example is such a setup
The above example lets you have your modem on COM2, COM1 is spare (as you may have your mouse under native DOS there and don't want to change the configuration of your modem software between boots of native DOS and Linux)
However, you may use your favorite DOS mousedriver and directly let it drive COM1 by changing the below variables (rest of variables unchanged)
And finaly, when having a PS2 mouse running on your Linuxbox you use the builtin mousedriver (not your mouse.com) to get it work: ( again leaving the rest of variables unchanged)
When using a PS2 mouse or when having more then 2 serial ports you may of course assign _any_ free serialdevice to COM1, COM2. The order doesn't matter:
Printer is emulated by piping printer data to your normal Linux printer. The belows tells DOSEMU which printers to use. The `timeout' tells DOSEMU how long to wait after the last output to LPTx before considering the print job as `done' and to to spool out the data to the printer.
Networking under DOSEMU
Turn the following option `on' if you require IPX/SPX emulation, there is no need to load IPX.COM within the DOS session. ( the option does not emulate LSL.COM, IPXODI.COM, etc. ) And NOTE: You must have IPX protocol configured into the kernel.
Enable Novell 8137->raw 802.3 translation hack in new packet driver.
If you make use of the dosnet device driver, you may turn on 'multi' packet driver support via
For more on this look at chapter 24 (Net code)
The sound driver is more or less likely to be broken at the moment. Anyway, here are the settings you would need to emulate a SB-sound card by passing the control to the Linux soundrivers.
Next Previous Contents
|The DOSEMU team|