I need help for the below mentioned scenario:

  1. A dot-matrix printer is physically connected to the Linux machine (e.g. Ubuntu-10.04, it can be any Unix/Linux flavor)
  2. From this Linux machine, when I take a RDP to the Windows NT-4.0 Terminal Server, I run the DOS-based application.
  3. Now I want to print few pages from this DOS-based application to the Ubuntu's printer, while I am in an RDP session.

When I followed the Samba-printing documentation, I was able to print from GUI-based applications like Notepad, Microsoft Word and so forth; but not able to print from the Windows command prompt.

Any idea how to do this?

(The Windows machine is strictly NT-4.0 2000 Terminal Server.)

  • Since you have printing working from Windows → Linux in general, the only remaining question is how to get a Windows/DOS command-line program to talk to that networked printer. That's definitely not a Linux question. – mattdm Mar 8 '11 at 13:06
  • So is the Windows machine NT 4 or 2000? – oKtosiTe Mar 8 '11 at 16:49

I would do this in two steps:

  1. Setup Samba printing on the Linux box.
  2. On the NT box run this command:

    net use LPTx \\samba\printer

    (for x use a value ranging from 1-3 depending on what lpt3 ports your DOS app can use)

    If nothing else needs/uses LPT1 disable the LPT in the BIOS of the NT box.


Another way is to setup the Berkeley spooling package on Unix.

Windows NT has had the lpr and lpq commands since NT4.


I guess your application isn't DOS-based, but just a command-line application.

Does it print to the command line, and you like to redirect the output to the printer? Try:

programname > LPT

(or was ist LPT0?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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