From: Peter Sutter Subject: confusion with -O pipe and -I 'keystrokes' option in dosemu Date: Wed, 4 Jan 2006 08:33:13 +0800 Message-ID: <200601040833.13799.sutterp@sopac.com.au> Reply-To: sutterp@sopac.com.au Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline Sender: linux-msdos-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-msdos@vger.kernel.org Hi, I have this legacy application (Rockwell Tripfax), which is a data collector collecting data via serial port from 'blackboxes' on board heavy vehicles. I managed to get this working under dosemu on a SuSE Linux V9.2 machine. The installed DOS is MS-DOS V6.0. The application works nicely when started up interactively. The application has virtually two modes, the 'data collection' mode and a 'database maintenance' mode, which is selected via a menu. I would like to control the application via external bash scripts, i.e. users can connect via ssh to the system and the take control; after they exit the application, the script puts the application back into 'data collection mode' automatically. I explored two ways of achieving this, with the -I 'keystroke' option and via -O namedpipe. Neither of them I could get to work. Here is what I did for the -I 'keystrokes' option. The key sequence required is \tfx\pro SCDPVF Q exitemu I used the following string as keystrokes \\tfx\\pro\rSCDPVF\r\r\r\ra\^[\^[\^[Qexitemu\r This actually starts the application and navigates throught the menus correctly up to the point where a 'special character' is required, i.e. , , etc. where nothing more happens. So I presume that the escape sequences I use are incorrect, because when these get entered interactively, the application responds. In dosemu.conf, I have the following entries: $_layout = "us" $_escchar = (30) Strangely, the \r ( works for the command line, but not for the application. Where do I go wrong? and what would be the escape sequence for the key? When I try to use named pipes, nothing at all happens when keystrokes are sent via the pipe, dosemu obviously swallows these but there is no visible result. The fifo pipe I created with mkfifo -m 666 filename and then called dosemu the following way: dosemu -O filename Where do I go wrong and how do I get this working? I tried the SuSE supplied version of dosemu, dosemu-1.3.2 and dosemu-1.3.2. Many thanks in advance for any help. Peter Sutter SOPAC(WA) Pty Ltd 19 Bebich Drive Wanneroo WA 6065 Western Australia