Of course Unix/Linux systems know how to print to these. SCO called them "Remote" printers, but LPD (RFC1179) is what they meant (though uncheck the "extended protocol" unless the printer is on another SCO box).
In the absence of a printer config tool, you can easily add lpd printers to /etc/printcap - there's lots of information here about that.
Even Windows can print to LPD, but you have to install "Other Network File and Print Services" from "Add/Remove Windows Components". Windows can also be an LPD server; you need "Print Services For Unix" to get that.
HP printers, Netgear print servers and others often use direct socket printing. To print, you simply send data to a specific network port: 9100 for HP, 9101 for the second printer on a HP multiport print server, 4010 for Netgear and so on. There's no protocol, headers, trailers - whatever you send, the printer gets.
With CUPS, you can do this right from the command line:
sudo lpadmin -p laserjet6L -E -v socket://10.1.36.221:4010 -m laserjet
In that case, we want to call our printer "laserjet6L" and it lives at 10.1.36.221 on port 4010 (that's a Netgear Printserver).
You can do the same thing on OS X if it fails to find your printer by itself.
If your printer does LPD, you set it up as a Remote Printer.
If it does not, see the example of using "netcat" at How do I install a HP Network Printer or Print Server?. You'll need to know its IP address and /Jeffl/portnumbers.html.
Windows has a very strange setup for this. You'd logically think that you'd choose "Network Printer", but no, you need to choose "Local" and then create a new port, choosing TCP/IP as the port type. If this is a port 9100 printer (HP), that's "Generic"; otherwise you choose the port in the advanced configuration.
You can send data straight to any port printer:
#!/usr/bin/perl
use IO::Socket;
$host=shift @ARGV;
$port=shift @ARGV;
$socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort=> $port, Proto=> 'tcp',
Type=> SOCK_STREAM) or die "Can't talk to $host at $port";
while (<>) {
print $socket $_;
}
close $socket;
On Linux/Unix/OS X, you could also use "nc" for the same purpose. "cat yourfile | netcat printer_ip_address 9100", for example.
For old SCO, see Where do I get "netcat" and how do I use it?
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Tue Sep 8 20:23:20 2009: Subject: TonyLawrence
I did a bit of updating on this today. I intend to go through all the old FAQ material and update it where appropriate. Please drop a comment if I made a mistake or missed anything.
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar