On Thu, 7 Oct 1999, Bill wrote:

> Is there a way for me to specify a command to run when the dos machine
> boots up (after config.sys and autoexec.bat are processed) from the
> linux commandline?

Guess I need to repost. The FWD'ed example isn't exactly the current
issue, but it comes near;-)

In addition, if you need to execute arbitrary commands from the
commandline, the following script (callany) would serve:

  #! /bin/sh
  #
  export TERM=dumb
  exec dos </dev/null 2>/dev/null \
    -I "video{none} keystroke \"$*\rexitemu\r\""

If you have a DOS boot-menue you want to skip or any other dialog
at bootup, don't forget to put those keystroke in too such as

  ...
    -I "video{none} keystroke \"2\r$*\rexitemu\r\""
                                ^^^
for selecting menu 2. The script could be used such as

  $ callany dir '*.exe'

and will will print out to STDOUT

Hans
<[EMAIL PROTECTED]>

---------- Forwarded message ----------
Date: Fri, 24 Sep 1999 15:05:28 +0200 (MEST)
From: Hans Lermen <[EMAIL PROTECTED]>
To: "Trachier, Gary M CRL" <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: RE: DOSemu in background

On Fri, 24 Sep 1999, Trachier, Gary M CRL wrote:

> That is unfortunate news,

No reason to give up with this issue ;-)

There are some limited ways to run DOSEMU in the background.
However, STDIN can't be feed in via a pipe, you need the 'keystroke'
feature to 'type-in' some few commands (rest has to be DOSish).
Look at ./doc/README.txt chapter "Running a DOS-application directly from
Unix shell" and especially "Running DOSEMU within a cron job".

The below script would run DOSEMU, start an application 'myapp' and then
exit. The (DOSish) output goes into the file '/tmp/outfile' :

  #! /bin/bash
  export TERM=dumb
  exec dos </dev/null 2>/dev/null >/tmp/outfile \
    -I 'video{none} keystroke "myapp\rexitemu\r"'

... and this script very well should run in the background ;-)

Hans
<[EMAIL PROTECTED]>



Reply via email to