R. G. Newbury wrote:
Well that's part of the idea. I have a DOS program (accounting)
which can only
write out to LPT1, LPT2 or to a file. The latter is a pain. I used
to use
redirection to divert the output which the program thought it was
sending to
LPT2, to a networked printer. I'm looking for something to do the same thing under Fedora 5.
Three things:
How are you running this DOS program under Linux? Have you re-compiled,
or are you using something like dosemu, qemu, or wine? As if it's the latter, you may be able to set LPT1 in the configuration file.
I have been running it under dosbox. The accounting program (which I have been using since 1987) is a pure DOS program. Unfortunately, dosbox does not know anything about printer ports. Wine does not do DOS programs... I have been completely unable to get dosemu to install and run...the 'freedos' hd image install never works.
Or you may just find that adding a networked printer and calling it
LPT2 works fine.
And where *exactly* would I call it 'LPT2' (or lpt2'. There seems to be no correlation between the printer name and the port which it uses...Of course there is a correlation by none of the config tools make that visible and I am unable to find any config which sets that out. Both OS/2 and Winblows make that correlation quite visible....I know it must exist, the question is where is the damn thing!
Thirdly, Unix filenames can be "fifo"s or "named pipes". In your case,
you could set up a program to read anything that came from the fifo, print to the filename, and the data would be set to the waiting program. I haven't tested this fully, but something like rm /tmp/fifo # make sure there's nothing already there mkfifo /tmp/fifo lp -d printername </tmp/fifo & # & keeps the lp command running ~/dos/program.exe should allow you to "print" a file to /tmp/fifo and have them come out where you want.
This has possibilities. I will try it with a fifo called 'lpt2....
One other, fairly obvious thing: please remember to change the subject line back if you're going to respond to a digest? Otherwise your message gets "lost".
Yeah, noticed that myself....
Geoff