Use Real LPT port with Cygwin?
Hans-Bernhard Bröker
HBBroeker@t-online.de
Mon Jun 19 20:09:06 GMT 2023
Am 18.06.2023 um 21:35 schrieb tlake--- via Cygwin:
> I can use an emulated LPT port to a shared network printer from Cygwin but
> I'd like to print to a local LPT port also.
> The local printer has no IP address. Is it possible to print to a physical
> LPT port?>
>
> If I do this:
> ls > LPT1:
> a file called LPT1: is created on the hard drive rather than sending the
> data to the printer on LPT1:
The fact that works at all is a remarkably ancient quirk that made it
into MS-DOS by way of it trying to emulate even older quirks from CP/M.
We're talking 1970s computing, there. Because the dogma of backwards
compatibility is so strong in Seattle, this quirk is still available in
Windows to this very day.
But as it's a massive DOS-ism that really does not fit into he POSIX
world at all, it's not entirely surprising that it doesn't reproduce in
a Cygwin shall, just like that --- Linux doesn't do that, either.
What you do get instead is a Unix-style /dev tree of device
pseudo-files. I might be cool if that gave you a /dev/lpt1 on Cygwin,
but alas, I don't think it does.
What you do get is a /proc/sys/DosDevices/Global tree. A printer, if
existing as a Windows device "LPT1", should show up there as a character
device.
More information about the Cygwin
mailing list