This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Printing under Cygwin on W2K

> From: Igor Pechtchanski
> Sent: Thursday, June 03, 2004 7:39 PM

> On Thu, 3 Jun 2004, Chris Carlson wrote:
> > According to the documentation, the following should print on the
> > default printer:
> >
> >         bash$  cat myfile.txt > PRN
> >
> > What I find is that a new file is created named "PRN".
> Known problem.  There's a patch pending for this -- once it's checked in,
> this functionality should be available again.  Until then, use lpr from
> the cygutils package...
> > Also according to the documentation, cygwin understands the double-slash
> > form used in Windows.  Thus the following should work:
> >
> >         bash$  cat myfile.txt > //Dc1irv/laser1
> >
> > This returns:
> >
> >         bash: //Dc1irv/laser1: No such host or network path

According to:
$ lpr --help

this should work.
Do you have this printer visible when you use Explorer \\Dc1irv ?

> Nope, that shouldn't work.  I don't think you can redirect output to a
> printer name even from the Windows console, much less from Cygwin.  In
> any case, Cygwin doesn't treat printer shares as devices.

 Ehrm? =) I've proven this to be wrong... below.

> > So, what is the proper method for printing under cygwin?
> Either "lpr" or, if you want to get fancier, "a2ps" or "enscript".
> 	Igor

 The last two assumes you have a PS printer - I believe...

Below: $p is a plain old 'HP Laser Jet 6' shared on 'f1'

$ p="//f1/f1_lj6"; \
  u2d ~/.bash_logout; \
  cat ~/.bash_logout >$p; \
  d2u ~/.bash_logout; \
  echo -en >$p "\r\n\f"

# The printer produces a paper w the text in courier.

# yet another way...
$ lpr -d //f1/f1_lj6 <~/.bash_logout
$ echo -en >//f1/f1_lj6  "\r\n\f"

NOTE: The last "echo" is _necessary_ in both cases.

> > BTW: uname -a returns:
> >
> > CYGWIN_NT-5.0 jackal 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown
> > unknown Cygwin

$ uname -a
CYGWIN_NT-5.0 P450 1.5.10s(0.115/4/2) 20040519 13:51:37 i686 unknown unknown

Hmm... I have a few days earlier version of the dll (a snapshot).

If the above doesn't help;
check - unpack one of the cygwin1-* things w
bunzip, and move it in place while _no cygwin tasks_ are running.

Hmm... proofreading? Nah, that's for cowards! ;-)

/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E             --76-->

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]