Live data from Hacker News

Bye CUPS: Printing with Netcat

retrohacker.substack.com

151–160 of 183 posts

Re: Bye CUPS: Printing with Netcat

#151

Hah. I had a similar moment of enlightenment with FreeBSD when somebody explained that you can just cat a wav file into /dev/audio (or /dev/dsp? forget the exact name). And that you can produce white noise by catting /dev/random to the same destination. With no barrier to the sound card like that, I was free to experiment with programming dfferent noise algorithms and figuring out how digital audio works. I eventuall…

Is this a Linux feature or FreeBSD magic, as like the article seems to credit it?

It's Unix magic remembered in the FreeBSD Handbook.

Re: Bye CUPS: Printing with Netcat

#152
I've been using netcat for 4 years to print in my office. I'm on linux, and i convert non-text files to postscript via the firefox "Print to file" functionality (save as *.ps), and then netcat that postscript to the printers IP port 9100. This requires the -N option of netcat to work correctly.

I did not realize this was an exotic thing to do?

Edit: Now that im testing it, i see that firefox has recently dropped support for printing to postscript. Classic firefox. Can someone recommend me an alternative browser?

Re: Bye CUPS: Printing with Netcat

#153
post #56
post #55

Earlier quoted context omitted.

I remember back when ALSA was a hot new thing on Linux, and it kinda sorta solved the "only one app can play things at the same time" problem that existed with the traditional OSS. Meanwhile, OSS on FreeBSD just worked.

Rinse & repeat when every desktop environment brought their own audio daemons, then later PulseAudio and now PipeWire. I still roll my eyes and I don’t get surprised every couple of years when somebody releases a yet another Linux audio daemon. Maybe it’s some kind of Linux tradition. At least PipeWire is saner compared to PulseAudio.

My problem is that all of these are incompatible. Woe be to whomever has an OSS app, an ALSA app, a JACK app, and a PulseAudio app, all of which want to run at the same time.

I don't get why this was never fixed at the kernel level. You have onions of layers.

Re: Bye CUPS: Printing with Netcat

#154
post #132

Earlier quoted context omitted.

What about Page Layout / Color/Mono selection etc.,?

Postscript has commands for that, you can preprocess the file appropriately.

It's very much non standardized. The standard is PPD, so you'd want a parser for that at the very least, perhaps a user interface too, and before long you want something similar to CUPS.

Re: Bye CUPS: Printing with Netcat

#155
post #56

Earlier quoted context omitted.

Rinse & repeat when every desktop environment brought their own audio daemons, then later PulseAudio and now PipeWire. I still roll my eyes and I don’t get surprised every couple of years when somebody releases a yet another Linux audio daemon. Maybe it’s some kind of Linux tradition. At least PipeWire is saner compared to PulseAudio.

My problem is that all of these are incompatible. Woe be to whomever has an OSS app, an ALSA app, a JACK app, and a PulseAudio app, all of which want to run at the same time. I don't get why this was never fixed at the kernel level. You have onions of layers.

PipeWire solves this problem. It provides ALSA, JACK, and PulseAudio emulation (no one has actually used OSS on Linux in decades).

It is the audio solution for Linux.

PipeWire does video too, and when combined with a compatible Wayland compositor, serves as a replacement for remote X11.

Re: Bye CUPS: Printing with Netcat

#156
post #105

Hah. I had a similar moment of enlightenment with FreeBSD when somebody explained that you can just cat a wav file into /dev/audio (or /dev/dsp? forget the exact name). And that you can produce white noise by catting /dev/random to the same destination. With no barrier to the sound card like that, I was free to experiment with programming dfferent noise algorithms and figuring out how digital audio works. I eventuall…

You used to be able to do that on Linux when its sound system was OSS ("Open Sound System", not "Open Source Software"), the same as FreeBSD uses today (I believe Linux still has an OSS compat layer). A long time ago the project lead was employed by a company to write support for some newer sound hardware, and decided to make those changes proprietary. The Linux folks decided to do something completely different, and…

ALSA has compat modules for OSS.

Re: Bye CUPS: Printing with Netcat

#157

I've been using netcat for 4 years to print in my office. I'm on linux, and i convert non-text files to postscript via the firefox "Print to file" functionality (save as *.ps), and then netcat that postscript to the printers IP port 9100. This requires the -N option of netcat to work correctly. I did not realize this was an exotic thing to do? Edit: Now that im testing it, i see that firefox has recently dropped supp…

Just print to pdf and add pdftops (from poppler) to your pipeline.

Re: Bye CUPS: Printing with Netcat

#158
post #83
post #23

Earlier quoted context omitted.

The CUPS web front-end also has rough edges; Apple maintains CUPS these days and OS X now ships with the web interface on :631 disabled. If you still need a print server, it can be well worth the extra $100 or so to buy a business-class printer with an IPP server in it, so that CUPS runs on a chip inside the printer instead of on a separate computer. (Generally anything that supports "Airprint" will do this, and also…

> Apple maintains CUPS these days Apple never really maintained CUPS. They hired the author, Michael Sweet, and he pretty much served as the printing team. He left Apple a couple years ago, and basically stalled their printing department. He’s recently become head of the Printer Working Group, and they’re all pushing IPP Everywhere towards greater adoption. It’s a laudable effort.

After he left, all his cups commits to Apple's public CUPS repo stopped[1] and his work continued in the OpenPrinting fork of CUPS[2]. Interestingly though, it seems he resumed committing to the Apple repo in March. I'm glad CUPS on macOS isn't going to be left behind, but I'm curious what happened there.

1. https://github.com/apple/cups/graphs/contributors 2. https://github.com/OpenPrinting/cups/graphs/contributors

Re: Bye CUPS: Printing with Netcat

#159

While the article is correct, it omits most of the actual function of CUPS. Many printers are capable of accepting various types of documents directly over the network, with postscript, HP PCL, and PDF being commonly supported---and ASCII pretty much universally supported. The problem is that few printers support _all_ of these standards. Postscript, for example, is surprisingly complex to implement in practice, whic…

Is there any guide on how to make a Linux-based print server which would be autodetectable by all the major OSes? I feel like we need a dedicated print server for our office (where there are many computers running Ubuntu, Windows and MacOS) because the printer doesn't work reliably enough. I have never actually seen such a scenario in the wild - people seem to always connect to network printers directly (they also us…

You just want to make sure you have IPP and Bonjour enabled and it should Just Work. A quick google finds https://www.dailycupoftech.com/how-to-set-up-a-print-server-... which looks about right

Re: Bye CUPS: Printing with Netcat

#160
post #56
post #55

Earlier quoted context omitted.

I remember back when ALSA was a hot new thing on Linux, and it kinda sorta solved the "only one app can play things at the same time" problem that existed with the traditional OSS. Meanwhile, OSS on FreeBSD just worked.

Rinse & repeat when every desktop environment brought their own audio daemons, then later PulseAudio and now PipeWire. I still roll my eyes and I don’t get surprised every couple of years when somebody releases a yet another Linux audio daemon. Maybe it’s some kind of Linux tradition. At least PipeWire is saner compared to PulseAudio.

What I don't like is that audio systems on Linux are too complicated. For example, all that ALSA needs to do is to provide exclusive access to a device (only one program at a time) and send samples into it unmodified (no bit depth change, no resampling, no mixing, no volume adjustment etc). But open source developers cannot do such a simple thing. They added thousands of unnesessary features, hundreds config options and turned ALSA into a monster. When it should be just a dumb backend for PulseAudio.
Post reply on HN