65 comments

  • ValdikSS 4 minutes ago ago

    >Perhaps I could set them up a Raspberry Pi as a print server? But that would make it not so cheap. And anyway, I’m not convinced they’d go for the extra plugs and wires.

    $35 and it's yours, with tech support and CUPS/SANE development funding included, and all open source: https://printserver.ink

    Extra plugs could be eliminated with the help of "IEC320 3 pin C14 TO Male C13+2" cable: https://ae-pic-a1.aliexpress-media.com/kf/S4c8681fb1283499b8...

  • morpheuskafka 7 hours ago ago

    If you are using an LLM, wouldn't it have been a lot easier to just have the LLM find the relevant CUPS driver decompile or just capture the USB traffic, and rewrite it in Go or something native? (No need to deal with the system printing framework, the goal was just an app that accepts JPEG input.)

    • ValdikSS 31 minutes ago ago

      That's definitely possible for simpler drivers (CUPS filters) which accept CUPS-raster data for input. That's a majority of drivers for old printers.

    • gmac 6 hours ago ago

      Interesting suggestion: I guess that would have been possible. On the other hand I think this is a more general solution, and it does minimal reinventing-the-wheel.

    • dolmen 6 hours ago ago

      Or ask the agent to write a Dockerfile (to abstract the build environment) that builds CUPS and all your stuff around it directl in WASM, instead of targeting x86 and then emulating x86 with WASM.

      • jojomodding 5 hours ago ago

        Is there a Docker-to-WASM pipeline, and how does it do anything differently from emulating x86?

  • CodeWriter23 an hour ago ago

    So. Does this methodology mean someone can surreptitiously boot up a Linux VM running Wireguard in your browser and be inside your firewall via chrome.sockets API?

    • bastawhiz an hour ago ago

      No? It's still a web page. And the chrome socket API was deprecated and removed for everyone except ChromeOS users in certain cases. The closest you can get is installing a Chrome extension that exposes sockets, but if someone is able to do that, they don't need the browser for help.

      Moreover, you don't even need Linux and Wireguard. WebRTC accomplishes p2p encrypted traffic without libraries.

  • aesopturtle an hour ago ago

    One thing I appreciate here is that it treats old hardware as worth saving, not as a nuisance to route around. There’s a lot of hidden value in software that extends the life of perfectly functional devices, especially when the alternative is replacing them for reasons that are mostly ecosystem drift. This is the good kind of absurd.

  • hexmiles 3 hours ago ago

    I know that it is a heavyweight solution, but it could be useful for some situations with old driver/devices/applications. I have some old hardware that is compatible only with pre-WinNT OS, and I could do something similar to provide a simple solution for the end user.

    • Narishma 3 hours ago ago

      Would such old hardware even be able to run a modern browser needed for this?

      • hexmiles 2 hours ago ago

        Sorry, I wasn't clear. By old hardware, I meant peripherals connected to the computer via serial or USB. We are at a level of performance where running an entire VM as a driver is kind of feasible, if wasteful.

      • CodeWriter23 an hour ago ago

        You run old operating system in browser as a gateway.

  • bityard 6 hours ago ago

    Okay, this is reasonably genius. I have quite a few USB devices lying around that are either old enough or were niche enough that they don't work on modern _anything_, even Linux. One of them is a GameBoy Advance flash cartridge.

    • yjftsjthsd-h 6 hours ago ago

      Oh, there's a thought - v86 supports lots of old DOS/Windows versions too, so assuming you could get the right port through (probably easy with anything USB, maybe possible with other things?) you could probably use your choice of old drivers:)

  • Gabrys1 5 hours ago ago

    > I must apologise that I haven’t so far open-sourced any part of this that I don’t have to. Mainly that’s because I think this would be an awesomely sticky web property for a printer consumables firm to integrate with their sales site. And I’d much prefer it if they paid me to white-label it for them, rather than just forking a repo and getting it all for free.

    They might be interested if they cared at all about the ease of use of their printers

    • zamadatix 3 hours ago ago

      The hardest part would probably be convincing someone to pay to white label something for which most of the key design choices and implementation came from one unfamiliar dev prompting an £18 Claude Code subscription.

    • jeroenhd 4 hours ago ago

      These printer makers have the source code and the ability to write firmware. If they wanted to support WebUSB, they could and would.

    • kube-system 4 hours ago ago

      They are referring to aftermarket ink cartridge companies, not the printer OEM.

  • ale42 3 hours ago ago

    I'm using an ancient Canon Selphy photo printer... on Windows 11 without any issues. Using the Windows 7 64-bit driver, worked basically out-of-the-box. It's definitely not officially supported, but to date it works totally fine.

    • gmac 3 hours ago ago

      Huh, interesting. Is the driver built in to Windows, downloaded from Canon, or acquired some other way?

      TBH the web app story on Windows isn’t ideal anyway because you have to install Zadig before it will work.

  • juancn 6 hours ago ago

    Thank you, loved this and it made me "duh!".

    I have an old-ish Samsung laser printer that works perfectly and a Linux file server at home and the printer no longer supports AirPrint.

    I never thought about using the Linux box as an AirPrint server! This will free me from all the odd print requests from my kids! (probably)

    • NegativeLatency 39 minutes ago ago

      Been doing something similar with a Samsung printer and CUPS for years, it’s great

      Found this helpful for generating some of the config files: https://github.com/tjfontaine/airprint-generate

    • asteroidburger 4 hours ago ago

      It’ll work great if you can get the drivers all aligned properly. I’ve tried a few times to get my 12 year old Brother laser setup like that, and each time I end up throwing in the towel.

      Maybe I’ll try it again someday with an LLM assisting.

    • mikepurvis 5 hours ago ago

      I have a Samsung ML-1740 kicking around still that I just can't bear to part with; I've been meaning forever to RasPi-ify it, but it's one of those projects that feels like it's going to end up being a rabbit hole.

      • ValdikSS 33 minutes ago ago

        >but it's one of those projects that feels like it's going to end up being a rabbit hole.

        I know your feelings. I've started https://printserver.ink because I wanted to buy a retail print server and could not find any. I was expecting half a year overall work for everything, but fixing all printer-related bugs for 3 years already.

      • HeyMeco 3 hours ago ago

        ML-1740 is supported by the driver available here: https://www.bchemnet.com/suldr/index.html Works on my arm64 sbc as a cups printer for another samsung printer

  • PunchyHamster 3 hours ago ago

    Doesn't Apple outright uses CUPS in the first place ? Did they just removed old drivers in their version ?

    • ValdikSS 13 minutes ago ago

      You might think that such an important and long-standing feature as printing would undoubtedly be backed up by a large company. This was true until 2019, when it was backed by Apple. Currently, however, CUPS and all related projects are supported by volunteers, including myself.

      Apple abandoned CUPS years ago, and recently have archived the repo on github: https://github.com/apple/cups

      All the current development runs in OpenPrinting github: https://github.com/OpenPrinting, and mostly focused on newer projects, such as CUPS v3, PAPPL, Printer Applications.

      Recent versions of CUPS v2 are still used in Chrome OS and Chromebooks though (apart from all Linuxes).

    • nubinetwork an hour ago ago

      I'd be curious if cups works on wsl as well...

  • SoftTalker 6 hours ago ago

    I have an old Epson MX80 dot-matrix printer in the closet, have thought about getting a Raspberry Pi and setting that up so we can wirelessly print to it. But... who would really want that?

    • mrighele 6 hours ago ago

      For a printer like an Epson MX80 an esp32 should be enough to share the printer on a raw TCP interface (AppSocket I think the protocol is named) on port 9100. It is supported by Windows and CUPS.

      Very easy implementation as it essentially it just forwards the data to the printer. Since it's a raw interface you need the proper driver, but luckily Epson provides a Windows 10 driver for the Epson MX-80 (!) [1] CUPS doesn't have driver for the MX-80 but it has a number of generic Epson drivers and my guess is that one of those will work.

      The most difficult part is probably the parallel interface (unless you have a printer with a serial interface in which case it will be much easier)

      [1] https://epson.com/Support/Printers/Impact-Printers/MX-Series...

  • hahn-kev 6 hours ago ago

    This is pretty cool! Thanks for sharing.

  • monocasa 6 hours ago ago

    Isn't cups a de facto apple project? What's the VM getting you?

    • yjftsjthsd-h 6 hours ago ago

      The gutenprint drivers to support the specific printer don't support darwin

      • monocasa 5 hours ago ago

        Gutenprint supports macos as a first class citizen, including this particular printer AFAICT.

        • gmac 5 hours ago ago

          From the Gutenprint home page, https://gimp-print.sourceforge.io/:

          As of July 7, 2024 the Gutenprint project has formally deprecated MacOS support. This means that no further MacOS-compatible binaries will be produced.

          Gutenprint has not had an active MacOS maintainer for over three years, and the remaining developers lack the technical ability to produce MacOS binaries, much less undertake the substantial amount of work necessary to produce, test, and support binaries on newer (post-Mojave/10.14) MacOS releases.

          • monocasa 5 hours ago ago

            It looks like it's just because they had no way to test, and bandwidth to deal with it. But should still mostly work, once whatever issue (that sounds like app notrization) is fixed.

            It seems like the better option would have been to fix whatever was blocking them just two years ago, rather than this wild rube goldberg machine of a Linux VM emulated in a browser tab.

            • gmac 5 hours ago ago

              I mean, anyone is welcome to do just that! But I guess coding Rube Goldberg machines in JS (to push the boundaries of the web) is a thing I really kind of enjoy.

    • merb 6 hours ago ago
      • monocasa 5 hours ago ago

        Oh, OK, new information, thanks!

        But this driver is older than OpenPrinting's fork from Apple CUPS.

  • DeathArrow 5 hours ago ago

    I would have asked Claude to write a driver. But this works, too. :)

  • leptons 6 hours ago ago

    Too bad Apple is still preventing the WebUSB spec from being standardized. They won't even make suggestions to get it through committee because WebUSB might cut into their native app store.

    • davsti4 5 hours ago ago

      From: https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API "WebUSB provides a way for these non-standardized USB device services to be exposed to the web. This means that hardware manufacturers will be able to provide a way for their device to be accessed from the web, without having to provide their own API."

      That doesn't sound secure at all!

      • monocasa 4 hours ago ago

        Which is why Firefox doesn't support it either.

        • leptons 43 minutes ago ago

          Firefox's non-reasons are just as lame as Apple's non-reasons. These APIs aren't security risks, the user has to explicitly opt-in on every website that requests USB access, just like every other privacy-risky API that a website requests, like microphone and camera access. WebUSB is no different.

          The only thing that has changed since camera and microphone access was allowed is that Apple now considers web apps to cut into their app store business, so they are unwilling to let any new APIs get approved that would make a web app as capable as a native app. This includes WebBluetooth and other APIs.

          Apple is also getting sued by the DOJ for exactly this type of shady business practice.

          And I don't really think what Firefox says is relevant, they are so cash-strapped I would not doubt that Apple pays them to have a negative opinion about new web APIs just so people like you can say "Firefox doesn't want it either".

          The truth is there is no good reason to block WebUSB and WebBluetooth from becoming standards.

          • Gigachad 18 minutes ago ago

            The user gets spammed with a million permissions popups a day and has no idea what they are actually accepting or what the risks are. The same looking permissions popup usually means something incredibly trivial like notifications or camera, while the webusb spec is exposing you to potentially high risks of damage to hardware or data theft.

      • leptons an hour ago ago

        That's nonsense. You have to opt-in on any website that is requesting USB access, just like every other useful but potentially privacy-risky browser API.

        Plenty of sites ask for camera access, and that is typically a USB device. Plenty of sites ask for microphone accesss, which can be a USB device. And even if those aren't always USB devices, they are still very much a privacy risk that browsers all allow. USB access is no different, a website can't just do whatever it wants, you have to give it permission to use it first. And it doesn't have to be all-or-nothing either, it could be implemented to allow the browser to access only specific USB devices.

        Apple is holding back progress in favor of profit. They profit when developers are forced to create a native app where Apple can extract 30% of revenue through the app.

        • Gigachad 15 minutes ago ago

          It's not about if the camera is a USB device or not, it's about what the capabilities being exposed is. Web browsers aren't just handing over the webcam as an arbitrary USB device, they are presenting a media stream from them. Which means they can't for example send arbitrary commands, flash firmware, or do any of the infinite things a USB device might present.

    • cosmic_cheese 4 hours ago ago

      Mozilla doesn’t want it either.

      • leptons 41 minutes ago ago

        I don't really think what Mozilla says is relevant, they are so cash-strapped I would not doubt that Apple pays them to have a negative opinion about new web APIs just so people like you can say "Mozilla doesn't want it either".

  • randusername 5 hours ago ago

    what the heck we're not in web 1.0 anymore are we

  • simoncion 3 hours ago ago

    Oh neat. v86 is mentioned in the FOSDEM 2025 slides [0] for another wasm port of QEMU. Interesting that what appears to be v86's inability to run x86 executables didn't fuck you.

    I wonder why the decision wasn't made to use the network sharing features of SANE and CUPS, instead of requiring one to use Chrome due to the WebUSB dependency. Seems to me that you'd have a way more general solution if you could usefully deploy your VM both in any major web browser and as a standalone program.

    [0] <https://archive.fosdem.org/2025/events/attachments/fosdem-20...>

    • gmac 3 hours ago ago

      Can you elaborate on how using the network sharing features of CUPS would let you achieve the same thing (printing to old USB printers) in any major web browser?

      • simoncion 2 hours ago ago

        Given your commercial aspirations, I'm happy to consult on your project as a paid contractor.

        • gmac 2 hours ago ago

          Fair enough! I just don’t think I fully understand what you’re suggesting.

          • simoncion 21 minutes ago ago

            > I just don’t think I fully understand what you’re suggesting.

            Sure, sure.

            Like I said, given your commercial (and closed-source) aspirations, I'm happy to consult on your project as a paid contractor. Doing work for free on a closed-source for-profit project is neither interesting nor in my interest.

  • hulitu 7 hours ago ago

    Another AI add.

  • redeeman 7 hours ago ago

    surely a glorious OS like osx would not be without support for hardware that linux supports? when will it be year of osx desktop?

    • akdev1l 6 hours ago ago

      wdym?

      OSX has literally always been supported only on very limited hardware so how would it support anything else?

      • redeeman 5 hours ago ago

        did you read what this is about? support for a printer people buy in stores. the kinda thing people expect working?