Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

I'd try

net use lpt1 \\myPrintServer\myPrinter


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .