6 ms·
Jor1k: Run Linux in the browser with multicore and network support
- ngaut 7y agoThis is so cool. Now we are able to run operating system in the browser, and we are able to run database in the browser(https://pingcap.com/blog/how-we-compiled-a-golang-database-in-the-browser-using-webassembly/ https://pingcap.com/blog/how-we-compiled-a-golang-database-i...). So what's next?
- bradknowles 7y agoI heard you like browsers, so I put a browser in your browser. ;)
- JoshTriplett 7y agohttps://www.browserling.com/ https://www.browserling.com/
- traverseda 7y agohttps://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- watersb 7y agoBoots and runs ok in Chrome on my Android 10 phone, but I guess I need an external keyboard. Android doesn't see any need text input, so no on-screen keyboard. Does anyone happen to know if there is a general workaround for this situation? I often hit this obstacle in other browser-based emulators.
- nemosaltat 7y agoI’d love to know also. I’ve been goofing with ways to get more use out of the massive display in my Model 3 (while parked obviously).
- hoistbypetard 7y agoIt works from here with an external keyboard for the text console, but the mapping of taps to mouse clicks in the X11 session is not quite right, so that part does not work.
- deleted 7y ago[deleted]
- Crestwave 7y agoOn iOS, you can type in the clipboard section. On Firefox on Android, it seems to work except for backspace. Chrome on Android doesn't seem to work at all, though. EDIT: Hacker's Keyboard has an option to have a notification to bring it up
- hoistbypetard 7y agoThe demo oh-so-briefly freaked me out. It uses the same RFC 1918 subnet I use on my VPN. So for about 10 seconds, I thought something local was leaking to javascript that probably shouldn't. This is really cool, and performance-wise feels like the (even-then-ancient) surplus PC that I bought ca. fall 1995 to install slackware on. Which is to say, shockingly not-bad when you think about the stack it's sitting on.
- s-macke 7y agoActually it was much faster some time ago. At least on Firefox. This emulator is basically a microbenchmark of the switch/case implementation of the browser. Firefox used a computed goto, which is perfect in this case. Now for some reasons it got slower. I have to take a look at the generated code to be really sure about what is happening here and what to do about it.
- hoistbypetard 7y agoThat is really interesting. I was using it in vivaldi on desktop and chrome on android, fwiw. I have to wonder what wasm might help... maybe the additional overhead on the VT and framebuffer would be so high it'd be a wash.
- s-macke 7y agoWebAssembly does not work on this low level. You cannot choose the switch/case implementation. Also it doesn't support goto. The reason is security and speed. The wasm-binary should be checked in O(n) and not in O(n^2). But I am curious about the future versions of webassembly. There is already a wasm version of the CPU emulation. I will enable it at some point as default. But there is no speedup yet.
- pietroglyph 7y agoVery impressive! You can even start an X11 session (startx), open dillo (a web browser), and open the emulator webpage within itself!
- georgyo 7y agoThis is interesting and very impressive, though if you go to a website like http://ifconfig.io http://ifconfig.io you get a different IP then your own public IP.
- indigodaddy 7y agoWouldn’t that be expected?
- BuildTheRobots 7y agoNot if it's running entirely in my browser and therefore using my network stack - in the same way "icanhazip.com" when looked at in your browser should show your own IP. edit: `curl icanhazip.com` returns 107.170.233.148 which seems to belong to digital ocean. It also matches the host relay.widgetry.org which is refered in the demo URL as as a "relayURL". I have no idea how it's working or why though - the lack of ip or ifconfig in the VM upsets me ;)
- neurostimulant 7y agoMaybe they tunnel all network requests through their server to make it work? Afaik you can't just make arbitrary tcp/udp request from a webpage to any host, so they must be tunneling the data via their own server.
- Daviey 7y agoYep! http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-support.html http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-suppor...
- 7y ago
- tomcooks 7y agoWould this be a viable way to use a TAILS-like system without requiring a physical computer to boot it?
- flatiron 7y agoI think KVM is more appropriate and performant.
- rrauenza 7y agoI su'ed to root and then ran rm -rf. It was really weird how my instincts fought me with every keystroke! I was just sure I was going to screw up someone else's server - not this transient VM in my browser. It worked, btw -- I got a perfectly unusable system!
- s-macke 7y agoActually, this is not the end. Try "echo *" to simulate a "ls" command and "cd" to change the directories. Also the busybox executable is still in memory , so you might be able to extract the binary from /proc/{pid}/mem . Busybox is a single static compiled executable which contains all the basic shell tools. Probaby you can also just paste new executables into the shell via echo and pipes.
- dsamarin 7y agoIs there any hope to save the system during a system reboot? I guess I would need to recreate the kernel binary from RAM memory.
- s-macke 7y agoIn this emulator the kernel is not stored in the filesystem. It is downloaded separately and put into memory. But usually the kernel is at a fixed location in physical memory. So you might be able to receive the kernel image from /dev/mem. But, as far as I know the init routines memory is freed after boot. So I guess crucial information is lost forever.
- Doxin 7y agoAh but couldn't you, once you've gotten your essential tools back to a working state, get the missing kernel bits from the internet before you reboot? It'd be an interesting challenge. Get a linux vm, sudo rm -rf everything, and then see if you can get the system back to more or less the original state.
- handoff 7y agoLooks really nice! Seems to work better on Firefox than on Chrome
- s-macke 7y agoThis emulator was optimized for Firefox and its JIT compiler. One or two years ago it was at least three times faster on Firefox than on Chrome. What unfortunately always happens with extreme optimization is that every small change in hardware or software can lead to massive performance problems.
- z92 7y agoNext we need someone to come up with Docker in browser and then you can run almost anything in the browser.
- m00dy 7y ago~ $ ping www.google.com ping: bad address 'www.google.com' :( I thought it was going to work out of box.
- fredley 7y agoExceptional Atwood's Law example. https://blog.codinghorror.com/the-principle-of-least-power/ https://blog.codinghorror.com/the-principle-of-least-power/