APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

netcat script


From: "Brian K. White" <br...@aljex.com>
Subject: Re: Printing on a DP-301P Print server SCO Unix OSR 5.0.7
Date: Sun, 14 Oct 2007 04:42:36 -0400
Message-ID: <002201c80e3e$2bf4bdc0$6b00000a@venti> 
References: <X77Qi.59349$YL5.31497@newssvr29.news.prodigy.net>
<09ednYjB9seXhYzanZ2dnUVZ_tajnZ2d@giganews.com> ----- Original Message ----- From: "Arby" <nomailple...@myaddress.com> Newsgroups: comp.unix.sco.misc Sent: Saturday, October 13, 2007 3:10 PM Subject: Re: Printing on a DP-301P Print server SCO Unix OSR 5.0.7 > > "Enrique Arredondo" <a...@sbcglobal.net> wrote in message > news:X77Qi.59349$YL5.31497@newssvr29.news.prodigy.net... >> How do a setup a printer that is on my local network with IP 192.168.2.17 >> ? The Unix server is on 192.168.2.7 on the same network. >> >> I tried "scoadmin" looking for something like "add tcp/ip printer" but no >> luck at all. So I'm thinking that I have to create a new port (i.e. >> /dev/lp192.168.2.17) so then I can assign a printer to it right ? >> >> Any help would be greatly appreciate it. >> >> Thanks >> >> Enrique >> > > I'm a newcomver to SCO, but I think that I can help: > > Enter a name for your printer in the /etc/hosts file, such as: > > 192.168.2.17 Myprinter > > Run scoadmin, then select > Printers. Choose HP Network Printer Manager. > Choose 6) Add printer to spooler. Enter the name of your printer (such as > Myprinter). You'll be asked to add a printer definition, such as > HPLaserJet. Once configured, Choose 4) Verify network printer > connectivity, then 5) Verify network printer operation. > > > Why does this fall under a heading titled "HP Network Printer Manager"? I > don't know. > > HTH. I am not a newcomer to SCO, and never use hpnp. I use this, http://www.aljex.com/bkw/sco/#rlpnc Reference material... http:///SCOFAQ/FAQ_scotec7getnetcat.html http://aplawrence.com/Bofcusm/935.html http://aplawrence.com/Bofcusm/2411.html <quote> >We use the HP stuff built in to SCO and have never had any problems >printing. Hmmmm... HPNP. No garbage left in /tmp after each print job? No spooler lockups when printing a large number (>500) of simultaneous small files? No difficulties autoswitching between Postscribble and PCL? No failure to restart if rebooted while printing? No exessive LAN traffic if printers with one model of JetDirect card ran out of printer and HPNP would poll the printer thousands of times per second? </quote> <even more importat quote> There's a lot of information here. It's all simple, it's all step by step, but you need to READ it. Don't just skim through this and start typing away without any understanding. READ. </quote> <even more importat quote> There's a lot of information here. It's all simple, it's all step by step, but you need to READ it. Don't just skim through this and start typing away without any understanding. READ. </quote> But even without doing that, there are 2 preferrable options befor using the hpnp stuff, and even then if it comes down to using hpnp, you still don't just use it as-is but should "fix" it. 1st choice) Use the above Net script. ...with either netcat or rlpr, whichever your print server supports. If it supports both then whichever it is more reliable with. Some support raw tcp (netcat) but lock up a few times a day or week, while being relatively stable at lpr/lpd. That's generally the cheaper ones. For HP and Intel at least, netcat is reliable. 2nd choice) Use the native lpd/lpr support built in in sco. Most print servers support it, and it's more trouble-free and reliable than the hpnp stuff. But it's got it's issues that make it less desireable than netcat. You can't use a printer interface script on a lpd printer, and so if you want one, you have to make a 2nd printer with the device set to /dev/null and edit it's interface script to capture all data and send it to "|lp -d <the 1st printer>" . Messy and non-bvious for future admins and about the same work as netcat (more work than my version of netcat above, since I made it so you don't have to edit any scripts, just a single, clearly defined, with examples, single line per printer in a config file. To use the native lpd/lpr support: First create a hostname in /etc/hosts for the ip of the printer (or define it in dns if you happen to have a local dns server and the sco box is configured to look at it.) Then: Scoadmin, Printers, Printer manager, System menu, Print services... Enable this: [*] Remote UNIX Print Service Enabled Printer menu, Add Remote -> UNIX Host: hostname of print server Printer: he lpd queue name on the print server UN-select this: [*] Use extended remote printing protocol 3rd choice) Use hpnp ...but fix it at least! mv /etc/getone /etc/getone.disabled google will tell you why. (google would have told you all this and more already had you consulted it, this is all faq faq faq...) 4th choice) Install cups from osr507mp5 if thats an option. This is last because it's way larger and more complex than a simple netcat script, and is a massive change to the system, so any number of problems, some large and obvious, some maddeningly subtle and hard to track down, may appear from such a change. Personally, I just use the Net script I posted at the top, which is basically just the netcat recipe right from the FAQ on Tony Lawrences site, just further enhanced (imo) such that you o Don't need to edit, or even copy, any scripts. o Don't need to set up a hostname for the printer in /etc/hosts or dns. o Don't need to enable remote print services (which btw, swaps out the normal lpr & spooler for lpd versions, which in extremely rare cases causes problems for some people, so it's a small bonus if you never need to do that). You just: == one-time initial setup: * Unpack the tar in the root dir. * Optionally install the rlpr package from the same site if you need to print via lpd/lpr as well as netat. == each printer: * Create a new Local printer (not remote) - select "Net" from the list of printer drivers - select /dev/null for the device, or type-in if not offered as a selectable option * Edit/create a single corresponding line in /etc/printers, examples in there already to go by. installing rlpr may require installing a few other updates & supporting packages first, which are only things that should be there _anyways_, but the rlpnc tar comes with netcat and is ready to print via netcat out of the box on almost any version, with no other supporing or prerequisite installs needed first. Just untar & go. The other options are good to know about for special situations where for whatever reson you can't set up netcat. Like, no internet available at the site but very slow and cranky dialup to a pc which is too busy being used by others. Even on really old boxes I practically never have to resort to options 2 or 3 or 4. There is also a 5, install "print services for unix" on any windows2k/xp/nt/vista machine and use either my Net script and rlpr, or the native sco lpd/lpr support to print to that. There is even a 6, install samba and print to windows, or some especially bad print servers that only support windows, via samba (smbclient). You make a network printer interface script practically identical to netcat or rlpr, except with a smbclient command at the end instead of a netcat or rlpr command. there is eve a ... the list goes on, like some print servers can accept jobs via ftp and email, both of which can be done from a printer interfac script same as netcat & rlpr. But by the time you get down to those sorts of options even I would probably use hpnp before doing oddball stuff like that. It's just good to know _about_ everything, so that you choose what to do correctly, not out of ignorance. Brian K. White br...@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> netcat script vs. hpnp



Increase ad revenue 50-250% with Ezoic

Kerio Samepage


Have you tried Searching this 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.

Contact us