Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Cygwin on a Windows 7 machine. In my .bashrc file, I have tried

export PRINTER=\\\\myPrintServer\\myPrinter

Escaping the backslashes, which, when I type $lpr -D, gives me

Windows Printer Name = '\\myPrintServer\myPrinter.lnk'
lpr: printer error: can't open '\\myPrintServer\myPrinter.lnk' for writing: The printer name is invalid.

But I didn't type the .lnk there and don't think I want it. If this is the problem, how do I get it to not append .lnk? If the problem is something else, I'm all ears.

share|improve this question
add comment

1 Answer

I'd try

net use lpt1 \\myPrintServer\myPrinter

then

export PRINTER=lpt1
lpr -D

If that didn't help I'd try

/cygdrive/c/WINNT/system32/lpr -S server -P printer filename

after enabling Unix (LPD) printing on the server.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.