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: Can't print because .lnk makes printer name invalid


I'm sorry, I can't tell if the problem you have below is with connecting to the file to be printed or to the printer itself. What follows is a workaround for getting to the printer if windows or cygwin complain about the printer share name.

In my case, the printer is on the network, and I use a local instance of the printer driver (windows XP home) to despool to it. When I try to attach to the local printer, I get some message about how the printer isn't really there. In any case, the computer seems to be cross with me and won't print to a non-local printer.

The workaround is to let windows map the network printer on the local machine for you. Then use NET USE LPTx: \\server\printer to map it to a local port.

Finally, create a SECOND instance of the printer which points to the local port.

I have had trouble getting lpr to work with network printers otherwise.

In my setup, the printer is a laserjet on the network. "hplj2500" is the way the printer is named in windows. I defined a second printer "hplj2500_local" to print to lpt1:

Then I use NET USE LPT1: \\<servername>\hplj2500

When I print to hplj2500_local, windows uses the LPT1 port mapping to reroute the data to the network printer queue hplj2500, which eventually finds its way to the printer's TCP/IP port. For reasons beyond my comprehension, windows thinks this is a more acceptable state of affairs.

I would love to know how to get lpr to just print directly to the printer's IP address, but the above isn't as bad as it seems, since it keeps windows and cygwin print jobs in sequence, and visible in the queue.

I'm sure there is a better way, but the above worked for me.

Jay Abel

----- Original Message ----- From: "Rockefeller, Harry" <harryr@ssd.fsi.com>
To: <cygwin@cygwin.com>
Sent: Friday, April 21, 2006 12:43 PM
Subject: RE: Can't print because .lnk makes printer name invalid



>I've looked at the trace.  Nothing obvious comes to mind, but I did
think
of something else: on my machine, running "net use" on the shared
printer
helped enable it -- try "net use '\\NTSERVER1\sw-txt1'" and see if that
lets you print.  Though the error I was getting before "net use" is
different from yours.

$ net use '\\NTSERVER1\sw-txt1' The command completed successfully.

But lpr still gives same error.

I'm also concerned about the access violations in your strace, but
don't
have time to look further at the moment.  Perhaps someone else will
volunteer.
HTH,

-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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