home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / DOSEMU-HOWTO < prev    next >
Text File  |  1998-10-14  |  58KB  |  1,717 lines

  1.   The dosemu HOWTO
  2.   by Mike Deisher.  Updated by Uwe Bonnes, bon@elek-
  3.   tron.ikp.physik.th-darmstadt.de
  4.   v0.64.4, 15 March 1997 for dosemu-0.64.4 (in progress)
  5.  
  6.   This is the `Frequently Asked Questions' (FAQ) / HOWTO document for
  7.   dosemu.  The most up-to-date version of the dosemu-HOWTO may be found
  8.   in ftp.mathematik.th-darmstadt.de:/pub/linux/bonnes/.
  9.   ______________________________________________________________________
  10.  
  11.   Table of Contents
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.   1. The preliminaries
  68.  
  69.      1.1 What is dosemu, anyway?
  70.      1.2 Names and numbers
  71.      1.3 What version of Dosemu should I use?
  72.      1.4 What's the newest version of dosemu and where can I get it?
  73.      1.5 Where can I ask questions?
  74.      1.6 Where can I report bugs and ask questions?
  75.      1.7 Where can I follow the development?
  76.      1.8 What documentation is available for dosemu?
  77.      1.9 I have a program that fails, not listed in EMUfailure
  78.      1.10 How do I submit changes or additions to the HOWTO?
  79.      1.11 Message from Greg...
  80.  
  81.   2. Compiling and installing dosemu
  82.  
  83.      2.1 Where are the installation instructions?
  84.      2.2 Top ten problems while compiling and installing dosemu.
  85.      2.3 How can I use dosemu on an older version of the Linux Kernel.
  86.      2.4 How do I make aout binaries?
  87.      2.5 How do I compile dosemu on a machine with low memory?
  88.      2.6 Compilation fails with some strange error regarding "slang"
  89.      2.7 What configurabe options are available
  90.      2.8 How can I speed up compilation?
  91.      2.9 More compilation tips from Marty...
  92.      2.10 Do I need to compile dosemu as root?
  93.      2.11 How to I patch dosemu.
  94.      2.12 What versions of DOS are known to run with dosemu.
  95.      2.13 Versions known not to run
  96.  
  97.   3. Hard disk setup
  98.  
  99.      3.1 How do I use my hard disk with dosemu?
  100.      3.2 How can I access the hdimage from Linux?
  101.      3.3 Can I use my stacked/double-spaced/super-stored disk?
  102.  
  103.   4. Parallel ports, serial ports and mice
  104.  
  105.      4.1 Port access worked with older version, but doesn't work now!
  106.      4.2 Port access was faster with older versions!
  107.      4.3 Where are the (microsoft compatible) mouse drivers?
  108.      4.4 Why doesn't the mouse driver work?
  109.      4.5 Why does dosemu clobber COM4?
  110.      4.6 How do I use dosemu over the serial ports?
  111.      4.7 How can I switch between dosemu and a shell over the serial line?
  112.      4.8 How can I get the parallel ports to work?
  113.  
  114.   5. Multiple users and Non-interactive sessions
  115.  
  116.      5.1 Can I use dosemu on a multi-user system?
  117.      5.2 How can I run dos commands non-interactively?
  118.  
  119.   6. dosemu and Netware
  120.  
  121.      6.1 How do I get Netware access from dosemu?
  122.  
  123.   7. dosemu and X-windows(97/2/9).
  124.  
  125.      7.1 Can I run dosemu in console mode while running X?
  126.      7.2 Is it possible to run dosemu in a window in X-windows?
  127.      7.3 Xdos dosen't work on a remote X-display!
  128.      7.4 Xdos dosen't find the VGA font
  129.      7.5 The vga font is very smal on my high resolution  Display
  130.      7.6 Dosemu compilation fails with some strange error regarding X!
  131.      7.7 Does ansi emulation work properly?
  132.  
  133.   8. dosemu and MS-Windows 3.1
  134.  
  135.      8.1 Is it possible to run MS-Windows 3.1 under dosemu?
  136.      8.2 Windows 3.x in xdos:
  137.      8.3 Can I install windows from within dosemu?
  138.      8.4 Notes for the mouse under win31-in-xdos:
  139.      8.5 Why did my Icon dissapear from the Programmanager?
  140.  
  141.   9. Video and sound
  142.  
  143.      9.1 Can I run 32-bit video games under dosemu?
  144.      9.2 Exiting from dosemu gives me a screen full of garbage.
  145.      9.3 How do I get dosemu to work with my Trident/Actix/other video card?
  146.      9.4 Why doesn't my soundcard software work with dosemu?
  147.  
  148.   10. Games
  149.  
  150.      10.1 Duke3d dosen't work
  151.  
  152.   11. Other Hardware
  153.  
  154.      11.1 How do I get my xxxxx device working under dosemu?
  155.  
  156.   12. Problems and fixes
  157.  
  158.      12.1 Security issues
  159.      12.2 Dosemu dies when booting. I have Win95 installed.
  160.      12.3 Dosemu hangs! How can I kill it?
  161.      12.4 Dosemu crashed and now I can't type anything.
  162.      12.5 I've enabled EMS memory in dosemu.conf but it does not help.
  163.      12.6 How do I get rid of all those annoying "disk change" messages?
  164.      12.7 Why won't dosemu run a second time after exiting in console mode?
  165.      12.8 Why will dosemu run in a term but not in the console?
  166.      12.9 How can I speed up dosemu?
  167.      12.10 My CDROM drive has problems reading some files under dosemu.
  168.      12.11 How do I see debugging output?
  169.      12.12 Why are my keystrokes echoed ttwwiiccee??
  170.      12.13 Dosemu scrambles my screen?
  171.      12.14 MS FoxPro 2.6 won't run
  172.  
  173.   13. Contributing to the dosemu project
  174.  
  175.      13.1 Who is responsible for dosemu?
  176.      13.2 I want to help.  Who should I contact?
  177.  
  178.  
  179.   ______________________________________________________________________
  180.  
  181.   1.  The preliminaries
  182.  
  183.   1.1.  What is dosemu, anyway?
  184.  
  185.   To quote the manual, "dosemu" is a user-level program which uses
  186.   certain special features of the Linux kernel and the 80386 processor
  187.   to run MS-DOS in what we in the biz call a `DOS box.'  The DOS box, a
  188.   combination of hardware and software trickery, has these capabilities:
  189.  
  190.   o the ability to virtualize all input/output and processor control
  191.   instructions
  192.  
  193.   o the ability to support the word size and addressing modes of the
  194.   iAPX86 processor family's "real mode," while still running within the
  195.   full protected mode environment
  196.  
  197.   o the ability to trap all DOS and BIOS system calls and emulate such
  198.   calls as are necessary for proper operation and good performance
  199.   o the ability to simulate a hardware environment over which DOS
  200.   programs are accustomed to having control.
  201.  
  202.   o the ability to provide MS-DOS services through native Linux
  203.   services; for example, dosemu can provide a virtual hard disk drive
  204.   which is actually a Linux directory hierarchy."
  205.  
  206.  
  207.   1.2.  Names and numbers
  208.  
  209.  
  210.        (xx/yy/zz) means day zz in month yy in year xx(97/2/9).
  211.  
  212.  
  213.  
  214.        winemu mean WinOS/2 running in dosemu(97/2/10).
  215.  
  216.  
  217.  
  218.   1.3.  What version of Dosemu should I use?
  219.  
  220.   Dosemu uses the same numbering scheme as the kernel. Uneven second
  221.   numbers are for possible unstable developper releases, even second
  222.   numbers are for releases considered stable. At the time of writing,
  223.   0.64.4 is the latest stable release, while 0.65.0.6 ist the latest
  224.   developper's release. So if you want to use dosemu, get the latest
  225.   stable release (97/02/28).
  226.  
  227.  
  228.  
  229.        (xx/yy/zz) means day zz in month yy in year xx(97/2/9).
  230.  
  231.  
  232.  
  233.        winemu mean WinOS/2 running in dosemu(97/2/10).
  234.  
  235.  
  236.  
  237.   1.4.  What's the newest version of dosemu and where can I get it?
  238.  
  239.   The newest version of dosemu as of (97/2/9) is dosemu0.64.4 and can be
  240.   ftp'ed from:
  241.  
  242.        tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/
  243.  
  244.  
  245.  
  246.        ftp.suse.com:/pub/dosemu/
  247.  
  248.  
  249.  
  250.   However, pre-release versions are also available for developers and
  251.   ALPHA testers.  They can be retrieved from:
  252.  
  253.        http://www.ednet.ns.ca/auto/rddc
  254.  
  255.  
  256.   Remember that this is ALPHA code, however: there may be serious bugs
  257.   and very little documentation for new features. At present, the devel-
  258.   opment version is known to have bugs. Please use it only if you like
  259.   to do active development. Don't report bugs in the development ver-
  260.   sion, fix them instead.
  261.  
  262.  
  263.  
  264.  
  265.   1.5.  Where can I ask questions?
  266.  
  267.   If you have problems regarding installing and running dosemu after
  268.   reading the documentation, first try to help yourself: Your question
  269.   has probably been asked and perhaps answered before. Try some search
  270.   engine on the internet to retrieve that information. E.g. you can ask
  271.  
  272.        http://www.dejanews.com
  273.  
  274.  
  275.   to find all newsnet articles containing the keywords of your question.
  276.   Helping yourself will probably be faster than asking a well known
  277.   question. It too frees up the time of developpers from answering
  278.   trivial question and so helps the further development of
  279.   dosemu(97/2/9) .
  280.  
  281.  
  282.   1.6.  Where can I report bugs and ask questions?
  283.  
  284.   If you want to ask questions and report bugs regarding dosemu, you
  285.   should consider subscribing to the linux-msdos-digest mailing list.
  286.   To subscribe, send mail to Majordomo@vger.rutgers.edu with the
  287.   following command in the body of your email message:
  288.  
  289.       subscribe linux-msdos-digest your_username@your.email.address
  290.  
  291.  
  292.   If you ever want to remove yourself from the mailing list, you can
  293.   send mail to Majordomo@vger.rutgers.edu with the following command in
  294.   the body of your email message:
  295.  
  296.       unsubscribe linux-msdos-digest your_username@your.email.address
  297.  
  298.  
  299.   (95/8/11). When you are subscribed to linux-msdos, you can send your
  300.   report as mail to linux-msdos@vger.rutgers.edu. There is a gate that
  301.   send mails to linux-msdos@vger.rutgers.edu as postings to the news-
  302.   group named linux.dev.msdos. If your News provider doesn't carry that
  303.   group, ask her(him) to add that group(97/2/10).
  304.  
  305.  
  306.   1.7.  Where can I follow the development?
  307.  
  308.   If you want to follow the development of dosemu, there is a mailing
  309.   list for developpers.  To subscribe, send mail to
  310.   Majordomo@ednet.ns.ca with the following command in the body of your
  311.   email message:
  312.  
  313.       subscribe msdos-devel your_username@your.email.address
  314.  
  315.  
  316.   If you ever want to remove yourself from the mailing list, you can
  317.   send mail to Majordomo@ednet.ns.ca with the following command in the
  318.   body of your email message:
  319.  
  320.       unsubscribe dosemu-devel your_username@your.email.address
  321.  
  322.  
  323.   Please, don't use this list for the things linux-dosemu-digest is
  324.   thought for. Contributions to msdos-devel should concern the further
  325.   development of dosemu. Normal installation problems shouldn't be
  326.   reported here, and are normally ignored by those reading that
  327.   list(97/2/9).
  328.  
  329.  
  330.  
  331.   1.8.  What documentation is available for dosemu?
  332.  
  333.   The dosemu manual (dosemu.texinfo) written by Robert Sanders has not
  334.   been updated in some time but is still a good source of information.
  335.   It is distributed with dosemu.
  336.  
  337.   The "dosemu Novice's Altering Guide" or DANG is a road map to the
  338.   inner workings of dosemu.  It is designed for the adventurous, those
  339.   who wish to modify the source code themselves.  The DANG is maintained
  340.   by Alistair MacDonald (alistair@slitesys.demon.co.uk) and is found in
  341.   the doc-directory of the dosemu source tree.
  342.  
  343.  
  344.   The EMU failure list (EMUfailure.txt) is a list of all programs known
  345.   not to work under dosemu.
  346.  
  347.  
  348.   And then, of course, there is the dosemu FAQ/HOWTO.  But you already
  349.   know about that, don't you.  It is also posted once in a while to the
  350.   mailing list and found in the doc-directory.  The most recent version
  351.   can be found in ftp.mathematik.th-
  352.   darmstadt.de:/pub/linux/bonnes/(97/2/9).
  353.  
  354.  
  355.   1.9.  I have a program that fails, not listed in EMUfailure
  356.  
  357.   First check, if the failure of your program is not caused by some of
  358.   the fundamental incapabilities of dosemu, listed in EMUfailure. If you
  359.   think you have something new, please report to linux-
  360.   msdos@vger.rutgers.edu.  Perhaps it can be made going with the help
  361.   others. Give detailed information about your setup, tell the version
  362.   of kernel, dosemu etc and name the observed errors. You can use xdos
  363.   to cut and paste the error message into your report. But keep your
  364.   report in a readable form. We know the content of ../etc/config.dist.
  365.   So only send the active lines from your dosemu.conf. And scan through
  366.   your debug output and at first only send those parts you think are
  367.   relevant. Few people are willing to decode some long attachment to a
  368.   mail, to do debugging for others. But keeps your logs at hand, if
  369.   others ask detailed(97/2/10).
  370.  
  371.  
  372.  
  373.  
  374.   1.10.  How do I submit changes or additions to the HOWTO?
  375.  
  376.   The preferred method is to edit the file dosemu-HOWTO-xx.x.sgml to
  377.   incorporate the changes, create a diff file by typing something like
  378.  
  379.  
  380.        diff -uw original-file new-file
  381.  
  382.  
  383.   and send it to bon@elektron.ikp.physik.th-darmstadt.de.  If you do not
  384.   know SGML, that's ok.  Changes or new information in any form will be
  385.   accepted.  Creating the diff file just makes it easier on the HOWTO
  386.   maintainer.  :-)(97/2/9)
  387.  
  388.  
  389.  
  390.   1.11.  Message from Greg...
  391.  
  392.   Unless otherwise stated, Linux HOWTO documents are copyrighted by
  393.   their respective authors. Linux HOWTO documents may be reproduced and
  394.   distributed in whole or in part, in any medium physical or electronic,
  395.   as long as this copyright notice is retained on all copies. Commercial
  396.   redistribution is allowed and encouraged; however, the author would
  397.   like to be notified of any such distributions.
  398.  
  399.   All translations, derivative works, or aggregate works incorporating
  400.   any Linux HOWTO documents must be covered under this copyright notice.
  401.   That is, you may not produce a derivative work from a HOWTO and impose
  402.   additional restrictions on its distribution. Exceptions to these rules
  403.   may be granted under certain conditions; please contact the Linux
  404.   HOWTO coordinator at the address given below.
  405.  
  406.   In short, we wish to promote dissemination of this information through
  407.   as many channels as possible. However, we do wish to retain copyright
  408.   on the HOWTO documents, and would like to be notified of any plans to
  409.   redistribute the HOWTOs.
  410.  
  411.   If you have questions, please contact Tim Bynum, the Linux HOWTO
  412.   coordinator, at linux-howto@sunsite.unc.edu.
  413.  
  414.  
  415.   2.  Compiling and installing dosemu
  416.  
  417.   2.1.  Where are the installation instructions?
  418.  
  419.   The installation instructions are in the file, "QuickStart", included
  420.   in the distribution.
  421.  
  422.  
  423.   2.2.  Top ten problems while compiling and installing dosemu.
  424.  
  425.  
  426.   1. Forgetting to read the QuickStart Guide.
  427.  
  428.   2. Try to compile some old version of dosemu.
  429.  
  430.   3. Try to compile with a kernel older than 2.0.28 or 2.1.15.
  431.  
  432.   4. Having the wrong linux kernel source sitting in /usr/src/linux or
  433.   missing /usr/src/linux/include/version.h
  434.  
  435.   5. Use dosemu with a kernel that does not have IPC compiled in.
  436.  
  437.   6. Compile with gcc older than 2.7.2 or libc older than x.x.x.
  438.  
  439.   7. Forget to edit your /etc/dosemu.conf file.
  440.  
  441.   8. Run DOSEMU with partition access while they are already mounted.
  442.  
  443.   9. Don't install dosemu with sufficient privileges (i.e., root).
  444.   (97/04/08)
  445.  
  446.  
  447.   2.3.  How can I use dosemu on an older version of the Linux Kernel.
  448.  
  449.   If you still use 1.2.13 and can't upgarde for some reasons, use
  450.   dosemu-0.60.4. If you use some version of dosemu below 2.0.28 and
  451.   2.1.15, Hans Lermen (lermen@elserv.ffm.fgan.de) reported (97/1/25 and
  452.   97/2/11)
  453.  
  454.        > Is the dosemu-0.64.3.tgz version of dosemulator for the 2.xx.yy ver-
  455.        sions > of the linux kernel ??
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.   Yes, but ...
  464.  
  465.     if ( ((xx == 0) && (yy >= 28)) || ((xx >= 1) && (yy >= 15)) )
  466.       take_dosemu_0_64_4();
  467.     else {
  468.       if (xx == 1)  exit(1);
  469.       take_dosemu_0_64_2_x();
  470.     }
  471.  
  472.   ;-)
  473.  
  474.  
  475.  
  476.  
  477.  
  478.   2.4.  How do I make aout binaries?
  479.  
  480.   Starting with version 0.64.4 there is no a.out support any more.  If
  481.   you absolutely need it, you must use version 0.64.3.1.  The configure
  482.   script then should take care for this, if you setup is a standard
  483.   setup(97/2/11).
  484.  
  485.  
  486.   2.5.  How do I compile dosemu on a machine with low memory?
  487.  
  488.   Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/4/8) that
  489.  
  490.   If you have problems with running out of swap space you may want to
  491.   add CFLAGS+=-fno-inline after CFLAGS is defined in dpmi/Makefile.  Be
  492.   careful before you do this and check for the existence of swap space.
  493.   I found Linux crashes a times when it has no swap space.
  494.  
  495.  
  496.   2.6.  Compilation fails with some strange error regarding "slang"
  497.  
  498.   You probably have installed your own version of the Slang library.
  499.   Hans Lermen <lermen@elserv.ffm.fgan.de> writes(97/2/11):
  500.  
  501.  
  502.          configure --enable-force-slang
  503.  
  504.  
  505.  
  506.  
  507.  
  508.   2.7.  What configurabe options are available
  509.  
  510.   Try
  511.  
  512.        configure --help
  513.  
  514.  
  515.   to get the list of configurable options listed (97/2/12)
  516.  
  517.   2.8.  How can I speed up compilation?
  518.  
  519.   Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/4/8) that
  520.  
  521.   The default optimization is -O2.  You may want edit the makefile to
  522.   use -O (compiled somewhat faster/smaller).
  523.  
  524.  
  525.   2.9.  More compilation tips from Marty...
  526.  
  527.   Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/4/8) that
  528.  
  529.   You need to have build the kernel on your system to get the current
  530.   version.  If not, you may want to hand modify KERNEL_VERSION in the
  531.   top level Makefile.  The number is of the form, "nmmmppp", where "n"
  532.   is the version, "mmm" is the minor version, and "ppp" is the
  533.   patchlevel.  For example, kernel 1.1.88 corresponds to "1001088" and
  534.   kernel 1.2.1 to "1002001".
  535.  
  536.   Addition from (lermen@elserv.ffm.fgan.de):
  537.  
  538.   For versions greater 0.64.3 this no longer is true. You need to have a
  539.   valid <linux/version.h>, which has to be part off your standard
  540.   /usr/include. If you don't have it, you either did a 'make clean' on
  541.   your kernel source or your distributor failed to support you with
  542.   this.
  543.  
  544.  
  545.   2.10.  Do I need to compile dosemu as root?
  546.  
  547.   (95/4/8)
  548.  
  549.   No.  You must install it as root, though.
  550.  
  551.  
  552.   Marty Leisner (leisner@sdsp.mc.xerox.com) adds
  553.  
  554.   In order to access I/O ports (including the console) dosemu needs to
  555.   run as root.  Running dosemu on an xterm or in X windows and requiring
  556.   now direct hardware access allows you to run dosemu as a user.  The
  557.   security/setuid implications will be worked on in development
  558.   releases(95/8/11).
  559.  
  560.   Have a look at ..;/doc/SECURITY.readme too(97/2/9).
  561.  
  562.  
  563.   2.11.  How to I patch dosemu.
  564.  
  565.   If you do patch dosemu from one version to another, do "make
  566.   pristine;./configure; make". If you don't make pristine, at least the
  567.   version of the new executable will be wrong, if the whole thing
  568.   compiles at all(97/2/9).
  569.  
  570.  
  571.  
  572.   2.12.  What versions of DOS are known to run with dosemu.
  573.  
  574.   Caldera's OpenDos (formerly known as DrDOS) is reported to work with
  575.   dosemu (Nicolas St-Pierre <draggy@kosmic.org>. As OpenDos can be used
  576.   free of charge for non-commercial use, it is preferred. However as of
  577.   now, redistribution is not allowed. You must get OpenDos youself from
  578.   Caldera's site http://www.caldera.com/dos Hopefully this will change
  579.   soon, so dosemu can distribute a bootable hdimage.  MsDos-6.22 is
  580.   known to work with dosemu.  MsDos-7 aka Win95 works with dosemu to,
  581.   supposed you have the boot logo switched off and you don't start the
  582.   graphic shell at bootup. If you make the hdimage bootable with the so
  583.   called "Rescue Disk" you are offered to make during the Windows
  584.   installation, you get the right settings. If you use your normal Win95
  585.   installation to transfer the system files, have a look at the
  586.   msdos.sys written on the hdimage and change the settings under the
  587.   section [Options] to have entries like [Options] Logo=0 BootGUI=0
  588.  
  589.   (97/3/7)
  590.  
  591.  
  592.  
  593.  
  594.  
  595.   2.13.  Versions known not to run
  596.  
  597.   DOS 4.01 had problems by itself, do it won't work with dosemu either
  598.   (Mattias Hembruch <mghembru@ece.uwaterloo.ca> 97/04/03)
  599.  
  600.  
  601.   3.  Hard disk setup
  602.  
  603.   3.1.  How do I use my hard disk with dosemu?
  604.  
  605.   First, mount your dos hard disk partition as a Linux subdirectory.
  606.   For example, you could create a directory in Linux such as /dos (mkdir
  607.   -m 755 /dos) and add a line like
  608.  
  609.      /dev/hda1       /dos     msdos   umask=022
  610.  
  611.  
  612.   to your /etc/fstab.  (In this example, the hard disk is mounted read-
  613.   only.  You may want to mount it read/write by replacing "022" with
  614.   "000" and using the -m 777 option with mkdir).  Now mount /dos.  Now
  615.   you can add a line like
  616.  
  617.     lredir d: linux\fs/dos
  618.  
  619.  
  620.   to the AUTOEXEC.BAT file in your hdimage (see the comments on LREDIR
  621.   below).  On a multi-user system you may want to use
  622.  
  623.     lredir d: linux\fs\${home}
  624.  
  625.  
  626.   where "home" is the name of an environmental variable that contains
  627.   the location of the dos directory (/dos in this example)(95/8/11).
  628.  
  629.   ---------------------
  630.  
  631.  
  632.   Tim Bird (Tim_R_Bird@Novell.COM) states that LREDIR users should be
  633.   careful when they use LREDIR in the autoexec, because COMMAND.COM will
  634.   continue parsing the autoexec.bat from the redirected drive as the
  635.   same file offset where it left off in the autoexec.bat on the physical
  636.   drive.  For this reason, it is safest to have the autoexec.bat on the
  637.   redirected drive and the physical drive (diskimage) be the
  638.   same(95/8/11).
  639.  
  640.   ---------------------
  641.  
  642.  
  643.   Robert D. Warren (rw11258@xx.acs.appstate.edu) reported (94/4/28) that
  644.  
  645.   I boot off a small hdimage file (less than 1 MB - and twice as large
  646.   as needs be at that), and the next to last line in my config.sys file
  647.   on the hdimage boot image is:
  648.  
  649.  
  650.           install=c:\lredir.exe c: LINUX\FS\home/dos
  651.  
  652.  
  653.   This will execute lredir just before the command interpreter runs. And
  654.   I have successfully run it with both command.com and 4DOS.  This elim-
  655.   inates the offset problem using lredir in autoexec.bat.
  656.  
  657.  
  658.   Uwe Bonnes (bon@elektron.ikp.physik.th-darmstadt.de) adds (95/8/11)
  659.   that
  660.  
  661.   It is usefull to do:
  662.  
  663.  
  664.   install=C:\subst.exe g: c:
  665.  
  666.  
  667.   before that, so you have still access to your hdimage as drive g:
  668.   Another useful tip in that circumstance is to configure dosemu to use
  669.   "autoexec.emu" to keep dos and dosemu apart.
  670.  
  671.  
  672.  
  673.   3.2.  How can I access the hdimage from Linux?
  674.  
  675.   Use the recent mtools, version 3.0 at the time of writing. With a line
  676.   in /etc/mtools.conf like
  677.  
  678.  
  679.      drive g:  file="/var/lib/dosemu/hdimage" Offset=8832
  680.  
  681.  
  682.   you can use the mtools on the hdimage, like "mdir g:". "mcopy g:/con-
  683.   fig.emu /tmp" copies the config.emu file from the hdimage to /tmp/con-
  684.   fig.emu. You can edit it there and copy it back. Use a drive letter
  685.   you find sensible. "G:" is only an example(07/2/9).
  686.  
  687.  
  688.   3.3.  Can I use my stacked/double-spaced/super-stored disk?
  689.  
  690.   At this time, compressed drives cannot be accessed via the redirector
  691.   (lredir or emufs) on a standard kernel. There is a patch for the
  692.   kernel to mount compressed files under the name "dmsdosfs".  Find it
  693.   on sunsite.unc.edu and its mirrors
  694.  
  695.        http://sunsite.unc.edu:/pub/Linux/system/Filesystems/dosfs/
  696.  
  697.  
  698.   A good idea is also to look in http://sun-
  699.   site.unc.edu:/pub/Linux/Incoming for a newer version.  However, many
  700.   people have had success by simply uncommenting the
  701.  
  702.      disk { wholedisk "/dev/hda" }        # 1st partition on 1st disk
  703.  
  704.  
  705.   line in their dosemu config file.  Others have had success using
  706.  
  707.      disk { partition "/dev/hda1" }
  708.  
  709.  
  710.   Do that on the risk to loose data on a dosemu crash(97/2/9)!
  711.  
  712.   If your dos partition is already mounted with write access and you try
  713.   to run dosemu with partition or whole disk access, dosemu will print a
  714.   warning message and abort.  This prevents DOS and Linux from making
  715.   independent writes to your disk and trashing the data on your dos
  716.   partition(95/8/11).
  717.  
  718.   ---------------------
  719.  
  720.   If LILO is installed, the above will not work.  However...
  721.  
  722.   Thomas Mockridge (thomas@aztec.co.za) reported (94/8/5) that
  723.  
  724.   To boot dosemu with LILO and Stacker 4.0 I did a little work around...
  725.  
  726.  
  727.   1. dd the MBR to a file. (or norton utility, etc., first 512 bytes)
  728.  
  729.   2. Boot dos (from full boot not emu), do a fdisk /mbr, make your dos
  730.   partition active with (dos) fdisk.
  731.  
  732.   3. Copy the new MBR to a file.
  733.  
  734.   4. Replace the original MBR
  735.  
  736.   5. Copy the second MBR to /var/lib/dosemu/partition.hda? (Whichever is
  737.   your dos partition)
  738.  
  739.   6. Set dosemu.conf
  740.  
  741.                  disk {partition "/dev/hda? ?"}
  742.  
  743.  
  744.  
  745.   7. Start dosemu and and voila!  No LILO.
  746.  
  747.   ---------------------
  748.  
  749.   Holger Schemel (q99492@pbhrzx.uni-paderborn.de) reported (94/2/10)
  750.   that
  751.  
  752.   Works even fine under dosemu with MS-DOS 6.0. If you have problems,
  753.   then you have to edit the file 'DBLSPACE.INI' manually and change the
  754.   disk letter to the letter your drive gets under dosemu.
  755.  
  756.   ---------------------
  757.  
  758.   Darren J Moffat (moffatd@dcs.gla.ac.uk) also reported (94/3/27)
  759.  
  760.   "...use 6.2 if you can get it!!  Just make sure you have a LILO boot
  761.   disk on hand since dos 6{.2} will change the MBR of the boot HZ."
  762.  
  763.  
  764.   4.  Parallel ports, serial ports and mice
  765.  
  766.   4.1.  Port access worked with older version, but doesn't work now!
  767.  
  768.   Read ../doc/README.port-io  and the port-section in ../etc/config.dist
  769.  
  770.  
  771.   4.2.  Port access was faster with older versions!
  772.  
  773.   To have a chance to log port access, by default every port access
  774.   produces an exception out of vm86-mode. This takes some time. If you
  775.   don't want to log port access, use the keyword "fast" in the
  776.   appropriate port statement.
  777.  
  778.  
  779.  
  780.   4.3.  Where are the (microsoft compatible) mouse drivers?
  781.  
  782.   Tom Kimball (tk@pssparc2.oc.com) reported (93/11/24) that
  783.  
  784.   Several people said to use a different mouse driver and suggested
  785.   some.  I found a couple that seem to work fine.
  786.  
  787.      oak.oakland.edu:/pub/msdos/mouse/mouse701.zip   (mscmouse)
  788.      oak.oakland.edu:/pub/msdos/mouse/gmous102.zip   (gmouse)
  789.  
  790.  
  791.   Normally you can use dosemu's internaldriver, so you don't need any
  792.   additional mousedriver in dosemu outside winemu(97/2/10).
  793.   4.4.  Why doesn't the mouse driver work?
  794.  
  795.   Mark Rejhon (mdrejhon@magi.com) reported (95/4/7) that
  796.  
  797.   If you start the mouse driver and it just hangs (it might actually
  798.   take 30-60s), but if you are waiting longer than a minute for the
  799.   mouse driver to start, try specifying the COM port that the mouse is
  800.   on, at the mouse driver command line.
  801.  
  802.  
  803.   4.5.  Why does dosemu clobber COM4?
  804.  
  805.   Rob Janssen (rob@pe1chl.ampr.org) reported (94/3/24) that
  806.  
  807.   According to jmorriso@bogomips.ee.ubc.ca, "dosemu still clobbers COM4
  808.   (0x2e8, IRQ 5). 0x2e8 isn't in ports{} in config.  I have to run
  809.   setserial /dev/cua3 irq 5 on it after dosemu exits."
  810.  
  811.   This is caused by your VGA BIOS.  I have found that by enabling the IO
  812.   port trace and seeing where it was clobbered.
  813.  
  814.   Disable the "allowvideoportaccess on" line in config and it will work
  815.   fine.  When you then have problems with the video, try to enable more
  816.   selective ranges of IO addresses (e.g., 40-43).
  817.  
  818.  
  819.   4.6.  How do I use dosemu over the serial ports?
  820.  
  821.  
  822.  
  823.  
  824.   4.7.  How can I switch between dosemu and a shell over the serial
  825.   line?
  826.  
  827.   John Taylor (taylor@pollux.cs.uga.edu) reported (94/5/25) that
  828.  
  829.   I am running Linux 1.1.13 and want to point out a great feature that
  830.   should be protected and not taken out (IMHO). With the 52 version, I
  831.   can run the program, "screen."  From screen, i can invoke dos -D-a.
  832.   What is really great (IMHO) is the screen commands (the CTRL-A cmds)
  833.   still work. This means I can do a CTRL-A C and add another unix shell,
  834.   and switch between the two (DOS / UNIX).  This allows me to use dosemu
  835.   over the serial line really well, because switching is made easy.
  836.  
  837.  
  838.   4.8.  How can I get the parallel ports to work?
  839.  
  840.   The dosemu.conf has lines at the end to redirect printers to either
  841.   lpr or a file.  If you want direct access to the bare metal, comment
  842.   out these emulation lines, and add the line
  843.  
  844.        ports { device /dev/lp0 fast range 0x3bc 0x3bf  } # lpt0
  845.  
  846.  
  847.   for the "monitor card" printer port (corresponds to /dev/lp0), or
  848.  
  849.        ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1
  850.  
  851.  
  852.  
  853.        ports { device /dev/lp1 fast range 0x278 0x27f } # lpt2
  854.  
  855.  
  856.   for LPT1 (/dev/lp1) and LPT2 (/dev/lp2) respectively(97/2/9).
  857.  
  858.  
  859.   5.  Multiple users and Non-interactive sessions
  860.  
  861.   5.1.  Can I use dosemu on a multi-user system?
  862.  
  863.   Corey Sweeney (corey@amiganet.xnet.com) reported (93/12/8) that
  864.  
  865.   If you are running dosemu on a system in which more then one person
  866.   may want to run dosemu, then you may want to change the directory of
  867.   your hard drive image.  Currently in the /etc/dosemu.conf file there
  868.   exists the line saying that the hard drive image is "hdimage".  If you
  869.   change this to /var/lib/dosemu/hdimage then people do not have to
  870.   worry about what directory they are in when they run dosemu, and
  871.   hdimage does not have to be moved each time you upgrade to the next
  872.   patch level.
  873.  
  874.   If you do do this for multi-user dosemu, then you will want to make
  875.   the hdimage in /var/lib/dosemu read-only for everyone but the dosemu
  876.   administrator.
  877.  
  878.   Note that you can use the new emufs.sys thing to mount a "public"
  879.   directory and/or a "private" directory (a sub-directory in each
  880.   person's home directory).
  881.  
  882.  
  883.   [Note: Users may also create a personal configuration file named
  884.    /.dosrc (same format as /etc/dosemu.conf) to run their own copy of
  885.   dos.]
  886.  
  887.  
  888.   5.2.  How can I run dos commands non-interactively?
  889.  
  890.   I have been meaning to write an article on this for quite some time
  891.   but have not gotten around to it.  Here are some hints from others:
  892.  
  893.  
  894.   Dan Newcombe (newcombe@aa.csc.peachnet.edu) reported (94/1/27) that
  895.  
  896.   Here is an idea (untested) to be able to run a DOS command from the
  897.   command line (or menu choice, etc...) without modifying the actual
  898.   emulator.  [Your dos partition is assumed to be mounted under Linux,
  899.   already.]
  900.  
  901.   Suppose you wanted to run wp60.exe with the parameter "wp60
  902.   d:\doc\paper.txt".  You would do something like "dosrun wp60
  903.   d:\doc\paper.txt".  "dosrun" would be a linux shell program that would
  904.   a) edit/modify/recreate the dos autoexec.bat from your dos partition
  905.   and b) simply run dosemu (e.g., "dos -C >/dev/null".  Step a) would
  906.   somehow keep all the stuff you'd normally want in autoexec.bat (e.g.,
  907.   mouse.com) and the last line would be "wp60 d:\doc\paper.txt".
  908.  
  909.   On the dosemu side, beforehand, you would have to modify the
  910.   config.sys file (located in hdimage) so that it 1) uses emufs to
  911.   access the dos partition as D:, 2) sets "COMPSEC=D:\ (I think.  I
  912.   don't have a DOS manual around.), and 3) sets "shell=c:\command.com
  913.   /p".
  914.  
  915.   The idea is that for each time that you load the DOS emulator, you
  916.   will recreate an autoexec.bat that is specific to that session.  What
  917.   makes it specific is that the last line will execute the program you
  918.   want.  The modifications on the hdimage are to tell the emulator/DOS
  919.   that you want to use (and effectively) boot off of D:, which will be
  920.   the actual DOS partition.
  921.  
  922.   If you do not use hdimage and access the DOS filesystem directly upon
  923.   boot-up of dosemu, then this will work, and you don't have to go
  924.   through the hdimage part of this all.
  925.   ---------------------
  926.  
  927.  
  928.   Daniel T. Schwager (danny@dragon.s.bawue.de) reported (94/7/2) that
  929.  
  930.   You can use different dosemu.conf files (and different hd-boot-images
  931.   with different autoexec.bat's) and call dosemu like
  932.  
  933.   $ dos -F my_quicken_q_exe_dosemu.conf
  934.  
  935.  
  936.  
  937.   ---------------------
  938.  
  939.  
  940.   Dietmar Braun (braun@math20.mathematik.uni-bielefeld.de) reported
  941.   (94/7/4) that
  942.  
  943.   This is no problem at all when you use the redirector of dosemu.  It
  944.   is possible to redirect a drive letter to a linux path given by an
  945.   environment variable.
  946.  
  947.   So I have a shell script named "DOS" which does something like
  948.  
  949.    mkdir /tmp/dos.$$
  950.    DOSTMP=/tmp/dos.$$; export DOSTMP
  951.  
  952.  
  953.   and then a little trick to get "echo $* > $DOSTMP/startup.bat" really
  954.   working (actually a small C Program which turns '/' in '\' and termi-
  955.   nates lines correctly for messy dos with cr/lf pairs and adds ^Z at
  956.   the end of the file), creates startup files, links and so on in this
  957.   directory, and then starts dosemu. Within "autoexec.bat" drive c: is
  958.   redirected from hdimage to this tmp-directory, which has links for
  959.   $HOME and $PWD.
  960.  
  961.   So if I want to see my filenames shortened to 8.3 I can type "DOS dir"
  962.   and I get my current directory listing.  So I have full DOS multi user
  963.   (I don't have any DOS partition and redirecting to Linux preserves
  964.   user permissions) and multi tasking. (dosemu sessions are completely
  965.   independent).  I did this once to be able to use a dos driver for my
  966.   printer. My printcap df is actually a DOS program. So you can even
  967.   make DOS executables act as lpr filters.
  968.  
  969.  
  970.   6.  dosemu and Netware
  971.  
  972.   6.1.  How do I get Netware access from dosemu?
  973.  
  974.   As always, access through the Linux filesystem is preferred. Mount
  975.   your Netware drives with Caldera's Netware utilities or Volker
  976.   Lendecke's free ncpfs utility
  977.   (ftp://ftp.gwdg.de:/pub/linux/misc/ncpfs). If you need real IPX
  978.   access, e.g. to run Novell's "syscon", read ../doc/NOVELL-HOWTO.txt.
  979.  
  980.  
  981.   7.  dosemu and X-windows(97/2/9).
  982.  
  983.   7.1.  Can I run dosemu in console mode while running X?
  984.  
  985.   Ronald Schalk (R.Schalk@uci.kun.nl) reported (94/1/17) that
  986.  
  987.   Yes, no problem.  Just remember to use ctrl-alt-<Fn> to go to a
  988.   Virtual Console (VC), and you can run any Linux application (dosemu is
  989.   a linux-application).  I've got almost always WP5.1 in a dos session.
  990.  
  991.   [Note:  Use ctrl-alt-F7 to switch back to X from dosemu, if X runs on
  992.   VC7.]
  993.  
  994.  
  995.  
  996.   7.2.  Is it possible to run dosemu in a window in X-windows?
  997.  
  998.   If you have X installed and you have successfully compiled dosemu and
  999.   run it successfully outside X-windows, you should be able to run
  1000.   "xdos" or "dos -X" right away to bring up a dosemu window.  If this
  1001.   does not work, make sure:
  1002.  
  1003.  
  1004.     1. Dosemu has X support compiled in. This is default, however
  1005.        if you you have configured dosemu with
  1006.        "./configured --without-x", you don't have X support. So make
  1007.        "make pristine; ./configure; make; make install" should build
  1008.        you a dosemu-executable with X support, if you have the
  1009.        X-libraries installed in /usr/X11R6.
  1010.     2. Set up your X key-mappings.  In an xterm, type
  1011.  
  1012.        xmodmap -e "keycode 22 = 0xff08"
  1013.        xmodmap -e "keycode 107 = 0xffff"
  1014.  
  1015.        These lines fixes the backspace and delete keys respectively.
  1016.     3. Configured the X-related configuration options in your
  1017.        /etc/dosemu.conf file.
  1018.  
  1019.  
  1020.  
  1021.   Alternatively, you can run dosemu inside a color xterm, which is not
  1022.   recommended because many color xterms have buggy support for the
  1023.   complex text display capabilities of dosemu.  This does not require
  1024.   X_SUPPORT to be compiled into dosemu.  However, if you really want to
  1025.   do this, do the following steps:
  1026.  
  1027.  
  1028.     1. Install ansi_xterm.  The recommended package is available as:
  1029.        tsx-11.mit.edu:/pub/linux/ALPHA/dosemu/Development/ansi-xterm-R6.tar.gz
  1030.  
  1031.     2. Set up your X key-mappings.  In an xterm, type
  1032.  
  1033.        xmodmap -e "keycode 22 = 0xff08"
  1034.        xmodmap -e "keycode 107 = 0xffff"
  1035.  
  1036.        These lines fixes the backspace and delete keys, respectively.
  1037.  
  1038.     3. Configured the terminal-related (not X-related) settings in
  1039.        /etc/dosemu.conf
  1040.  
  1041.  
  1042.   (972/9).
  1043.  
  1044.  
  1045.   Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/3/31) that
  1046.  
  1047.   I have xrdb log the following resources
  1048.  
  1049.        dosxterm*Font:  vga dosxterm*geometry:      80x25 dosxterm*saveLines:
  1050.        25
  1051.  
  1052.  
  1053.   or I alias "dosxterm" to "term -fn vga -title dosxterm -geometry 80x25
  1054.   -sl 25"
  1055.  
  1056.  
  1057.   If you use the xrdb method, all you have to do is run "xterm -name
  1058.   dosxterm"
  1059.  
  1060.  
  1061.   7.3.  Xdos dosen't work on a remote X-display!
  1062.  
  1063.   At present, dosemu is set up to use the MIT shared memory extensions.
  1064.   This extension only works on a local display. If you want to run xdos
  1065.   on a remote display, configure dosemu with "./configure --enable-
  1066.   nomitshm" after a "make pristine" or on the clean source tree(97/2/9).
  1067.  
  1068.  
  1069.   7.4.  Xdos dosen't find the VGA font
  1070.  
  1071.   Check that the vga fonts you installed are listed in the font.dir of
  1072.   the directory you installed the fonts in:
  1073.  
  1074.  
  1075.        hertz:~> grep misc /usr/X11R6/lib/X11/XF86Config
  1076.            FontPath    "/usr/X11R6/lib/X11/fonts/misc/"
  1077.        hertz:~> grep vga /usr/X11R6/lib/X11/fonts/misc/fonts.dir
  1078.        vga.pcf vga
  1079.        vga11x19.pcf vga11x19
  1080.        hertz:~> ls /usr/X11R6/lib/X11/fonts/misc/vga*
  1081.        /usr/X11R6/lib/X11/fonts/misc/vga.pcf
  1082.        /usr/X11R6/lib/X11/fonts/misc/vga11x19.bdf
  1083.        /usr/X11R6/lib/X11/fonts/misc/vga11x19.pcf
  1084.  
  1085.  
  1086.  
  1087.  
  1088.   If you installed some X-fonts, like you did when you installed dosemu
  1089.   with X-Support for the first time,  "mkfontdir" and then "xset fp
  1090.   rehash" needs to be run. The dosemu install should take care for
  1091.   "mkfontdir" and tells you about "xset fp rehash". Tell us if it
  1092.   dosen't work for you.  (97/2/13)
  1093.  
  1094.  
  1095.   7.5.  The vga font is very smal on my high resolution  Display
  1096.  
  1097.   Look for the vga11x19 font.  (97/2/13)
  1098.  
  1099.  
  1100.   7.6.  Dosemu compilation fails with some strange error regarding X!
  1101.  
  1102.   As stated above, dosemu uses the MIT shared memory extensions by
  1103.   default. Under XFree86 they are only available with Version 3.1.2 and
  1104.   above. If you have an older version, consider to upgrade, or configure
  1105.   dosemu to not use this extension (see last section)(97/2/9).
  1106.  
  1107.  
  1108.   7.7.  Does ansi emulation work properly?
  1109.  
  1110.   Marty Leisner (leisner@sdsp.mc.xerox.com) reported (95/3/31) that
  1111.  
  1112.   Yes.  I use nnansi.com under X windows.  I find 25, 43 and 50 line
  1113.   mode work properly, however 50 line mode is difficult to use on a
  1114.   1024x768 screen (unless smaller fonts are used are you use a bigger
  1115.   screen.  43 line mode will resize the xterm window to use 43 lines.
  1116.  
  1117.  
  1118.  
  1119.   8.  dosemu and MS-Windows 3.1
  1120.  
  1121.  
  1122.  
  1123.   8.1.  Is it possible to run MS-Windows 3.1 under dosemu?
  1124.  
  1125.   The ../doc/README.Windows file says:
  1126.  
  1127.  
  1128.   ***************************************************************
  1129.   *    WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!   *
  1130.   *                                                             *
  1131.   *  Danger Will Robinson!!!  This is not yet fully supported   *
  1132.   *  and there are many known bugs!  Large programs will almost *
  1133.   *  certainly NOT WORK!!!  BE PREPARED FOR SYSTEM CRASHES IF   *
  1134.   *  YOU TRY THIS!!!                                            *
  1135.   *                                                             *
  1136.   *    WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!   *
  1137.   ***************************************************************
  1138.  
  1139.  
  1140.  
  1141.   Okay, it is possible to boot WINOS2 (the modified version of Windows
  1142.   3.1 that OS/2 uses) under DOSEMU.  Many kudos to Lutz & Dong!
  1143.  
  1144.   However, YOU NEED BOTH LICENSES, for WINDOWS-3.1 as well OS/2 !!!
  1145.  
  1146.   There are many known problems.  Windows is prone to crash, could take
  1147.   data with it, large programs will not load, etc. etc. etc.  In other
  1148.   words, it is NOT ready for daily use.  Many video cards are known to
  1149.   have problems (you may see a nice white screen, however, look below
  1150.   for win31-in-xdos).  Your program groups are all likely to disappear.
  1151.   ...  Basically, it's a pain.
  1152.  
  1153.   On the other hand, if you're dying to see the little Windows screen
  1154.   running under Linux and you have read this CAREFULLY and PROMISE NOT
  1155.   TO BOMBARD THE DOSEMU DEVELOPERS WITH "MS Word 6.0 doesn't run!!!"
  1156.   MESSAGES...
  1157.  
  1158.  
  1159.   1.  Get DOSEMU & the Linux source distributions.
  1160.   2.  Unpack DOSEMU.
  1161.   3.  Configure DOSEMU typing './configure' and do _not_ disable vm86plus.
  1162.   4.  Compile DOSEMU typing 'make'.
  1163.   5.  Get the OS2WIN31.ZIP distribution from ... ????
  1164.       ... oh well, and now you have the first problem.
  1165.       It _was_ on ibm.com sometime ago, but has vanished from that site, and
  1166.       as long as it was there, we could mirror it. ... you see the problem?
  1167.       However, use 'archie' to find it, it will be around somewhere on the net
  1168.       ... for some time ;-)
  1169.   5.  Unpack the OS2WIN31 files into your WINDOWS\SYSTEM directory.
  1170.       (Infact you only need WINDOWS/SYSTEM/os2k386.exe and the mouse driver)
  1171.   7.  Startup dosemu (make certain that DPMI is set to a value such as 4096)
  1172.   8.  Copy the file winemu.bat to your c: drive.
  1173.   9.  Cross your fingers.
  1174.  
  1175.  
  1176.  
  1177.   Good luck!
  1178.  
  1179.  
  1180.   REMEMBER:  THIS IS NOT AT ALL RECOMMENDED!!!  THIS IS NOT RECOMMENDED!!!
  1181.              WE DO NOT RECOMMEND YOU TRY THIS!!!
  1182.  
  1183.  
  1184.   ---------
  1185.  
  1186.  
  1187.  
  1188.  
  1189.   8.2.  Windows 3.x in xdos:
  1190.  
  1191.   As of version 0.64.3 DOSEMU is able to run Windows in xdos. Of course,
  1192.   this is not recommended at all, but if you really want to try, it is
  1193.   safer then starting windows-31 on the console, because _when_ it
  1194.   crashes, it doesn't block your keyboard or freeze your screen.
  1195.  
  1196.   Hints:
  1197.  
  1198.   1. Get Dosemu & Linux source.
  1199.   2. Unpack dosemu.
  1200.   3. Run "./configure" to configure Dosemu (it will enable vm86plus as a
  1201.      default).
  1202.   4. Type "make" to compile.
  1203.   5. Get a Trident SVGA drivers for Windows. The files are tvgaw31a.zip
  1204.      and/or tvgaw31b.zip. They are available at garbo.uwasa.fi in
  1205.      /windows/drivers (any mirrors?).
  1206.   6. Unpack the Trident drivers.
  1207.   7. In Windows setup, install the Trident "800x600 256 color for 512K
  1208.      boards" driver.
  1209.   8. Do the things described above to get and install OS2WIN31.
  1210.   10. Start xdos.
  1211.   11. In Dosemu, go to windows directory and start winemu.
  1212.   12. Cross your fingers.
  1213.  
  1214.  
  1215.  
  1216.  
  1217.   8.3.  Can I install windows from within dosemu?
  1218.  
  1219.   No you cant't. Dos will tell you something like
  1220.  
  1221.        The XMS driver you have on your system is not compatible with Win-
  1222.        dows...
  1223.  
  1224.  
  1225.   You need to install windows from Dos. You can copy the windows tree to
  1226.   somewhere on your Linux Filesystem and use lredir to mount it on the
  1227.   same place as it is in dos. Example:
  1228.  
  1229.        You have windows in d:\windows You have d:\ mounted as /dosc in Linux
  1230.        You copy the windows tree to Linux, e.g. "cp -a /dosd/windows
  1231.        /usr/share Inside dosemu you redirect the copied tree like lredir d:
  1232.        linux\fs\dosd
  1233.  
  1234.  
  1235.   Now dosemu can't mess around in you windows directory, but changes in
  1236.   the windows directory aren't seen by dosemu too. If you want to do the
  1237.   same with windows on drive c:> look in this FAQ how to redirect c:.
  1238.  
  1239.   But you can use "setup" from inside the windows directory to install
  1240.   drivers and change some settings.  (97/2/1497)
  1241.  
  1242.  
  1243.   8.4.  Notes for the mouse under win31-in-xdos:
  1244.  
  1245.   1. Use the mouse driver "mouse.drv" from WinOS2
  1246.  
  1247.   2. In order to let the mouse properly work you need the following in
  1248.   your win.ini file:
  1249.  
  1250.        [windows]
  1251.        MouseThreshold1=0
  1252.        MouseThreshold2=0
  1253.        MouseSpeed=0
  1254.  
  1255.   3. The mouse cursor gets not painted by X, but by windows itself, so
  1256.   it depends on the refresh rate how often it gets updated, though the
  1257.   mouse coordinates movement itself will not get delayed.  ( In fact you
  1258.   have 2 cursors, but the X-cursor is given an 'invisible' cursor shape
  1259.   while within the DOS-Box. )
  1260.  
  1261.   4. Because the coordinates passed to windows are interpreted
  1262.   relatively, we need to calibrate the cursor. This is done
  1263.   automatically whenever you enter the DOS-Box window: The cursor gets
  1264.   forced to 0,0 and then back to its right coordinates. Hence, if you
  1265.   want to re-calibrate the cursor, just move the cursor outside and then
  1266.   inside the DOS-Box again.  (97/2/10)
  1267.  
  1268.  
  1269.   8.5.  Why did my Icon dissapear from the Programmanager?
  1270.  
  1271.   MS-Windows and WinOS2 handle the program manager group different.
  1272.   While MS-Win store the setup in progman.ini, WinOS2 what's the conted
  1273.   of progman.ini in system.ini. Her a tip from (friest@acm.org (Todd T.
  1274.   Fries)):
  1275.  
  1276.        cat progman.ini >> system.ini
  1277.  
  1278.  
  1279.   Be sure to use >> :-)
  1280.  
  1281.  
  1282.   9.  Video and sound
  1283.  
  1284.   9.1.  Can I run 32-bit video games under dosemu?
  1285.  
  1286.   Mark Rejhon (mdrejhon@magi.com) reported (95/4/8) that
  1287.  
  1288.   With the recent DPMI improvements that has gone into 0.60, you can now
  1289.   run some 32-bit video games in dosemu.   If the game is compatible in
  1290.   an OS/2 DOS box, there are chances that it will work in dosemu.
  1291.   (Example 32-bit games include Descent, Dark Forces, Mortal Kombat 2,
  1292.   Rise of The Triad, which have all successfully been tested in recent
  1293.   dosemu releases).
  1294.  
  1295.   Before you attempt to run a video game, you must have the keyboard
  1296.   configured in raw keyboard mode and enabled VGA graphics modes, in the
  1297.   /etc/dosemu.conf file.  If you have successfully run graphics programs
  1298.   in dosemu, and are prepared to take the risk of a possible system
  1299.   crash (this is because you are letting dosemu run with root access to
  1300.   the video card, and leaves the possibility of putting the video card
  1301.   in a bad state that is difficult to recover from) then you can go
  1302.   ahead and try running the video game.
  1303.  
  1304.   Note, however, you will have to turn off the sound in the game.
  1305.   (Someone will have to program in sound board emulation before we can
  1306.   avoid this).  Note that game timers can be a little bit slow, due to
  1307.   Linux multitasking and lack of high-frequency timer support.  So the
  1308.   games may run from anywhere from 5 to 100 percent speed.  Typically,
  1309.   the speed is approximately 50 percent in recent dosemu releases and is
  1310.   expected to improve eventually.
  1311.  
  1312.   Who knows, it might even work. If you can't get it to work, check
  1313.   EMUfailure if the program is listed there, or falls in a category of
  1314.   programs that at present don't or probably never work with dosemu. If
  1315.   you think, it should be listed in EMUfailure, report to linux-
  1316.   msdos@vger.rutgers.edu
  1317.  
  1318.   Addition from (lermen@elserv.ffm.fgan.de(97/2/11)):
  1319.  
  1320.  
  1321.   There is a security hole when having enabled DPMI and having dosemu
  1322.   suid root (especially when using dos4gw-based games), the client is
  1323.   able to access the whole user space, hence also can modify the dosemu
  1324.   code itself. Use of the 'secure on' option in /etc/dosemu.conf
  1325.   disables this, but then you can't run those games.
  1326.  
  1327.  
  1328.   9.2.  Exiting from dosemu gives me a screen full of garbage.
  1329.  
  1330.   (95/4/8)
  1331.  
  1332.   The problem is that the font information for the VGA text screen is
  1333.   not being saved.  Get a copy of the svgalib package.  The current
  1334.   source is in
  1335.  
  1336.   sunsite.unc.edu:/pub/Linux/libs/graphics/svgalib125.tar.gz
  1337.  
  1338.  
  1339.   It may also be available as a pre-compiled package in your favorite
  1340.   Linux distribution (e.g., Slackware, etc.).  Use savetextmode to save
  1341.   the current text mode and font to a file in /tmp before running
  1342.   dosemu.  Then run textmode upon exiting dosemu to restore it.
  1343.  
  1344.   Addition from (lermen@elserv.ffm.fgan.de(97/2/11)):
  1345.  
  1346.   Have a look also at src/arch/linux/debugger/README.recover and
  1347.   README.dosdebug, dosdebug can aid you recovering.
  1348.  
  1349.  
  1350.   9.3.  How do I get dosemu to work with my Trident/Actix/other video
  1351.   card?
  1352.  
  1353.   [The screen flickers violently, displays the video BIOS startup
  1354.   message, and hangs.]
  1355.  
  1356.   Andrew Tridgell (tridge@nimbus.anu.edu.au) reported (94/1/29) that
  1357.  
  1358.   I found with early versions it would work if I used:
  1359.  
  1360.      ports { 0x42 }
  1361.  
  1362.  
  1363.   but that sometimes my machine would crash when it was cycling the
  1364.   video BIOS in dosemu. This is because you're allowing the VGA BIOS to
  1365.   re-program your clock, which severely stuffs with Linux.
  1366.  
  1367.   This prompted me to write the read-only and masking patches for
  1368.   dosemu, which I believe are still in the latest version. I now use:
  1369.  
  1370.      ports { readonly 0x42 }
  1371.  
  1372.  
  1373.   and it boots dosemu more slowly, but more reliably.
  1374.  
  1375.   ---------------------
  1376.  
  1377.   Tim Shnaider (tims@kcbbs.gen.nz) also reported (94/1/18) that
  1378.  
  1379.   One way of fixing this is to use the GETROM program to dump your video
  1380.   BIOS to a file and edit the config file in the /etc/dosemu directory
  1381.   There will be a few video lines.  Here is my video line
  1382.  
  1383.      video { vga console graphics chipset trident memsize 1024 vbios_file
  1384.      /etc/dosemu/vbios }
  1385.  
  1386.  
  1387.   where vbios is the file generated by typing
  1388.  
  1389.      getrom > vbios
  1390.  
  1391.  
  1392.  
  1393.   ---------------------
  1394.  
  1395.  
  1396.   Douglas Gleichman (p86884@tcville.edsg.hac.com) reported (94/9/1) that
  1397.   (with the ATI Graphics Ultra)
  1398.  
  1399.   For dosemu 0.52 you need to add this line to your dosemu.conf file:
  1400.  
  1401.    ports  { 0x1ce 0x1cf 0x238 0x23b 0x23c 0x23f 0x9ae8 0x9ae9 0x9aee 0x9aef }
  1402.  
  1403.  
  1404.   The board self test will list a failure but graphics programs will run
  1405.   fine.
  1406.  
  1407.  
  1408.  
  1409.  
  1410.   9.4.  Why doesn't my soundcard software work with dosemu?
  1411.  
  1412.   Hannu Savolainen (hsavolai@cs.Helsinki.FI) reported (94/3/21) that
  1413.  
  1414.   The dosemu and any DOS program with it run under control of a
  1415.   protected mode operating system. This means that the memory is not
  1416.   mapped as the program expects. If it somehow manages to start DMA
  1417.   based recording with SB, the recorded sound doesn't find it's way to
  1418.   the application. It just destroys some data in the memory.
  1419.  
  1420.  
  1421.   James B. MacLean (macleajb@ednet.ns.ca) reported (94/6/19) that
  1422.  
  1423.   Sorry to disappoint, but at this time dosemu does not support directly
  1424.   the necessary interception of interrupts or DMA generally required for
  1425.   sound card access via dosemu :-(.
  1426.  
  1427.   It's bound to happen at some future date though :-),
  1428.  
  1429.   And Corey Sweeney (orey@d94.nnb.interaccess.com) reports (97/2/15)
  1430.  
  1431.        Sound code is being currectly being worked on
  1432.  
  1433.  
  1434.  
  1435.   10.  Games
  1436.  
  1437.   10.1.  Duke3d dosen't work
  1438.  
  1439.   Hans Lermen <lermen@elserv.ffm.fgan.de> said (97/2/16): duke3d must be
  1440.   'configured' via a setup, within this setup you have to choose
  1441.   'keyboard + mouse', else it won't work.
  1442.  
  1443.  
  1444.  
  1445.   11.  Other Hardware
  1446.  
  1447.   11.1.  How do I get my xxxxx device working under dosemu?
  1448.  
  1449.   Corey Sweeney (corey@bbs.xnet.com) reported (94/5/30) that
  1450.  
  1451.   Here is a log of my adventures trying to get devices working under
  1452.   dosemu.  So far I've gotten my voice mail system working and my
  1453.   scanner half working.  Here's how:
  1454.  
  1455.   1. Look in your manual and find if your card uses any ports.  If your
  1456.   manual gives you some, put them in your config file at the "ports"
  1457.   line.  Remember that sometimes you need to have several ports in a
  1458.   row, and the first one might be the only one documented.
  1459.  
  1460.   2. Try it out. If it doesn't work, or you don't have a manual (or your
  1461.   manual is as crappy as my AT&T manual:) then run dosemu with "dos -D+T
  1462.   2> /tmp/io.debug".  Run your device software, then exit dosemu.  Look
  1463.   through /tmp/io.debug and find any port numbers it might give you.
  1464.   Try adding those to the port lines and try running dosemu again. Ports
  1465.   below 0x400 with the keyword fast don't get logged(97/2/9)!
  1466.  
  1467.   3. If you still fail then you may need interrupts.
  1468.  
  1469.   Find out what interrupt the card uses and verify, that the kernel
  1470.   isn't using the IRQ in question (cat /proc/interrupts).  Hans Lermen
  1471.   wrote (97/2/17):
  1472.  
  1473.  
  1474.        1. Make sure Linux doesn't use this network card
  1475.  
  1476.        2. Set 'sillyint { use_sigio 5 }' in /etc/dosemu.conf
  1477.  
  1478.  
  1479.  
  1480.  
  1481.   (some addittions (97/2/11)) and that's about it...
  1482.  
  1483.   Question: What if my card uses DMA?  Answer: Your screwed.
  1484.  
  1485.  
  1486.   12.  Problems and fixes
  1487.  
  1488.   12.1.  Security issues
  1489.  
  1490.   A full featured Dosemu needs to be suid root, e.g to access ports.
  1491.   Dosemu runs as suid "root" only where it is needed, and releases this
  1492.   right thereafter. But with DPMI, the Dos client programm can access
  1493.   the whole user space, hence also can modify the dosemu code itself.
  1494.   Use of the 'secure on' option in /etc/dosemu.conf disables this, but
  1495.   then you can't run any more some applications like 32-bit video games
  1496.   (lermen@elserv.ffm.fgan.de(97/2/11)). E.g. running a well known
  1497.   compiler with full access might have smaller security implications
  1498.   then some game, obtained by some obscure source.
  1499.  
  1500.  
  1501.   12.2.  Dosemu dies when booting. I have Win95 installed.
  1502.  
  1503.   Dosemu relies that the Dos-Version on the hdimage and the Drive you
  1504.   map to contain command.com are the same. If not, dosemu will crash
  1505.   sooner or later. With the dual boot option Win95 offers when pressing
  1506.   the F4,F5 and F8 Keys with the "Starting Win95" text, versions on the
  1507.   Win95 drive may swap. Take special care for command.com. Let your
  1508.   shell variable in config.emu point to the correct static version of
  1509.   command.com, e.g.: shell=c:\win95\command.com c:\ /P /E:1024
  1510.   (97/02/28)
  1511.  
  1512.  
  1513.  
  1514.   Learn about dosdebug and use it to control a dosemu session(97/2/9)
  1515.  
  1516.  
  1517.  
  1518.  
  1519.   12.3.  Dosemu hangs! How can I kill it?
  1520.  
  1521.   Learn about dosdebug and use it to control a dosemu session(97/2/9)
  1522.  
  1523.  
  1524.   12.4.  Dosemu crashed and now I can't type anything.
  1525.  
  1526.   Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that
  1527.  
  1528.   If you have no terminal or network access that you can use to log in,
  1529.   you may have to press the reset button.  If you can still get a usable
  1530.   shell somehow, run "kbd_mode -a" to switch the keyboard out of raw
  1531.   mode, and/or "stty sane" on the console so that you can see what
  1532.   you're typing.
  1533.  
  1534.   A useful thing to do is to use a script to run dosemu, and run
  1535.   "kbd_mode -a" automatically right after dosemu.  When dosemu crashes,
  1536.   the script usually will resume running, and execute the "kbd_mode -a"
  1537.   command.
  1538.  
  1539.  
  1540.   12.5.  I've enabled EMS memory in dosemu.conf but it does not help.
  1541.  
  1542.   Rob Janssen (rob@pe1chl.ampr.org) reported (94/7/11)
  1543.  
  1544.   Don't forget to load the provided ems.sys from the config.sys file.
  1545.  
  1546.  
  1547.   12.6.  How do I get rid of all those annoying "disk change" messages?
  1548.  
  1549.   (94/8/11)
  1550.  
  1551.   Grab and install klogd.  Try
  1552.  
  1553.            sunsite.unc.edu:/pub/Linux/system/Daemons/sysklogd1.2.tgz
  1554.  
  1555.  
  1556.  
  1557.  
  1558.   12.7.  Why won't dosemu run a second time after exiting in console
  1559.   mode?
  1560.  
  1561.   Aldy Hernandez (aldy@sauron.cc.andrews.edu) reported (94/7/8) that
  1562.  
  1563.   You should disable your video and/or BIOS caching.
  1564.  
  1565.  
  1566.   12.8.  Why will dosemu run in a term but not in the console?
  1567.  
  1568.   JyiJiin Luo (jjluo@casbah.acns.nwu.edu) reported (94/4/19) that
  1569.  
  1570.   I experienced exactly the same problem before. I figured out all the
  1571.   video shadow in my AMI BIOS must be disabled. Now dosemu runs fine on
  1572.   my system.
  1573.  
  1574.  
  1575.   12.9.  How can I speed up dosemu?
  1576.  
  1577.   In some cases it is useful to play with the value of the HogThreshold
  1578.   variable in your dosemu.conf file.
  1579.  
  1580.  
  1581.   Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that
  1582.  
  1583.   HogThreshold should now be set to approximately half of the BogoMips
  1584.   value that the system reports on boot.
  1585.   12.10.  My CDROM drive has problems reading some files under dosemu.
  1586.  
  1587.   Vinod G Kulkarni (vinod@cse.iitb.ernet.in) reported (94/4/7) that
  1588.  
  1589.   When a CDROM is mounted from linux and used from within dosemu (mapped
  1590.   drive), there could be some problems. The CD-ROM driver (iso9660) in
  1591.   the kernel tries to find out the type of the file (i.e. binary or
  1592.   text).  If it can't find, it tries to guess the type of the file using
  1593.   a heuristic. This heuristic fails under some circumstances when a
  1594.   (almost) text file is to be treated as binary.  (I do not know if it
  1595.   is a bug or feature.)
  1596.  
  1597.   The result of this is that if you copy such a file from CD-ROM (from
  1598.   linux itself, and not necessarily dosemu), the resulting file will be
  1599.   usually bigger than original file. (Blanks get added before ^J,^M.)
  1600.   So a program running in dosemu gives an error or hangs, which may be
  1601.   mistaken as problem of dosemu.
  1602.  
  1603.  
  1604.   Rob Janssen (pe1chl@rabo.nl) reported (94/8/10) that
  1605.  
  1606.   The way to solve this is to turn off conversion altogether.  Pass the
  1607.   option "-o conv=binary" to the mount command mounting the CD-ROM, or
  1608.   use the following in /etc/fstab:
  1609.  
  1610.   /dev/cdrom      /cdrom          iso9660 conv=binary,ro
  1611.  
  1612.  
  1613.   No patches to the kernel are necessary.
  1614.  
  1615.  
  1616.   12.11.  How do I see debugging output?
  1617.  
  1618.   Daniel Barlow(jo95004@sable.ox.ac.uk) reported (95/4/8) that
  1619.  
  1620.   As of dosemu 0.60, debugging output is redirected to a file specified
  1621.   on the command line.  Use "dos -D+a -o /tmp/debug" to log all debug
  1622.   output to /tmp/debug.  There should no longer be any need to redirect
  1623.   stderr.
  1624.  
  1625.  
  1626.  
  1627.   12.12.  Why are my keystrokes echoed ttwwiiccee??
  1628.  
  1629.   Nick Holloway (alfie@dcs.warwick.ac.uk) reported (94/2/22) that
  1630.  
  1631.   After running dos after playing with some stty settings, I was getting
  1632.   doubled key presses.  I can now reveal what the reason is!
  1633.  
  1634.   It only happens when dos is run on the console with 'istrip' set.
  1635.   This is (I think) because the raw scancodes are mutilated by the
  1636.   'istrip', so that key release events look like key press events.
  1637.  
  1638.   So, the input processing needs to be turned off when using the scan
  1639.   codes on a console (it wouldn't be a good idea to do it for tty
  1640.   lines).
  1641.  
  1642.  
  1643.   12.13.  Dosemu scrambles my screen?
  1644.  
  1645.   For those graphics cards not fully supported in dosemu, with allowed
  1646.   console graphics a dosemu crash may leave your console in a scrambles
  1647.   and nearly unusable way. To prepare for that situation, Spudgun
  1648.   <spudgun@earthlight.co.nz> posted following solution. First save your
  1649.   registers when running on the console ~> cat /usr/bin/savetextmode ~>
  1650.   restoretextmode -w /etc/textregs ~> restorefont -w /etc/fontdata Then,
  1651.   when a crash happened, run following script: restoretextmode -r
  1652.   /etc/textregs restorefont -r /etc/fontdata restorepalette
  1653.  
  1654.   If it doesn't fix it nothing will I also found having an X server
  1655.   running sometimes put my Vid card's registers into a strange state
  1656.   where this script made things worse I think since changing X servers
  1657.   and/or running savetextmode on a vt while X was running helped.
  1658.   (97/04/08)
  1659.  
  1660.  
  1661.   12.14.  MS FoxPro 2.6 won't run
  1662.  
  1663.   FoxPro 2.6 doesn't run on network drives. Alexey Naidyonov
  1664.   <growler@growler.tsu.tula.ru> states on that problem: And I guess your
  1665.   FoxPro files are on lredir'ed disk, yeah? The matter is that FoxPro
  1666.   doesn't run on such disk, but when I said disk { partition ... } in
  1667.   /etc/dosemu/conf, it runs.
  1668.  
  1669.  
  1670.  
  1671.   13.  Contributing to the dosemu project
  1672.  
  1673.   13.1.  Who is responsible for dosemu?
  1674.  
  1675.   (97/2/9)
  1676.  
  1677.   Dosemu is built upon the work of Matthias Lautner and Robert Sanders.
  1678.   James B. MacLean (jmaclean@ednet.ns.ca) is responsible for organizing
  1679.   the latest releases of dosemu.
  1680.  
  1681.                          History of dosemu
  1682.  
  1683.             Version    Date                Person
  1684.            -------------------------------------------------
  1685.             0.1        September 3, 1992   Matthias Lautner
  1686.             0.2        September 13, 1992  Matthias Lautner
  1687.             0.3        ???                 Matthias Lautner
  1688.             0.4        November 26, 1992   Matthias Lautner
  1689.             0.47       January 27, 1993    Robert Sanders
  1690.             0.47.7     February 5, 1993    Robert Sanders
  1691.             0.48       February 16, 1993   Robert Sanders
  1692.             0.48pl1    February 18, 1993   Robert Sanders
  1693.             0.49       May 20, 1993        Robert Sanders
  1694.             0.49pl2    November 18, 1993   James MacLean
  1695.             0.49pl3    November 30, 1993   James MacLean
  1696.             0.49pl3.3  December 3, 1993    James MacLean
  1697.             0.50       March 4, 1994       James MacLean
  1698.             0.50pl1    March 18, 1994      James MacLean
  1699.             0.52       June 16, 1994       James MacLean
  1700.             0.60       April 9, 1995       James MacLean
  1701.             0.64.4     February 9,1997     Hans Lermen
  1702.  
  1703.  
  1704.  
  1705.  
  1706.   13.2.  I want to help.  Who should I contact?
  1707.  
  1708.   The dosemu project is a team effort.  If you wish to contribute, see
  1709.   the DPR (dosemu Project Registry).  A current copy may be found in
  1710.   ../doc/DANG (97/2/9).
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.