delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/21/21:03:48

X-Spam-Check-By: sourceware.org
Message-ID: <018d01c665a8$883fc6f0$84017ece@jabelxp>
From: "Jay Abel" <jabel AT flex DOT com>
To: "Rockefeller, Harry" <harryr AT ssd DOT fsi DOT com>, <cygwin AT cygwin DOT com>
References: <B774920D825C2D4880A3C1B0D6EF941805B56CF2 AT ssdmx DOT ssd DOT fsi DOT com>
Subject: Re: Can't print because .lnk makes printer name invalid
Date: Fri, 21 Apr 2006 15:03:08 -1000
MIME-Version: 1.0
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: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: \\<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 AT ssd DOT fsi DOT com>
To: <cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019