Bye CUPS: Printing with Netcat
121–130 of 183 posts
Re: Bye CUPS: Printing with Netcat
#122The point of CUPS and of server middleware in general like PulseAudio and what not is when multiple clients all want to send output streams to the same sink. Just sending the stream directly to a device with no middleman works fine provided 1) the stream is encoded in a way the device understands, and 2) no one else is trying to use it at the same time. For a shared network resource like a printer, unless you live al…
Printers are fine with accepting jobs from multiple clients and have been for a long time. After all this is pretty much standard practice for any small office without a server.
Re: Bye CUPS: Printing with Netcat
#123Have fun printing a shipping label from your phone using Netcat.
Because Apple "owns" both CUPS and iPhones, you can print from an iPhone directly to a printer shared on a Linux machine if they are on the same network. My wife (not technical) figured this out one day and I didn't believe her at first that this would all "just work".
I've printed from my phone to my pi CUPS server. Even Windows 10 understands IPP.
Re: Bye CUPS: Printing with Netcat
#124FWIW, the Internet Printing Protocol (and IPP Everywhere in particular) make printer setup in CUPS far, far easier, but distributors seem reluctant to encourage it. I wrote about my experiences with IPP back in June ( https://lwn.net/Articles/857502/ ). I expect to never have to hassle with printer drivers again...
I own a HP MFP and for several years HPLIP generally worked for several to many months at a time, until it didn't. Me and the wiff both run Arch on our laptops (she doesn't know or care). After a particularly rubbish time trying to get HPLIP working again after a pacman -Syu I did a literature search: Mr CUPS had deprecated everything apart from IPP Everywhere. So, I tried it out. Me and the missus send docs to print…
Printer drivers run in process as well as the port monitor (for older printers). You might find the situation improves if you use an inbox driver (one that comes with Windows) and/or the standard port monitor.
Re: Bye CUPS: Printing with Netcat
#125I used to do this at home all the time (from Linux though): networked printer with its own IP address and then good old netcat. I'd do it with PostScript files and send them to HP LaserJet 4M+: not only do these beauties speak PostScript natively, they can also be made to display the infamous "PC LOAD LETTER" message. I'd try to find these printers used then I'd upgrade them: more RAM, more fonts, adding a network ca…
I recently tried that with my Epson Ecotank, but instead of rendering the document, it just printed out the literal source code. It then held the paper halfway through the machine until I sent enough newlines. I was only half disappointed.
That is what a form feed character is for (ASCII 0x0C).
Re: Bye CUPS: Printing with Netcat
#126Kinda similar, we could use LPT1 on DOS as a file and write to it or even just do a "copy" on the command line ( remember "copy CON LPT1" ?). This was pretty much the default way to print, with applications sending ESC sequences to pretty up the page. The problems were to do with handling problems like printer jams, out of paper etc which require, in essence, a partial resend and was tricky. Print spoolers on all pla…
The only system I'm aware of that managed that was AFP on IBM mainframes. Certainly the Windows print spooler doesn't. It assumes the printer handles a paper jam and just waits until it is ready to accept more data.
Re: Bye CUPS: Printing with Netcat
#127Earlier quoted context omitted.
When I was first learning Linux many years ago a friend and I got intoxicated and catted /dev/hda into /dev/dsp. It was all basically static with sometimes very structured patterns that we would try to guess as to what filetype was producing them. He had download and forgotten about a long uncompressed audio recording of a piano performance on his drive that suddenly started breaking through the static in chunks of v…
Good skills. It has never occurred to me to do that but it is actually quite an obvious thing to do when you "know" that everything is a file. Any idea what the visual equivalent would be?
Perhaps:
head -c800 /dev/urandom > /dev/tty
Or:
mplayer -demuxer rawvideo -rawvideo w=80:h=60 /dev/urandom
Re: Bye CUPS: Printing with Netcat
#128Re: Bye CUPS: Printing with Netcat
#129I immediately tried it... Aaand this is how I made my printer spit out dozens of garbage pages with just one to two lines of gibberish on each (the PDF source code, admirably giving up the page at each occurrence of the corresponding char)...
Turns out that's the same result on Windows when using Ncat /shrug
My printer is a Brother HL-2270DW... seems to be quite a dumb one...
Re: Bye CUPS: Printing with Netcat
#130FWIW, the Internet Printing Protocol (and IPP Everywhere in particular) make printer setup in CUPS far, far easier, but distributors seem reluctant to encourage it. I wrote about my experiences with IPP back in June ( https://lwn.net/Articles/857502/ ). I expect to never have to hassle with printer drivers again...
I thought that the whole point of CUPS was to provide an IPP service.
Now printers integrate the IPP functionality.