X-Spam-Check-By: sourceware.org Message-ID: <018d01c665a8$883fc6f0$84017ece@jabelxp> From: "Jay Abel" To: "Rockefeller, Harry" , References: Subject: Re: Can't print because .lnk makes printer name invalid Date: Fri, 21 Apr 2006 15:03:08 -1000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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: \\\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" To: 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/