Remote control of Dosemu
Hello people.
I need to 'remote control' an old program. I found in the FAQ that it is possible to feed keyboard commands into an application.
The problem is that I would need feedback from the program's screen, while it is running. Is there any way to get to the screen output? As usual, this apps write immediately to the scree (bypasses the BIOS).
Any suggestions where to look?
John
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Dosemu has a "dumb" mode which uses Linux's stdin and stdout. It will probably work with scrict command line DOS programs, most probably not with TUI. This can probably be used with screen and easely with ssh and also with scripts.
I use dosemu remotely trough ssh. You just need to run dosemu in char mode and install the fonts you need in the client machine.
BUT, you did not say if your application is command line, TUI or graphic...
Alain
PS: I am redirecting this to the dosemu list
John Coppens escreveu:
Quoted 29 lines
Quoted 3 lines · On Fri, 18 Jul 2008 01:37:26 -0300 "Alain M." <[email protected]> wrote:
is it ok for you to run remotely using ssh? works for me (non graphic)
I believe that it is possible to use "screen" and access a program that is already running, I someone knows how to do it....
Hello Alain.
Thanks for your message. I've been using Linux for about 10 years now, and never read about the Screen command :-<
So, I now found a lot of information, but I can't see how to access the screen of one program from another. As far as I can see, all the commands of 'screen' are keyboard commands.
Maybe the term 'remote control' is not quite correct. I need to run a DOS program (from the same machine) but somehow access the information which is on the screen. There are two reasons:
1) I cannot send commands until some event was reported on the screen,
2) I need the result from measurements, which only appear on the DOS screen.This has to be done automatically.
John
Quoted 2 lines · On Fri, 18 Jul 2008 14:21:55 -0300 "Alain M." <[email protected]> wrote:
BUT, you did not say if your application is command line, TUI or graphic...
Hella Alain.
The program is TUI - direct video access, so, I don't know if any dumb mode would be possible. From a few disassembly intents, I suspect it was written in Turbo Pascal o C.
I have no need to do ssh. The program must be run every hour, a number of commands typed in, and a value, shown on the screen, must be captured.
I've also tried to write a TSR at some point, and with some success, and maybe I should continue on that path, as I can then probably look directly at the memory where the result appears.
But, if possible, I'd rather find a more elegant way...
Thanks,
John
Hi John,
I had this problem when running Norton Ghost, it asked a question at startup that needed the sequence <Tab><Tab><Enter> before proceeding with the command line options. The available DosEmu options didn't work, so I wrote a kernel module that simulated key presses. This was for a 2.4 kernel and a hack, I'm no kernel hacker.
In my case Ghost was running in a console on the front display. To get an idea of Ghosts progress, I found the memory at 0xA0000 showed a cross-section of the 4 colour screen. It looked like it was interlaced, though I couldn't figure out how. For my purposes it was enough to save the screen. It is possible the text version is also available in a constant memory location.
The details of the kernel module and screen grab are here, in section 5:
http://www.csc.liv.ac.uk/~greg/ghost4linux/index.html
Richard
Quoted 27 lines · John Coppens
Quoted 2 lines · On Fri, 18 Jul 2008 14:21:55 -0300 "Alain M." <[email protected]> wrote:
BUT, you did not say if your application is command line, TUI or graphic...
Hella Alain.
The program is TUI - direct video access, so, I don't know if any dumb mode would be possible. From a few disassembly intents, I suspect it was written in Turbo Pascal o C.
I have no need to do ssh. The program must be run every hour, a number of commands typed in, and a value, shown on the screen, must be captured.
I've also tried to write a TSR at some point, and with some success, and maybe I should continue on that path, as I can then probably look directly at the memory where the result appears.
But, if possible, I'd rather find a more elegant way...
Thanks,
John
--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · On Fri, 18 Jul 2008 23:24:24 +0100 Richard <[email protected]> wrote:
I had this problem when running Norton Ghost, it asked a question at startup that needed the sequence <Tab><Tab><Enter> before proceeding with the command line options. The available DosEmu options didn't work, so I wrote a kernel module that simulated key presses. This was for a 2.4 kernel and a hack, I'm no kernel hacker.
That looks quite similar to the problem I'm having.
Quoted 6 lines
In my case Ghost was running in a console on the front display. To get an idea of Ghosts progress, I found the memory at
0xA0000showed a cross-section of the 4 colour screen. It looked like it was interlaced, though I couldn't figure out how. For my purposes it was enough to save the screen. It is possible the text version is also available in a constant memory location.
I haven't really followed screen mapping with 32 bit mapping, so I have no idea where the screen would be. But as this program must run at hour-intervals, and shouldn't even interfere with the normal ops, I guess there is no other way to run it except with DOSemu on stdin/out.
I'm starting to think that it will be easier to capture the entire serial stream, and reverse engr it, protocol and all. I did some preliminary captures but it seems quite complicated.
It's really complicated because the machine is 35 km from here, so I can't really test easily.
Thanks
John
Quoted 1 line
I have no need to do ssh.
You don't need to, but have you something against it?
Ok, it is TUI, but is it to run unatended?
I have 2 programs that can help:
1) a program to insert up to 15 keys in the keyboar buffer, is this enough? There was a program that could do more, but never found it again.
2) a program that reads from the screen at any position, but it runs after another program has exited.
Could this help?
Alain
John Coppens escreveu:
Quoted 25 lines
Quoted 2 lines · On Fri, 18 Jul 2008 14:21:55 -0300 "Alain M." <[email protected]> wrote:
BUT, you did not say if your application is command line, TUI or graphic...
Hella Alain.
The program is TUI - direct video access, so, I don't know if any dumb mode would be possible. From a few disassembly intents, I suspect it was written in Turbo Pascal o C.
I have no need to do ssh. The program must be run every hour, a number of commands typed in, and a value, shown on the screen, must be captured.
I've also tried to write a TSR at some point, and with some success, and maybe I should continue on that path, as I can then probably look directly at the memory where the result appears.
But, if possible, I'd rather find a more elegant way...
Thanks,
John
Quoted 2 lines · On Fri, 18 Jul 2008 21:24:01 -0300 "Alain M." <[email protected]> wrote:
2) a program that reads from the screen at any position, but it runs after another program has exited.
I don't know about the original poster, but I could use that one here.
Signature · 1 line
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
AS this is the seccond request, I am posting to the list...
The only thing is that the version I found *checks* for a certain message. Sources are there...
Alain
Frank Cox escreveu:
Quoted 7 lines
Quoted 1 line · On Fri, 18 Jul 2008 21:24:01 -0300 "Alain M." <[email protected]> wrote:
2) a program that reads from the screen at any position, but it runs after another program has exited.
I don't know about the original poster, but I could use that one here.
2008/7/18 John Coppens <[email protected]>:
Quoted 6 lines
I need to 'remote control' an old program. I found in the FAQ that it is possible to feed keyboard commands into an application.
The problem is that I would need feedback from the program's screen, while it is running. Is there any way to get to the screen output? As usual, this apps write immediately to the scree (bypasses the BIOS).
You can try running in terminal mode ("dosemu -t") and redirecting both input and output.
The output will contain lots of escape characters but you might be able to fish out the output you need (even with direct video writes, as long as they are characters, not graphics).
Dumb mode is most convenient but does not work with direct video writes.
E.g., this gives you such a file:
echo -e "exitemu\r" | dosemu -t > log
You'll probably have to play a bit with pipes to get the whole thing working.
Bart
Quoted 8 lines · John Coppens
Hello people.
I need to 'remote control' an old program. I found in the FAQ that it is possible to feed keyboard commands into an application.
The problem is that I would need feedback from the program's screen, while it is running. Is there any way to get to the screen output? As usual, this apps write immediately to the scree (bypasses the BIOS).
Is there a way to configure the program to use the BIOS rather than direct screen writes? Some of those old programs had various modes
V.SLOW use MSDOS stdout writes
SLOW use MSDOS direct console writes
FAST use BIOS screen writes
V.FAST use direct memory writes
If it can be configured to use another mode, you might be able to do the capture easily.
Another possibility is that it might have a mode to display output to the printer. Then you can likely capture INT5 (IIRC) and intercept the BIOS interrupts to control the printer, or redirect the printer output from DOSEMU. If that's not possible, you could try simulating the keypress to force a screen capture to the printer PrintScrn key. I recall a program KEYFAKE which I may have lying around which might be able to do something like that.
Quoted 3 lines
Any suggestions where to look?
John
Mike
Signature · 5 lines
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!Quoted 7 lines · On Mon, 21 Jul 2008 13:38:51 -0500 Mike McCarty <[email protected]>…
Another possibility is that it might have a mode to display output to the printer. Then you can likely capture INT5 (IIRC) and intercept the BIOS interrupts to control the printer, or redirect the printer output from DOSEMU. If that's not possible, you could try simulating the keypress to force a screen capture to the printer PrintScrn key. I recall a program KEYFAKE which I may have lying around which might be able to do something like that.
No possibility to change, as far as I can see. A little surprised though, because the program works on Hercules and CGA screens, so there should be some kind of selection mechanism. I suspect it is automatic.
I remember 'keyfake'. In fact, I wrote a TSR program that fakes keypresses. I hadn't thought about PrtScr though. I believe there was an interrupt called when PrtScr was pressed. But, I seem to remember it prints directly, so I suspect it'll be easier to modify the TSR to make it read the screen memory directly.
Thanks for the suggestions!
John
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · John Coppens
Quoted 7 lines · On Mon, 21 Jul 2008 13:38:51 -0500 Mike McCarty <[email protected]>…
Another possibility is that it might have a mode to display output to the printer. Then you can likely capture INT5 (IIRC) and intercept the BIOS interrupts to control the printer, or redirect the printer output from DOSEMU. If that's not possible, you could try simulating the keypress to force a screen capture to the printer PrintScrn key. I recall a program KEYFAKE which I may have lying around which might be able to do something like that.
Quoted 7 lines
No possibility to change, as far as I can see. A little surprised though, because the program works on Hercules and CGA screens, so there should be some kind of selection mechanism. I suspect it is automatic.
I remember 'keyfake'. In fact, I wrote a TSR program that fakes keypresses. I hadn't thought about PrtScr though. I believe there was an interrupt called when PrtScr was pressed. But, I seem to remember
What I had in mind is that DOSEMU probably emulates "PrintScreen" by sending the output to a Linux printer. You might be able to tell DOSEMU to send it to a regular Linux file and postprocess that. There is a BIOS call to send a single character to the printer, which is INT5, I think. Anyway, trying to get just a file visible to Linux is more likely to succeed than any number of TSRs doing junk under the emulated MSDOS, having done a few old popup TSRs myself.
Mike
Signature · 5 lines
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!