* [9fans] Newbie question on printing @ 2005-07-26 10:29 Robert Raschke 2005-07-26 10:57 ` Steve Simon 2005-07-26 11:03 ` Russ Cox 0 siblings, 2 replies; 14+ messages in thread From: Robert Raschke @ 2005-07-26 10:29 UTC (permalink / raw) To: 9fans Hi, since I'm going nowhere with my attempts at getting something printed on my new network printer (Samsung CLP550N) I'm pretty sure I am missing something simple (as is usually the case with P9 setup). I have tried to get an understanding of how networked printers are meant to communicate, but googling gives me no really useful links. I have read about the LPD protocol, but that appears to be for queueing and spooling on a host machine. I have found lots of references to port 9100 and JetDirect, but no actual details of what that is and how the protocol works. Apparently some network printers allow FTP to pring, but the CLP550N just gives me connection disallowed. I added the printer as cpl550n into my /lib/ndb/local, and I can access it's web interface via port 80 fine and dandy. I have tried enabling tcp515 in /rc/bin/services on my auth/cpu/fossil/venti server (called prunelle) and added a line like this to my /sys/lib/lp/devices: clp550n robbys-room prunelle clp550n - post+600dpi generic lpdspool lpd - - FIFO Using that, I get some activity in the queue and log directories, but no printing. I'm guessing this is due to me actually not having said how to get to the printer proper. So, I tried something like this: clp550n robbys-room prunelle tcp!clp550n!9100 81920 post+600dpi generic generic generic generic tcppost FIFO But now I am getting timeouts from tcpostio; so my guess is that port 9100 isn't quite right or the protocol has shifted. Does anyone have any pointers as to where I could get some information on how to communicate with network printers. Something where I could telnet and try out stuff. (I does apparently talk IPP, but there have been discouraging remarks about that protocol in the past.) Or alternatively, has anyone got a Samsung CLP working and would like to let me know their setup details? Thank you for any help, Robby ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 10:29 [9fans] Newbie question on printing Robert Raschke @ 2005-07-26 10:57 ` Steve Simon 2005-07-26 11:05 ` Russ Cox 2005-07-26 11:03 ` Russ Cox 1 sibling, 1 reply; 14+ messages in thread From: Steve Simon @ 2005-07-26 10:57 UTC (permalink / raw) To: 9fans I print to lasers which are connected via HP jet-direct boxes using: /sys/lib/lp/devices: slp_a3 SLP_A3 slp-oh-a3 A4_LPQ - post+duplex+nohead generic lpdspool lpd - - FIFO /lib/ndb/local: sys=slp-oh-a3 ip=172.19.73.14 The jet-direct boxes use the BSD printing protocol which is documented in rfc1179, I have not heard of printers using ftp but its possible. The easiest test is to try 'lp -q' (query queue) and see if you get somthing like this: larch% lp -q transmission log: : 100.00% sent 78589 bytes sent, status: waiting for end of job 78589 bytes sent, status: end of job printer queue: connecting to tcp!slp-oh-a3!printer trying from port 721...connected JetDirect lpd: no jobs queued on this port -Steve ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 10:57 ` Steve Simon @ 2005-07-26 11:05 ` Russ Cox 2005-07-26 11:33 ` Robert Raschke 0 siblings, 1 reply; 14+ messages in thread From: Russ Cox @ 2005-07-26 11:05 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 7/26/05, Steve Simon <steve@quintile.net> wrote: > I print to lasers which are connected via HP jet-direct boxes using: > > /sys/lib/lp/devices: > slp_a3 SLP_A3 slp-oh-a3 A4_LPQ - post+duplex+nohead generic lpdspool lpd - - FIFO An even better solution. Try this first. The difference between this and your original devices line is that this one uses the printer's name as the "spooler machine", i.e. the address to send the job to. Russ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 11:05 ` Russ Cox @ 2005-07-26 11:33 ` Robert Raschke 2005-07-26 12:06 ` Russ Cox 0 siblings, 1 reply; 14+ messages in thread From: Robert Raschke @ 2005-07-26 11:33 UTC (permalink / raw) To: 9fans > On 7/26/05, Steve Simon <steve@quintile.net> wrote: >> I print to lasers which are connected via HP jet-direct boxes using: >> >> /sys/lib/lp/devices: >> slp_a3 SLP_A3 slp-oh-a3 A4_LPQ - post+duplex+nohead generic lpdspool lpd - - FIFO > > An even better solution. Try this first. The difference between > this and your original devices line is that this one uses the > printer's name as the "spooler machine", i.e. the address to > send the job to. > > Russ Steve, Russ, thank you very much. I now have clp550n_ps robbys-room clp550n A4_LPQ - post+600dpi+nohead generic lpdspool lpd - - FIFO and from 'lp -D -dclp550n_ps -q' I get grep '^clp550n_ps[ ]' /sys/lib/lp/devices bind -b /sys/lib/lp/stat /bin exec lpd echo transmission log: transmission log: test -r /sys/lib/lp/log/clp550n_ps.st echo printer queue: printer queue: /386/bin/aux/lpdsend -q -dA4_LPQ clp550n connecting to tcp!clp550n!printer trying from port 721...connected PortThru lpd: No Jobs on this queue exit '' Lovely. I have two simple questions, so I can understand what is happening. The A4_LPQ, what does that do? It is in the OUT_DEV field but ain't a device, and just guessing I would assume it names the queue to use. Is that corerct? Could that be any text, or does the LPD in the printer have ideas on how to name and handle queues? Second, is it good practice to have the machine name of the printer (/lib/ndb/local entry) be different from the /sys/lib/lp/devices printer name? I know that I can add more "virtual" printers to turn on duplex and color and what not. I can't actually verify that a page got printed, as I'm doing this remotely via a drawterm. But maybe I'll have a page sitting there for me when I get home tonight. Thanks again, Robby ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 11:33 ` Robert Raschke @ 2005-07-26 12:06 ` Russ Cox 2005-07-26 15:46 ` Jack Johnson 0 siblings, 1 reply; 14+ messages in thread From: Russ Cox @ 2005-07-26 12:06 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > clp550n_ps robbys-room clp550n A4_LPQ - post+600dpi+nohead generic lpdspool lpd - - FIFO > I have two simple questions, so I can understand what is happening. > The A4_LPQ, what does that do? It is in the OUT_DEV field but ain't a > device, and just guessing I would assume it names the queue to use. > Is that correct? Yes. > Could that be any text, or does the LPD in the > printer have ideas on how to name and handle queues? In theory you should set it to "raw", but in practice it never seems to matter. http://tinyurl.com/dwul2 > Second, is it good practice to have the machine name of the printer > (/lib/ndb/local entry) be different from the /sys/lib/lp/devices > printer name? I know that I can add more "virtual" printers to turn > on duplex and color and what not. I'm with you on this one. I prefer keeping the names the same, but maybe the _ps suffix is common elsewhere. The rest of the system doesn't care. Russ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 12:06 ` Russ Cox @ 2005-07-26 15:46 ` Jack Johnson 2005-07-26 15:59 ` Russ Cox 2005-07-26 16:07 ` Ronald G. Minnich 0 siblings, 2 replies; 14+ messages in thread From: Jack Johnson @ 2005-07-26 15:46 UTC (permalink / raw) To: Russ Cox, Fans of the OS Plan 9 from Bell Labs On 7/26/05, Russ Cox <russcox@gmail.com> wrote: > Modern Unix printing is a catastrophe. Plan 9 printing is only a mess. What's your take on IPP? I've done CUPS -> Plan 9 and vice versa (the latter being easier) via LPD, but I've always found that IPP in any of its flavors seems to be less painful (though MS clearly has trouble thinking out of the box on this one). My big thing is that CUPS specifically does a decent job of tackling the two problems with any printer: - What the hell can it do - What format do I send the data Its answer is to get the PostScript Printer Description via HTTP, then (ideally) either handoff PostScript or use GhostScript to translate the PostScript into the proper page description language and then hand it off. It will do raw print queues, too, which can be handy when you have Windows clients or need to manage PCL-only printers. The big upside is that for systems that don't share a namespace, you can pretty easily share printers and printer configurations and still have client- or application-specific preferences that take advantage of printer-specific features, without the sort-and-staple queue, double-sided-color queue, etc. Server-side can be a mess (and occasionally a catastrophe), but client-side is extremely clean. > but maybe the _ps suffix is common elsewhere. If memory serves, Brother, Canon and the old HPs tend to have local LPD queues specific to the page description language, so you'll see _ps and _pcl suffixes. Usually there's a queue that's just "lp" that will auto-detect, but some people like to use the other named queues to filter jobs that aren't in the correct PDL, especially where buggy applications/jobs can cause the printer to behave poorly. -Jack ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 15:46 ` Jack Johnson @ 2005-07-26 15:59 ` Russ Cox 2005-07-26 16:07 ` Ronald G. Minnich 1 sibling, 0 replies; 14+ messages in thread From: Russ Cox @ 2005-07-26 15:59 UTC (permalink / raw) To: Jack Johnson; +Cc: Fans of the OS Plan 9 from Bell Labs On 7/26/05, Jack Johnson <knapjack@gmail.com> wrote: > On 7/26/05, Russ Cox <russcox@gmail.com> wrote: > > Modern Unix printing is a catastrophe. Plan 9 printing is only a mess. > > What's your take on IPP? I don't care which protocol is used on the network. They all seem simple enough. It's the software on the ends that is the disaster. CUPS in particular is enormous and seems to prevent me from printing more than it enables me to print. My worst experience with CUPS was on Mac OS X. I was trying to configure the printing via the GUI (I didn't even know that CUPS was underneath), and CUPS kept seg faulting. It took hours before I figured that was why the printer service kept ending up in the "off" state. I admit that being able to expose printer capabilities to clients and have painless configuration is a great goal, and for Windows+CUPS maybe it gets there, but sitting on Unix all I want to do is send postscript and see the resulting pages come out of the printer. And that is too hard far too often. Amazingly, I think the Plan 9 lp is actually getting simpler as time goes on. Slowly. Russ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 15:46 ` Jack Johnson 2005-07-26 15:59 ` Russ Cox @ 2005-07-26 16:07 ` Ronald G. Minnich 2005-07-26 16:35 ` Jim McKie 2005-07-26 16:44 ` Jack Johnson 1 sibling, 2 replies; 14+ messages in thread From: Ronald G. Minnich @ 2005-07-26 16:07 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs I still think the one thing Windows really nailed is printing. Browse for a print server. Find the printer by name. Oh, server says, you don't have a driver? Here's one from the print server. Done. You're up. None of this browsing of an out-of-date pile of files to find the printer that almost, but not quite, matches the printer. Overall, I've never used anything I like quite as much as that. Not even OSX can compare -- OSX is just about as painful as any standard Unix for adding a new printer. I'm sure that, being Windows, there are lots of flaws and holes, but overall it's less painful than anything else I've seen. ron ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 16:07 ` Ronald G. Minnich @ 2005-07-26 16:35 ` Jim McKie 2005-07-26 16:55 ` Jack Johnson 2005-07-26 18:49 ` andrey mirtchovski 2005-07-26 16:44 ` Jack Johnson 1 sibling, 2 replies; 14+ messages in thread From: Jim McKie @ 2005-07-26 16:35 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Agreed. I started trying to print things on Unix systems about 1976 and I'd still be pulling my hair out if I didn't deliberately keep it short for just this reason. Just before I left for vacation I tried to print from the latest Firefox on Linux. The results were initially lpd forking continuously, then files disappearing into a black hole. I searched and searched in the FAQs, knowledge-bases, etc. and I found plenty of people with the same problem. The answers were allways "install these few dozen of packages" and the results were always "that didn't help". I can print from every other utility I've tried on the system, why would Firefox require anything to be done? --jim ----- Original Message ----- From: "Ronald G. Minnich" <rminnich@lanl.gov> To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Sent: Tuesday, July 26, 2005 12:07 PM Subject: Re: [9fans] Newbie question on printing > I still think the one thing Windows really nailed is printing. Browse for > a print server. Find the printer by name. Oh, server says, you don't have > a driver? Here's one from the print server. Done. You're up. None of this > browsing of an out-of-date pile of files to find the printer that almost, > but not quite, matches the printer. > > Overall, I've never used anything I like quite as much as that. Not even > OSX can compare -- OSX is just about as painful as any standard Unix for > adding a new printer. > > I'm sure that, being Windows, there are lots of flaws and holes, but > overall it's less painful than anything else I've seen. > > ron > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 16:35 ` Jim McKie @ 2005-07-26 16:55 ` Jack Johnson 2005-07-26 17:28 ` Ronald G. Minnich 2005-07-26 18:49 ` andrey mirtchovski 1 sibling, 1 reply; 14+ messages in thread From: Jack Johnson @ 2005-07-26 16:55 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On 7/26/05, Jim McKie <jmk@plan9.bell-labs.com> wrote: > I can print from every other utility I've tried on the system, why > would Firefox require anything to be done? It's easy to interpret this as a rhetorical question. :) But, sometimes you'll see Firefox compiled with XPrint extensions, which I've never found to be a good thing. I think the Linux download off their Web site is compiled this way. Some of the vendors try to make their own binaries as friendly as possible. I've had good luck with Fedora and Ubuntu. But really, should anyone be subjected to this? :) Maybe it saves trees. -Jack ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 16:55 ` Jack Johnson @ 2005-07-26 17:28 ` Ronald G. Minnich 0 siblings, 0 replies; 14+ messages in thread From: Ronald G. Minnich @ 2005-07-26 17:28 UTC (permalink / raw) To: Jack Johnson, Fans of the OS Plan 9 from Bell Labs On Tue, 26 Jul 2005, Jack Johnson wrote: > But, sometimes you'll see Firefox compiled with XPrint extensions, > which I've never found to be a good thing. I think the Linux download > off their Web site is compiled this way. what does XPrint mean, then? Ex-Print? you just explained why firefox won't print for me ... ron ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 16:35 ` Jim McKie 2005-07-26 16:55 ` Jack Johnson @ 2005-07-26 18:49 ` andrey mirtchovski 1 sibling, 0 replies; 14+ messages in thread From: andrey mirtchovski @ 2005-07-26 18:49 UTC (permalink / raw) To: 9fans > I can print from every other utility I've tried on the system, why would > Firefox require anything to be done? > > --jim i have had a similar problem with acrobat reader -- it turned out it was using /usr/bin/lpr instead of /usr/local/bin/lpr. one is lpr, the other is lprng. one works, the other doesn't. trying to figure out which configuration utility belongs to which lpr is quite a bit of fun, as they're aptly named "lprsetup.sh" and "lprtool" of course all that lpr hilarity ensued only after i had figured how to prevent acroread from crashing on startup with: % acroread Warning: charset "UTF-8" not supported Segmentation Fault % i wish i had something witty to put here, but this stuff just makes me sad. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 16:07 ` Ronald G. Minnich 2005-07-26 16:35 ` Jim McKie @ 2005-07-26 16:44 ` Jack Johnson 1 sibling, 0 replies; 14+ messages in thread From: Jack Johnson @ 2005-07-26 16:44 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 2432 bytes --] On 7/26/05, Ronald G. Minnich <rminnich@lanl.gov> wrote: > Overall, I've never used anything I like quite as much as that. Not even > OSX can compare -- OSX is just about as painful as any standard Unix for > adding a new printer. The trick with OSX is to not use it as Apple intended. If you have a single CUPS-based print server (OSX or otherwise), set your ACLs and turn browsing on, it'll just happen. At home I have a Linux box with a crappy DeskJet 400, and from our iBooks I think the only thing I had to do client-side (using Terminal) was to turn browsing on. As long as the server is on, if you're in the house the printer shows up on the list. If you're at work or on the road, it doesn't. Magic. It took longer to sift the PPD on the server to force black and white as the default than it did to get reliable, convenient printing. But stay away from Apple's GUI. Even on OSX I use the local Web interface if I have to add a new printer (which isn't fun for newbies, either, but at least you know what you're going to get). Should be http://localhost:631. What I dislike about Windows printing is that the client shouldn't need a driver. Every client should be able to generate PCL or PostScript or HP-GL and have some convenient way to find out what printer features are available. I've done several Windows printing hacks rolling my own PostScript miniport drivers that just uses the Windows built-in PostScript engine and loads the correct PPD for the printer, and though setting the printer preferences isn't as intuitive as with some other drivers, it's consistent, and you can get huge stability by having just a single (Microsoft-written) print driver loaded. In fact, here's one I use often, Adobe's Acrobat Distiller PPD omitted (though freely available on their Web site). At work we use Linux print queues to generate PDFs server-side and mail them back to the users, and most PostScript printers won't let you put color ink corner to corner. So, Adobe's PPD, Microsoft's driver. One INF and one PPD file and away you go. Change the strings and the PPD for the printer of your choice. Filename changed for your protection. :) It would be relatively easy for a vendor like MS to one-up CUPS, clean up their print dialogs, keep PPDs or their equivalent on the printer share and really have a unified print driver, at least client-side. -Jack [-- Attachment #2: ADIST5-inf.txt --] [-- Type: text/plain, Size: 1468 bytes --] [Version] Signature="$Windows NT$" Provider="Me" LayoutFile=layout.inf ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318} Class=Printer ; ; The Manufacturer section lists all of the manufacturers that we will ; display in the Dialog box [Manufacturer] "Adobe" [Adobe] "Acrobat Distiller" = ADIST5.PPD, Acrobat_Distiller ; ; Installer Sections ; ; These sections control file installation, and reference all files that ; need to be copied. If the section name will be assumed to be the driver ; file, unless there is an explicit DriverFile section listed. ; [ADIST5.PPD] CopyFiles=@ADIST5.PPD,PSCRIPT DataFile=ADIST5.PPD DataSection=PSCRIPT_DATA ; Copy Sections ; ; Lists of files that are actually copied. These sections are referenced ; from the installer sections, above. Only create a section if it contains ; two or more files (if we only copy a single file, identify it in the ; installer section, using the @filename notation) ; [PSCRIPT] PSCRIPT5.DLL PS5UI.DLL PSCRIPT.HLP PSCRIPT.NTF [PSCRIPT_DATA] DriverFile=PSCRIPT5.DLL ConfigFile=PS5UI.DLL HelpFile=PSCRIPT.HLP [DestinationDirs] DefaultDestDir=66000 [SourceDisksNames] 4 = %Floppy%,,,"" [SourceDisksFiles] ADIST5.PPD = 4,,,,,,,11,3 ; ; Localizable Strings ; [Strings] Floppy="Adobe Acrobat Distiller PPD Disk" CLASSNAME="Printer" PJL_MONITOR="PJL Language Monitor,PJLMON.DLL" PS_MONITOR="PostScript Language Monitor,PSMON.DLL" ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [9fans] Newbie question on printing 2005-07-26 10:29 [9fans] Newbie question on printing Robert Raschke 2005-07-26 10:57 ` Steve Simon @ 2005-07-26 11:03 ` Russ Cox 1 sibling, 0 replies; 14+ messages in thread From: Russ Cox @ 2005-07-26 11:03 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Modern Unix printing is a catastrophe. Plan 9 printing is only a mess. Lpd is in fact for spooling and queueing on a host machine. If your printer were shared among lots of people and had some machine handling its queue, then you'd want to use the "vogon" example line in /sys/lib/lp/devices: > clp550n robbys-room prunelle clp550n - post+600dpi generic lpdspool lpd - - FIFO That would print to the spool named clp550n on the machine prunelle. If your own machine is named prunelle, then that's just going to make a nice loop that never gets to the printer. > clp550n robbys-room prunelle tcp!clp550n!9100 81920 post+600dpi generic generic generic generic tcppost FIFO > > But now I am getting timeouts from tcpostio; so my guess is that port > 9100 isn't quite right or the protocol has shifted. This is very close to correct. Port 9100 is the JetDirect port and is what you want. It's not clear to me that tcppost is doing the right thing, though. Most likely it's for a printer protocol from an earlier time. Try putting this script in /sys/lib/lp/daemon/jetdirect and see if it works better. #!/bin/rc generic '{aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ < $LPDEST/$FILE(1); echo -n `{unicode 4}} | con $OUTDEV >[2]$PRINTLOG' '{cat <{echo -d$LPDEST -pnoproc -M^$SCHEDLINE(1) -u^$SCHEDLINE(2)} $LPDEST/$FILE(1);sleep 5} | lpsend.rc $DEST_HOST' '' (This is just tcppost except that I've replaced "aux/tcpostio -b^$SPEED $OUTDEV" with "con $OUTDEV" and added a ^D to the end of the file being sent.) Failing that, you might try and see if {lp -dstdout file.ps; echo -n `{unicode 4}} | con tcp!clp550n!9100 actually does the right thing. It should. Once we get to a script that works for jetdirect I'll add it to the distribution. Russ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-07-26 18:49 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-07-26 10:29 [9fans] Newbie question on printing Robert Raschke 2005-07-26 10:57 ` Steve Simon 2005-07-26 11:05 ` Russ Cox 2005-07-26 11:33 ` Robert Raschke 2005-07-26 12:06 ` Russ Cox 2005-07-26 15:46 ` Jack Johnson 2005-07-26 15:59 ` Russ Cox 2005-07-26 16:07 ` Ronald G. Minnich 2005-07-26 16:35 ` Jim McKie 2005-07-26 16:55 ` Jack Johnson 2005-07-26 17:28 ` Ronald G. Minnich 2005-07-26 18:49 ` andrey mirtchovski 2005-07-26 16:44 ` Jack Johnson 2005-07-26 11:03 ` Russ Cox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).