Mail Archives: cygwin/2005/03/10/11:39:18
On Mar 8 11:17, Frank Jacobs wrote:
> If I attempt to run lpr under cygwin 1.5.13-1, I get the following
> error:
>
> lpr: printer error: can't open '' for writing: The printer name is
> invalid.
>
>
> However, if I downgrade to cygwin 1.5.12-1, lpr works fine.
>
> Note that the issue does not appear to be due to the cygutils version
> (the package that lpr is in). I've tried both version 1.2.6-1 and
> 1.2.5-1 of cygutils with cygwin 1.5.13-1 and I still get the same
> error message.
With both cygwin 1.5.13.1 and the cygwin1-20050308.dll.bz2
snapshot I also get the same error message. It works OK
using 1.5.12-1.
I believe the problem may be in cygutils-1.2.6/src/lpr/lpr.cc
at the call
cygwin_conv_to_win32_path(printerName.c_str(), winPrinter);
If I have a network printer in the environment variable
export PRINTER="//pecsele/prt106"
or explicitly on the command line
lpr -d //pecsele/prt106
I have the problem in 1.5.13-1 and the snapshot.
Using the debug switch on lpr gives a list of printer names.
$ export PRINTER="//pecsele/prt106"
$ echo | lpr -D
Windows printer name = ''
isWindows9x = 0, isWindows2K_NT4 = 1
Printer name: 'HP LaserJet 4000 Series PS', Port name: 'prt106'
Printer name: 'Generic / Text Only', Port name: 'FILE:'
Printer name: 'Apple LaserWriter 16/600 PS', Port name: 'FILE:'
Printer name: 'Acrobat Distiller', Port name: 'C:\Documents and
Settings\All Users\Desktop\*.pdf'
Printer name: '\\Xerox\XEROX470', Port name: '\\Xerox\XEROX470'
Printer name: '\\b2600\sw4050n', Port name: '\\b2600\sw4050n'
Printer name: '\\b2600\sw2100', Port name: '\\b2600\sw2100'
lpr: printer error: can't open '' for writing: The printer name is
invalid.
If I use one of the listed names, e.g.,
export PRINTER="HP LaserJet 4000 Series PS"
then lpr works with 1.5.13-1 and the 20050308 snapshot.
Could this be due to a change in 1.5.13-1's handling of "//"?
Roger L. Gates
--
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 -