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

share|improve this question

migrated from unix.stackexchange.com Mar 8 '11 at 15:16

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.

    
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.

share|improve this answer

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

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

share|improve this answer

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

share|improve this answer

You must log in to answer this question.

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