public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
To: cygwin@cygwin.com
Subject: Re: Use Real LPT port with Cygwin?
Date: Mon, 19 Jun 2023 22:09:06 +0200	[thread overview]
Message-ID: <7ee6a27e-22b0-8409-12be-224dc7a1fd93@t-online.de> (raw)
In-Reply-To: <!&!AAAAAAAAAAAuAAAAAAAAAEIv7Z/V4xxNu3wc77DZsnUBAMO2jhD3dRHOtM0AqgC7tuYAAAAAAA4AABAAAAChMbcbP5T3QbCwSNhB2sAqAQAAAAA=@twcny.rr.com>

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.

      reply	other threads:[~2023-06-19 20:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 19:35 tlake
2023-06-19 20:09 ` Hans-Bernhard Bröker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ee6a27e-22b0-8409-12be-224dc7a1fd93@t-online.de \
    --to=hbbroeker@t-online.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).