The Linux Print2Win mini-HOWTO

Marcelo Pereira da Silva

This e-mail address is being protected from spambots. You need JavaScript enabled to view it


Jan 2002

Revision History
Revision 1.1 2002-07-19 Revised by: ms
Revision 1.0 2002-01-01 Revised by: ms

This howto contains the general configuration to get Linux printing to a Windows print share.

3. Client (Linux)

The client configuration is similar to Linux to Linux printing.

3.1. Standard lpr

The simplest way to do it is to add an entry to /etc/printcap. As a quick example, the entry for a generic matrix printer would be:

# EPSON LX300 

Make sure you are using the correct filter, or the right generic one.

Be sure you have created the directory /var/spool/lpd/epson, and the users you wish to use the printer have the right access to this.

For example, assume the Windows print server is named meriadoc, with an IP address of, and the printer is shared from Windows as epsonLX.

So, you have to configure /var/spool/lpd/epson/.config like this:



  • share='\\windows-print-server-name\print-share-name'

  • hostip=windows-print-server-IP

Once your /etc/printcap is configured, you have to enable the print share:

[localhost]$ lpc up epson
[localhost]$ lpc enable epson

If everything is ok, you can send jobs to the queue:

[localhost]$ lpr -Pepson file

4. /etc/printcap Tips

I have used the entry below in the first example, but this is not a particularly good idea:


Because lpr does an "exclusive" open on the file you specify as lp=. It does this in order to prevent multiple processes from trying to print to the same printer at the same time.

The side effect of this is that in your case, eng and colour can't print at the same time, (usually more or less transparent since they probably print quickly and since they queue you probably don't notice) but any other process that tries to write to /dev/null will break!

On a single user system, probably not a big problem. I have a system with over 50 printers. It would be a problem there.

The solution is to create a dummy printer for each. Eg: touch /dev/eng.

[localhost]$ touch /dev/eng
[localhost]$ touch /dev/colour


Subscribe to Comments Feed

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board