1 |
Hi, Alan. |
2 |
|
3 |
On Sun, Jun 08, 2014 at 11:47:32PM +0200, Alan McKinnon wrote: |
4 |
> For Alan Mackenzie's benefit, a little back story: |
5 |
|
6 |
> The whole topic of printing is a mess, no single mere mortal can wrap |
7 |
> their wits around it. |
8 |
|
9 |
> Long long ago a printer was a piece of hardware you plugged into a |
10 |
> serial or parallel port, the kernel found it and you were good to go. |
11 |
> Whoopee! |
12 |
|
13 |
> Because more than one user could use the printer and this causes |
14 |
> conflicts, print servers were written: the server controlled the printer |
15 |
> hardware and you submitted your print job to the server, and that took |
16 |
> care of all the messy parts. To do it over the network was just as easy, |
17 |
> modify the print server to also listen on a network port. |
18 |
|
19 |
> This server was the classic "lp" suite of tools. |
20 |
|
21 |
> Many years ago, HP developed a fancy printing language for their laser |
22 |
> printers called PostScript[1]. |
23 |
|
24 |
Wasn't it Adobe? |
25 |
|
26 |
> Think of it as a giant image format, it doesn't describe what the |
27 |
> printed page looks like, it really is simple code that tells the |
28 |
> printer how to print the page, including graphics and such. And so the |
29 |
> era of complicated drivers was begun. |
30 |
|
31 |
> These laser printers needed gobs of memory and big cpus to deal with |
32 |
> PostScript, in the 386 era it was common to have a printer much more |
33 |
> powerful than your computer. |
34 |
|
35 |
> Enter other vendors and Windows. Just like with sound cards, vendors |
36 |
> wrote their own drivers adding "features" done in software. This makes |
37 |
> sense if you can't get PostScript to do double-sided printing or scale |
38 |
> down so two pages fit on one page, doesn't make so much sense if you |
39 |
> just want to avoid paying HP a PostScript license. |
40 |
|
41 |
> After a while, HP got around to updating PostScript (or maybe it was |
42 |
> Apple's code all long - I forget...) and called it PCL (Printer Control |
43 |
> Language), needing new drivers. |
44 |
|
45 |
> meanwhile, printers shifted over to USB away from parallel ports and |
46 |
> this needed new drivers. Plus there's two way to do it: do the USB part |
47 |
> of the printing in userspace and only use the kernel for regular USB |
48 |
> work, or put the whole thing in the kernel. Needing more drivers. last I |
49 |
> looked, there were still some serious issues with the options to have it |
50 |
> all in the kernel. |
51 |
|
52 |
This is the CONFIG_USB_PRINTER, which if I remember correctly, must be |
53 |
either on or off depending on other things you might have configured. I |
54 |
have been confused about this in the past. Incidentally, my printer has |
55 |
a parallel port which was still in use until I got my new box in 2009. |
56 |
|
57 |
> On the print server side, the devs were getting real busy. We had |
58 |
> classic lp, then came lprng, then something else I forget and finally an |
59 |
> upstart crowd wrote CUPS (Common Unix Printing System), eventually |
60 |
> bought by Apple. Ironically, there's now nothing common about it and |
61 |
> it's for iOS not Unix. Such is life. With the latest major version |
62 |
> update Apple ripped out all the bits we find so useful and still declare |
63 |
> the software is "for Unix". |
64 |
|
65 |
I wasn't aware of that. This is a variant of MS's "Embrace, extend" and |
66 |
shows the dangers inherent in allowing commercial firms like Apple (or |
67 |
Redhat?) to take control of infrastructure bits of the system. I used |
68 |
lprng until ~2 years ago, when libreoffice stopped supporting classical |
69 |
print spoolers. lprng just worked, unlike all the kerfuffle with cups. |
70 |
|
71 |
> Firms like Canon had developed big expensive network-enabled stand-alone |
72 |
> printers. You'd think this is as easy as fitting an embedded OS with a |
73 |
> print server to replace a dedicated PC with USB/parallel ports... I've |
74 |
> had to deal with junk that despite being branded PostScript would only |
75 |
> work with it's own Windows drivers. 50 Linux users of all sorts and |
76 |
> different distros could not get this bitch to work. |
77 |
|
78 |
Presumably, there'll be a PostScript validation suite which probably |
79 |
costs much more than the printer you wanted to validate. |
80 |
|
81 |
> Enter the age of network printing protocols. We have IPP running on port |
82 |
> 631, something else that is supposedly HTML with huge amounts of extra |
83 |
> printer-specific stuff, JetDirect, and many more things I've long ago |
84 |
> forgotten about. Plus Samba to share a printer the way Windows does it. |
85 |
|
86 |
Yes. Lots of complication, with no benefit for users like me. :-( |
87 |
|
88 |
> Did I mention PPDs? Printer <something> Definition files that describe |
89 |
> how to drive a printer using a standard dscription file. Awesome. Where |
90 |
> do you get these things? Oh I dunno there's foomatic, cups built-ins, |
91 |
> gutenprint, magicfilter and some magic thing from HP called hplip that I |
92 |
> once found worked for an Epson inkjet! |
93 |
|
94 |
> Andreas did a fine job above of describing a map to get around this |
95 |
> driver stuff, including all the many wonderful ways these driver ebuilds |
96 |
> have to block each other to get installed at all. |
97 |
|
98 |
Indeed. |
99 |
|
100 |
> And I haven't even touched on CUPS' "feature" that requires you to |
101 |
> delete and re-add back all your printers after any remerge. Ask Dale |
102 |
> about this, he's the resident expert and he's even figured out how to |
103 |
> get hplip to work. |
104 |
|
105 |
I don't seem to need hplip at the moment. My emerge of cups last night |
106 |
(to 1.7.1) didn't need me to reinstall my printer. |
107 |
|
108 |
> Are you still here, still listening? Ye gods, this mail is 5x longer |
109 |
> than I thought it would be. I personally have given up on printing |
110 |
> period. I either randomly hit useful looking buttons in KDE's config |
111 |
> widget hoping it will work, or at work I print to PDF, put it on a USB |
112 |
> dongle and wander over to my wife's desk saying please print this on |
113 |
> your windows machine. |
114 |
|
115 |
I don't blame you. Why must things be this complicated? |
116 |
|
117 |
> I'm not surprised you felt pain dealing with CUPS, I feel your pain - I |
118 |
> really honestly do. But sadly, I can't help you fix it, see previous |
119 |
> para :-) |
120 |
|
121 |
My main problem was with emerge. The fact that various printing packages |
122 |
were blocking eachother was only apparent in the 147k line debug output, |
123 |
not in the normal messages printed to stdout/stderr. |
124 |
|
125 |
> [1] PostScript is still alive and well today in the form of PDF, and |
126 |
> that's how PDF started out - in it basic form it is essentially |
127 |
> compressed PostScript with hyperlinks! |
128 |
|
129 |
Have a good day! |
130 |
|
131 |
> -- |
132 |
> Alan McKinnon |
133 |
> alan.mckinnon@×××××.com |
134 |
|
135 |
-- |
136 |
Alan Mackenzie (Nuremberg, Germany). |