Problem solve Get help with specific problems with your technologies, process and projects.

Printing from lprng to Windows

Unix-Linux expert Ken Milberg follows up his tip on printing from Unix-to-Linux with lprng by explaining how to print to Windows.

I never thought it was a big deal to set up a printer on Linux, and using old-fashioned tools. I am still partial to lprng, until some recent changes which made things only slightly more complicated. edit /etc/printcap and provide a line that looks like lp=/dev/lp0:sd=/var/spool/lpd, and some printers also need the option sh (suppress header or banner page) and some need an entry for mx (maximum job size) to be set to 0 (no limit).

If one has a networked printer, as we do where I work, then it needs to be specified what the IP number of the...

printer is. I set up the printer with lp:rm=neprinter:/dev/netprinter:sd=/var/spool/netp rinter:sh:mx#0 and then created an entry in /etc/hosts giving the IP number, and created the spool file which is named here.

The only complication is that nowadays there is a file /etc/lpd.conf, and the default setting there is the printer that is hooked up to your computer, not on the network. The printcap entry is overridden unless the setting in lpd.conf is changed to allow a remote printer.

I also have used my home computer, with printer attached, as the printer host for other machines running Linux and/or Mac OS10. If I could cause the Windows computer in the house also to be able to use my machine as a print server, I would be very happy. Can you set up Windows to print to lpr-lpd instead?

Yes you can, if you are using Windows XP, 2000 or 2003. I'm sure you can do this with Vista, thought I've never tried it. These systems support an optional LPD print server. I wrote a Solaris tip that shows you how.

Good luck!

Dig Deeper on Linux servers

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.