Live data from Hacker News

Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

printervention.app

71–80 of 102 posts

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#71
post #11

Earlier quoted context omitted.

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

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

Oh I thought you were referring to the VM part

Anyway Apple created CUPS so it should support anything Linux does when it comes to printing

edit: looks like they didn’t create it, they just hired the guy who did and shipped it

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#72
post #56

Earlier quoted context omitted.

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…

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.

>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.

"A million" is quite the hyperbole. So let's just not do anything anymore because it might cause a permission popup? Or because some idiot might trust a scam website? That's your argument? Sorry, it's not a good argument.

>while the webusb spec is exposing you to potentially high risks of damage to hardware or data theft.

Please explain a realistic scenario where a website >that someone trustsI'll wait.

I don't care about someone's stupid grandfather that is going to find a way to get hacked one way or another - he's not a good reason to hold the rest of us back.

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#73
post #55

Earlier quoted context omitted.

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 acces…

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.

I don't care?

I'm not giving any old website access to all of my USB devices. I'd expect to give a website I trust access to a specific USB device. I'm not sure why you think this has to be a willy-nilly free-access-to-everything feature.

Yes, I want to give access to site XYZ to a product purchased from site XYZ to do amazing things over WebUSB.

If that isn't the current spec, then change the spec so it's good.

But Apple just doesn't give a single shit to propose any changes because doing so would hurt their precious app store just a little bit.

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#74

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?

You don’t need a VM. Do what Netbird does. Compile wireguard-go to WASM and you’re g2g

https://docs.netbird.io/about-netbird/browser-client-archite...

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#75
post #69

I did this with a Raspberry Pi. The printer in question only has WiFi and USB, no ethernet (the WiFi wasn't stable, and I don't trust the TCP/IP stack anyway). So what I did was I connected it to a Raspberry Pi via USB which is connected via ethernet to the living room. I added AirPrint and brscan, and the device can be shared via usbip. For example, you can use a USB SDR and connect to it via usbip. Initially, I als…

I've been using a pi print server for a few years now. Runs my shipping label printer, an excellent HP color printer from the early 2000s, and a few other oddball printers

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#77
post #36

Earlier quoted context omitted.

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

It's a Samsung SPL device, it's supported by SpliX: https://github.com/OpenPrinting/splix

Yup, I used splix with it for years on Mac, so I think that will be the way to go.

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#78

Earlier quoted context omitted.

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.

>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.

Ah nice. If I supply my own raspi zero 2W, can I buy just a software license from you? Doing the software integration is the part I'm least looking forward to. :(

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#79

Earlier quoted context omitted.

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

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.

It's not that wasteful if you don't need this stuff most of the time. I have an old HP laser printer from 2008 or so. Nearly 20 years old at this point. Works fine but HP does not provide new drivers and the current x86 ones for my mac will stop working when Apple stops supporting x86 emulation. HP could fix this but they probably don't want to. There likely is a decent Linux driver for this thing. A solution like in the article, or qemu or docker with some way to access this thing over USB could probably get the job done.

I rarely print anything in any case; which is why replacing this thing is not a really a priority for me. I print something maybe once or twice per year at best at this point. It works and does the job. I can get replacement toner cartridges on Amazon. There are decent non branded ones that are really affordable. I've only ever bought two, I think. I just don't print a lot. If somebody provides something that works indefinitely, I might still be using this thing in another 20 years.

Re: Rescuing old printers with an in-browser Linux VM bridged to WebUSB over USB/IP

#80
If you value reliability and have other things to do besides maintaining a Linux machine, I recommend https://www.decisivetactics.com/products/printopia/ for Mac OS (works on Tahoe). I scrapped my Linux box, got a Mac mini for a home server, and use printopia (not the pro version, just the buy it once individual version) for using my 2 10-20 year old printers on my lan. Can even air print to them.

I used to do this with Linux and it was a huge pain in the ass. Lowest common denominator and buggy driver support (duplex printing silently fails, old hp all in one works until the next Ubuntu major upgrade which introduces the odd impossible to debug cups problem or two).

For a Mac OS server based scanning solution, I attach my client Mac to my Mac mini server using https://www.virtualhere.com/.

Post reply on HN