Live data from Hacker News

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

printervention.app

51–60 of 102 posts

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

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

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

#54

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?

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.

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

#55
post #28
post #16

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.

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!

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.

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

#56
post #28

Earlier quoted context omitted.

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!

Which is why Firefox doesn't support it either.

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.

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

#57
post #16

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.

Mozilla doesn’t want it either.

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

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

#58
post #8

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)

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

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

#59
post #36

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.

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

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

#60
post #8

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)

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.

Post reply on HN