delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/21/18:10:34

X-Spam-Check-By: sourceware.org
Date: Fri, 21 Apr 2006 18:10:11 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
cc: "Rockefeller, Harry" <harryr AT ssd DOT fsi DOT com>
Subject: RE: Can't print because .lnk makes printer name invalid
In-Reply-To: <Pine.GSO.4.63.0604211713490.8777@access1.cims.nyu.edu>
Message-ID: <Pine.GSO.4.63.0604211807020.8777@access1.cims.nyu.edu>
References: <B774920D825C2D4880A3C1B0D6EF941805B56C04 AT ssdmx DOT ssd DOT fsi DOT com> <Pine DOT GSO DOT 4 DOT 63 DOT 0604211713490 DOT 8777 AT access1 DOT cims DOT nyu DOT edu>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Fri, 21 Apr 2006, Igor Peshansky wrote:

> On Fri, 21 Apr 2006, Rockefeller, Harry wrote:
>
> > > -----Original Message-----
> > > From: Igor Peshansky [mailto:pechtcha AT XX DOT XXX DOT XXX]
> > > Sent: Friday, April 21, 2006 1:41 PM
> > > To: Rockefeller, Harry
> > > Cc: cygwin AT XXXXXX DOT XXX
>
> Again, <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.
>
> > > Subject: RE: Can't print because .lnk makes printer name invalid
> > >
> > > Ugh, top-posting...  Reformatted.
> > >
> > > On Fri, 21 Apr 2006, Rockefeller, Harry wrote:
> > >
> > > > > -----Original Message-----
> > > > > From: cygwin-owner AT XXXXXX DOT XXX
> > > > > [mailto:cygwin-owner AT XXXXXX DOT XXX] On Behalf Of Corinna Vinschen
> > > > > To: cygwin AT XXXXXX DOT XXX
> > >
> > > <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.
> > >
> > > > > Sent: Friday, April 21, 2006 12:17 PM
> > > > > Subject: Re: Can't print because .lnk makes printer name invalid
> > > > >
> > > > > On Apr 21 12:02, Rockefeller, Harry wrote:
> > > > > > I can open and view the security tab on the properties section
> > > > > > of the Windows share.
> > > > > >
> > > > > > I created a desktop shortcut to the printer and searched all
> > > > > > files for *servername.lnk but only the desktop link shows up.
> > > > > > I interpret this to mean that Cygwin itself is appending
> > > > > > '.lnk' to the printer share.
> > > > >
> > > > > No, the .lnk was appended by Windows.  The printer shortcut on the
> > > > > desktop is not the printer, it's just a shortcut.  To access the
> > > > > printer you need the real printer name, for instance
> > > \\server\printer.
> > > > > You can't use the shortcut for this.
> > > >
> > > > I erased much of the previous email.
> > > > Here is the context:
> > > >
> > > > $ lpq -Sntserver1 -Psw-txt1
> > > >                          Windows 2000 LPD Server
> > > >                               Printer \\192.83.227.33\sw-txt1
> > >
> > > I assume NTSERVER1 has the IP 192.83.227.33.  Also, since this is the
> > > Windows lpq, it might understand a shortcut in this context
> > > (and so will
> > > /cygdrive/c/WINDOWS/system32/lpr, for that matter).
> >
> > Thank you for the discussion.  Use of the 'which' command tells me alot.
>
> I assume the Windows lpr command works?

[You replied:

Yes.

].  FWIW, I was kind of implying that the answer to this question should
have gone to the list, and the strace output should be sent as a separate
email.

> > > > harryr AT harryr-pc ~/Desktop
> > > > $ echo $PRINTER
> > > > \\NTSERVER1\sw-txt1
> > > >
> > > > harryr AT harryr-pc ~/Desktop
> > > > $ lpr junk
> > > > lpr: printer error: can't open '\\NTSERVER1\sw-txt1.lnk'
> > > for writing:
> > > > The printer name is invalid.
> > >
> > > Well, what does "ls -l //NTSERVER1/sw-txt1" show?  How about "ls -l
> > > //NTSERVER1/sw-txt1.lnk"?
> > > 	Igor
> >
> > In each case: "No such file or directory"
>
> Could you please also send me (in a separate personal message) the output
> of "strace -O lpr.strace lpr junk"?  I'll take a look and see if I can
> spot something obvious.
> 	Igor

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.

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,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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