Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dos(X) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     dos(1)           X Version 11 (29 November 1989)           dos(1)



     NAME
          dos - runs MS-DOS in a window (with Merge 386 or ODT-DOS)

     SYNOPSIS
          dos [options]
          dos [options] dosprogram
          dosprogram (where dosprogram is the name of a MS-DOS
          program)

     DESCRIPTION
          dos runs the  MS-DOS  operating  system  in  windows.   (For
          simplicity,   "MS-DOS"  refers  also  to  PC-DOS  and  other
          variants.)  Use it to run MS-DOS programs on your X display.
          You  can  run  dos in windows only with Merge 386 or ODT-DOS
          installed.

          This manual page describes how to use dos in a window.   You
          can  use  it  to  run MS-DOS programs in xterm windows or in
          their own independent windows.

          With Merge 386 or ODT-DOS installed, you can run MS-DOS  and
          MS-DOS  programs directly from your UNIX prompt (without the
          window system).  Complete details of  the  dos  program  are
          provided in the Merge 386 or ODT-DOS documentation.

          Running dos In An xterm Window

          One way to use dos is  to  treat  it  as  an  ordinary  UNIX
          program.   For example, you can run dos by typing dos at the
          UNIX prompt in an xterm window.  This changes your prompt to
          the  MS-DOS  prompt,  C>, and you can run MS-DOS commands or
          application  programs   as   though   you   were   using   a
          conventional,  stand-alone MS-DOS computer.  This simulation
          of a  stand-alone  MS-DOS  computer  is  called  the  MS-DOS
          environment.   To return to the xterm UNIX prompt, type quit
          at the MS-DOS prompt.  To run dos as a UNIX  program  in  an
          xterm window like this, the XMERGE variable must not be set.

          When you use xterm, you can also start MS-DOS  commands  and
          programs  directly  from  the  UNIX prompt.  For example, if
          Lotus 1-2-3 is installed and configured  on  your  computer,
          you can start it from your xterm UNIX prompt by typing:

            123

         When you run a MS-DOS program like this, you  return  to  the
         xterm  UNIX prompt by exiting the program in the standard way
         for that program.

          Since xterm emulates a  VT102  terminal-a  monochrome  ASCII
          terminal-graphics  capabilities  are  not available when you
          run MS-DOS in an xterm window.   If  your  xterm  window  is



     Page 1                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          smaller  than 80 x 25 characters, you can see only a portion
          of  the  dos  display;  the  right  and  bottom  sides   are
          truncated.  When you run dos in an xterm window, you can use
          a window manager to control the size  and  position  of  the
          window.  When you resize an xterm window, you expose more or
          less of the MS-DOS display output.  You do  not  change  the
          size of the characters contained in the window.

          Running dos In An Independent Window

          You can also create independent windows for MS-DOS programs.
          dos  creates  a  new  window  you set the XMERGE environment
          variable  and  the  MS-DOS  program   is   display-oriented.
          ("Display-oriented means that the program writes directly to
          the  screen.   This  is  sometimes  referred  to  as   "ill-
          behaved.")  To  run  dos  in independent windows, the XMERGE
          environment variable must be set. Set the XMERGE environment
          variable to match your graphics display adapter.  You can do
          this in a startup program or script; the startx program sets
          the  XMERGE  environment  variable  to  match  your graphics
          adapter  automatically.   Possible  values  are  mono,  cga,
          hercules,  ega,  or vga.  (If you set it to any other value,
          cga is assumed.)  MS-DOS programs you run should be for  use
          in  the  same graphics mode; for example, if you have an EGA
          graphics adapter, you should set XMERGE to ega and your  MS-
          DOS programs should run in EGA mode.

          If you want to run MS-DOS programs whose graphics modes  are
          lower resolution than your graphics display adapter, you can
          override the XMERGE environment variable with  the  dos  and
          dosopt  +a  option.  For example, if you have a VGA graphics
          adapter, but your MS-DOS program runs with CGA graphics, you
          start the program by typing:

            dos +acga dosprogram

         See the Merge 386 or ODT-DOS documentation for more details.

          dos assumes by default that built-in MS-DOS commands such as
          DIR  are  stream-oriented.   All  other  MS-DOS commands and
          programs (including MS-DOS environments started with the dos
          command)  are  assumed  to  be  display-oriented  unless you
          change the initial default.

          Interactive MS-DOS  programs  are  always  display-oriented.
          When  you  start a display-oriented program, either from the
          xterm UNIX prompt or from a menu, dos opens a new window for
          the  program.   If  you do not use a window manager to place
          the new window, dos positions it at the upper left corner of
          your  root  window.   To close the new window, terminate the
          MS-DOS environment or MS-DOS  program  in  the  normal  way:
          type  quit  at  the  MS-DOS prompt or exit the program.  You



     Page 2                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          cannot resize independent MS-DOS windows.

          Stream-oriented  MS-DOS  commands  do  not  open  their  own
          windows.   Instead,  stream-oriented  MS-DOS  commands  send
          their display output to the MS-DOS standard output (STDOUT),
          which  Merge  386  or  ODT-DOS  directs to the UNIX standard
          output.  For example, when you run DIR from the UNIX  prompt
          in  an  xterm  window, dos displays the directory listing in
          that xterm  window.  It  is  generally  not  useful  to  run
          stream-oriented  commands from window manager menus.  If you
          do, any screen output (such as the DIR directory listing) is
          sent to the shell from which you started the window manager.

          You should define the XMERGE environment variable only  when
          you  are  running  an X server.  If you attempt to start dos
          with XMERGE defined when you are not running  an  X  server,
          dos stops and the following error message appears:

            X Toolkit Error:  Can't open display.

         Command Forms

          There are three different command forms you can use to start
          MS-DOS  or  an  MS-DOS  program.  You  can  use any of these
          command forms at the UNIX prompt in an xterm window or in  a
          window manager menu.

          The first form,

            dos  [options]

         starts an MS-DOS environment by executing the MS-DOS  command
         interpreter, COMMAND.COM.  The default disk drive is drive C:
         and the system prompt is C>.  MS-DOS programs are expected to
         be  in the MS-DOS search path, which by default is equivalent
         to the UNIX path.

          The second form,

            dos  [options]  dosprogram

         specifies that dosprogram is an MS-DOS command or program  to
         be  run  by the dos process.  With this form, the dos process
         terminates automatically when the  command  finishes  or  you
         exit  the  MS-DOS program.  MS-DOS programs invoked with this
         form are expected to be in the UNIX search path.

          The third form,

            dosprogram

         where dosprogram is the name of an MS-DOS program, works just



     Page 3                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



         like dos dosprogram, except that:

          ⊕   You cannot specify  dos  options  on  the  command  line
              (although  you  can specify any parameters that apply to
              dosprogram).

          ⊕   The UNIX operating system must recognize  dosprogram  as
              an MS-DOS program.  The MS-DOS dosprogram must therefore
              be executable and be in the current UNIX search path  or
              specified by explicit path name.

          As described earlier,  you  normally  terminate  the  MS-DOS
          environment  with  the  QUIT  command.  You terminate MS-DOS
          programs started with the second and third forms by  exiting
          the  program.  If a MS-DOS program should fail to terminate,
          you can use the MS-DOS "reboot" key sequence,  CTRL-ALT-DEL,
          to kill it.

          NOTE:  Use CTRL-ALT-DEL with caution if you are using  an  X
          server that runs under MS-DOS, such as the PC Xsight server.
          If you press CTRL-ALT-DEL while using a MS-DOS  server,  you
          reboot  the PC hardware.  With other servers, however, CTRL-
          ALT-DEL simply kills the MS-DOS program.

     THE DOS MENU:  ZOOM AND FOCUS
          dos has a menu you can use to focus your mouse  in  the  dos
          window  and  to "zoom" in on the dos window.  When you zoom,
          the dos window expands to a full-sized MS-DOS  window.   You
          must be running the server on the system console in order to
          zoom. When you focus the mouse, you can use it in the MS-DOS
          program you run in the dos window.

          To open the dos menu, move your cursor into the  dos  window
          and  press  ALT-D.   The  dos menu appears with three items:
          Zoom, Focus, and Unfocus.   Select  the  item  you  want  by
          clicking on it with your left mouse button.

          Select Zoom to expand your dos window to become a full-sized
          MS-DOS screen.  Press ALT-D to "unzoom."

          Zoom enables you to run MS-DOS  EGA/VGA  graphics  programs.
          (You  cannot  run  EGA/VGA graphics programs in dos windows;
          you must zoom.)  To return a zoomed EGA/VGA  dos  window  to
          its  default  size,  first exit the program or exit graphics
          mode and then press ALT-D.

          To get rid of the dos menu, just move the cursor out of it.

          You can change the ALT-D sequence that opens the  menu.   It
          can  be any combination of Shift, Ctrl, and Alt separated by
          hyphens or it can be a combination of these keys and another
          key  from  0  to  9  or  A to Z, again separated by hyphens.



     Page 4                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          Examples are provided in the RESOURCES section  below.   The
          sequence is controlled by the sequence resource.

          Error Messages

          You can only run MS-DOS graphics programs in EGA/VGA mode if
          you  zoom.  If  you  try  to  run an MS-DOS EGA/VGA graphics
          program in  an  "unzoomed"  window,  the  following  warning
          message appears:

            EGA/VGA graphics are not available in a window.
            Click on Zoom in the dos  menu  to  run  EGA/VGA  graphics
            programs.
            Press ALT-D to bring up the dos menu.


          When the MS-DOS programs you run  require  a  mouse,  select
          Focus  to  focus  your  mouse in the dos window.  This means
          that your mouse input goes to the MS-DOS program (instead of
          to  the  server).  Unfocus reverses this, so that your mouse
          input goes to the server.

     VIRTUAL AND PHYSICAL DISPLAYS
          You can run MS-DOS programs in windows  using  any  graphics
          display  adapter that your server supports.  The dos process
          itself, however,  communicates  with  one  of  five  virtual
          displays:  monochrome, Hercules, CGA, EGA, or VGA.  Your MS-
          DOS programs must therefore be compatible with at least  one
          of these when you run them in windows.  (Compatible means of
          the same or lower resolution.)

          If you do not set the XMERGE environment  variable  and  run
          dos  in  an  xterm  window,  dos  uses  a monochrome virtual
          display.  This means that MS-DOS  programs  you  run  in  an
          xterm  window  can  only  be  monochrome  text programs, not
          graphics.  The monochrome virtual display has  a  resolution
          of  80 x 25  characters.   You  can  see  the entire 80 x 25
          virtual display in your xterm window only  if  it  is  large
          enough to accommodate 80 columns and 25 rows.

          Without  zooming,  dos  can  only  run  monochrome  and  CGA
          display-oriented  MS-DOS  programs  in  independent windows.
          dos uses a CGA virtual display by default.  The CGA  virtual
          display  accommodates  text and low-resolution graphics.  In
          text mode, the resolution of  the  CGA  virtual  display  is
          80 x 25  characters.   Two  standard graphics modes are also
          available: 320 x 200 pixels in  4-color  mode  or  640 x 200
          pixels  in  2-color mode.  MS-DOS programs automatically set
          the mode to be used when they run.  When you start  the  MS-
          DOS  environment  with  the  dos command, without running an
          MS-DOS command or program, the CGA virtual display initially
          uses  text  mode.  When you run CGA graphics programs in the



     Page 5                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          MS-DOS environment, the virtual display changes to  graphics
          mode automatically as necessary.

          The Hercules virtual display has a resolution  of  720 x 348
          pixels and 2 colors.

          If you have an EGA or VGA adapter, you can  run  monochrome,
          Hercules,  or  CGA graphics MS-DOS programs in windows.  You
          must use Zoom to run EGA/VGA graphics programs, however.

          When  dos  opens  an  independent  window,  the  window   is
          automatically  sized to accommodate the virtual display.  If
          your physical display  has  a  higher  resolution  than  the
          virtual  display,  the dos window consumes only a portion of
          your physical display.

          On the other hand, if the dos virtual display has  a  higher
          resolution  than your physical display, a portion of the dos
          window cannot fit within the  boundaries  of  your  physical
          display and is hidden from view.

     OPTIONS
          See the Merge 386 or ODT-DOS documentation  for  information
          about these options.

          +ados_device[,e][,i][,r] [=unix_device[,e][,i][,r]]
               Attaches devices to MS-DOS.   Normally,  Merge  386  or
               ODT-DOS  attaches  standard  devices  automatically  as
               required.

          -ados_device
               Does not assign devices to MS-DOS.

          +b   Specifies that an MS-DOS program is stream-oriented.

          -b   Specifies that an MS-DOS program is display-oriented.

          +c   Passes  command  or  program  name  directly,   without
               interpretation,  to  COMMAND.COM,  the  MS-DOS  command
               interpreter.

          +d[drive]
               Sets initial current drive.

          +e[file[,file ...]]
               Interprets one or more files  instead  of  the  default
               configuration file when MS-DOS is loaded.

          -e   Does not interpret any configuration file  when  MS-DOS
               is loaded.

          +h   Displays help text.



     Page 6                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          +l[image]
               Loads MS-DOS image file image if image is specified.

          -l   Starts an MS-DOS environment with no image.

          +mn  Specifies the required MS-DOS memory size.

          +p[file]
               Runs file, a batch file, when MS-DOS starts.

          -p   Does not run any batch file automatically  when  MS-DOS
               runs.

          +sn  Sets printer timeout to n seconds.

          -s   No printer timeout.

          +t   Translates arguments according to standard Merge 386 or
               ODT-DOS conventions.

          -t   Does not translate arguments to the MS-DOS program.

          +x   Turns MS-DOS break-checking on.

          -x   Turns MS-DOS break-checking off.

               The default values are:

          -a   Specifies no devices attached.

          -b   Specifies a display-oriented program.

          +d   Sets the initial current drive to C:.

          +e   Interprets /config.sys and $HOME/config.sys.

          +l   Loads default MS-DOS image.

          +m640
               Specifies normal MS-DOS memory size.

          +p   Runs /autoexec.bat and $HOME/autoexec.bat  with  MS-DOS
               environment (that is, with the command dos [options]).

          -p   Does  not  run  any  autoexec.bat  with  the   commands
               dos [options] dosprogram     or    dosprogram    (where
               dosprogram is an MS-DOS program).

          +s15 15-second printer timeout.

          +t   Interprets command-line arguments in the standard way.




     Page 7                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          -x   Turns MS-DOS break-checking off.

     RESOURCES
          The appearance of dos windows is controlled by the following
          resources:

          background
               Sets the background color.  The default is "black."

          borderWidth
               Sets the width of the window  border  in  pixels.   The
               default is 1.

          boldFont
               Sets the default bold font.  The default is "dos6x13."

               NOTE: You should use bold font  only  when  you  use  a
               monochrome  display.   On  a  display with four or more
               planes, bold MS-DOS characters are displayed  in  blue.
               On  a  monochrome display, you can use a different font
               to represent bold.  Normal and bold fonts should be the
               same  size  and  contain  the  MS-DOS extended graphics
               characters; however there is no pair of standard  fonts
               that  meets  these  requirements.   We  suggest you set
               boldFont to be nothing  (DOS*boldFont:),  which  causes
               dos  to simulate bold by printing the bold characters a
               second time but  one  pixel  to  the  right.   You  can
               achieve  the  same effect by omitting the DOS*boldFont:
               line from your resource files.

          display
               Specifies the X server and display to open  the  window
               on.

          font Sets the default font.  The default is "dos6x13."

          foreground
               Sets the  foreground  (text)  color.   The  default  is
               "white."

          geometry
               Sets the window  geometry  (position  and  size).   The
               default is 80x25.

          iconic
               Starts the program in  an  iconic  state.   The  window
               manager determines how the iconic state is represented.
               The default is False.

          internalBorder
               Specifies the number of pixels between  the  characters
               and the window border.  The default is 2.



     Page 8                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          name Specifies the name of this  instance  of  the  program.
               The default is "dos."

          pointerColor
               Changes the color of  your  pointer.   The  default  is
               "white." (Not all servers support this option.)

          pointerShape
               Defines the pointer shape.  The default is "xterm."

          sequence
               Specifies the key sequence to generate  the  dos  menu.
               The default is ALT-D.

          title
               Specifies a string the  window  manager  can  use  when
               displaying an program.  The default is "dos."

          You can assign values to  any  of  these  keywords  in  your
          .Xdefaults  file or any other resource file using the syntax
          DOS*keyword:string.  For example,  to  make  the  foreground
          color yellow and the background color blue when you run dos,
          include the following lines:

            DOS*foreground:yellow
            DOS*background:blue

         To change the key sequence for the menu, you could include  a
         line like one of these:

           DOS*sequence:ctrl-alt-d
           DOS*sequence:ctrl-z


     ENVIRONMENT
          XMERGE
               Specifies the  display  graphics  adapter  and  enables
               independent dos windows.

          DISPLAY
               Specifies the default host and X server.

     FILES
          /etc/dosexec
               Loads MS-DOS.  Linked to /bin/dos.

          /usr/bin/dosopt
               Utility that installs MS-DOS options.

          /command.com
               MS-DOS command interpreter.




     Page 9                                          (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          /usr/lib/merge/xcrt
               Converts  MS-DOS  input  and  output  requests   to   X
               protocol.

          $HOME/dosapp.def
               Holds user default run-time values for MS-DOS  programs
               started from the UNIX prompt.

          /etc/dosapp.def
               Holds  system  default  run-time  values   for   MS-DOS
               programs started from the UNIX prompt.

          $HOME/dosenv.def
               Holds user default run-time values for  invocations  of
               the MS-DOS environment.

          /etc/dosenv.def
               Holds system default run-time values for invocations of
               the MS-DOS environment.

          /usr/dbin
               Directory containing the standard MS-DOS utilities.

          /usr/dbin/quit.com
               Program that exits MS-DOS.

          /etc/dosdev
               Holds device definitions.

     SEE ALSO
          Merge 386 or ODT-DOS documentation
          X(1)
          xrdb(1)

     LIMITATIONS
          If dos windows  are  too  big  for  your  display,  you  can
          increase  the size of the root window with the server option
          -s widthxheight to accommodate  them  (e.g.,  startx  --  -s
          800x600).

          You cannot use Hercules 132-column mode  in  an  independent
          dos window.

          You can only zoom while running a Hercules graphics  program
          if  you  have  a Hercules graphics adapter installed in your
          computer.

          You cannot run EGA or VGA graphics  programs  in  a  window.
          You must zoom.

          You cannot resize an independent dos window.




     Page 10                                         (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)



          You cannot use 40-column mode in a window.  You must zoom.

     WARNING
          dos cannot be run from any directory named aux, com1,  com2,
          con,  nul,  or  prn,  because these are MS-DOS reserved file
          names.

     AUTHORS
          Locus Computing Corporation.














































     Page 11                                         (printed 12/8/89)






     dos(1)           X Version 11 (29 November 1989)           dos(1)























































     Page 12                                         (printed 12/8/89)






Typewritten Software • bear@typewritten.org • Edmonds, WA 98026