Hacker News new | past | comments | ask | show | jobs | submit login
Linux on the Web: Getting a handle on the files in the browser (linuxontheweb.github.io)
68 points by linuxontheweb on Oct 14, 2023 | hide | past | favorite | 45 comments



I see that this is a labor of love, but I read through the whole page and couldn’t understand exactly what it does.

Perhaps a screen recording showing how it works and how to install it?


It's a purely web-based desktop environment sitting at https://linuxontheweb.github.io/. That was the first link on the page. I've already tested it on Chrome, Edge and Firefox. I don't have access to Safari, so you can possibly let me know if there are any issues with it.


  > error { target: IDBOpenDBRequest, isTrusted: true, srcElement: IDBOpenDBRequest, eventPhase: 0, bubbles: true, cancelable: true, returnValue: true, defaultPrevented: false, composed: false, timeStamp: 387, … }
  >  <empty string> util.js:640:15
  > 
  > Uncaught (in promise) ReferenceError: Y is not defined
  >    init https://linuxontheweb.github.io/sys/fs.js:199


Hopefully fixed now!


On mobile (Android/Brave), all I see is Tux stop the Earth, and it's zoom-able.

Is this the intended experience?


But, don't you have to run an OS to access the web?


From Wikipedia,

> An operating system (OS) is system software that manages computer hardware and software resources, and provides common services for computer programs.

The web browser certainly provides a broad base of hardware and software resources that could be managed to create common services for other apps to run atop.

Don't get too tripped up with limited modes of thinking, with applying only your model of what you know. An OS is an abstract idea: it doesn't have to be limited to a thing running on bare metal. And indeed, given the prevalence of data centers & hyperscalers, I'd wager a very sizable portion of OSes running today are virtualized, are guest OSes running on other host OS.


So I guess I'll start. AMA. It's been my baby for over a decade of my life.


The name really irks me. I read the explanation, but really what you are talking about has nothing to do with linux, and while it might philosophically share goals with unix it really sounds like you are more talking about small tools (although, I don't know where to find or write those tools in your thing) and using filesystem api:s. If I understand correctly this really has nothing to do with linux (besides some unix philosophy)?

Considering that there are things like jslinux (https://bellard.org/jslinux/) and other projects that actually run linux in a browser I think the name is bad.

I'd also say that I tried the demo and I'm not sure what I'm supposed to do with it. I know that the github readme said that it is not "about" the DE, but I don't really know what it's about besides that?

What does it actually do?


Rather than trying to answer the same basic question in slightly different terms, let me try a completely different tactic... perhaps the entire question of "actually doing things" needs to be addressed in a grand, cultural kind of way. When, for example, people are driving around in their cars and going to convenience stores, they are "actually doing things". Those kinds of things aren't very sustainable, though.

It should be pretty apparent that ours is a finite world, and there is going to need to be a hell of a lot of soul searching in order to figure out how to make this modern human experiment of ours actually work. So, it might help to think about looking at the web as the nervous system of the world. As long as there is nothing but blinding commercialism (bordering on sheer propaganda) traversing this nervous system, then it is hard to envision how our modern age can "end up" very well.

But if there can be a way to start injecting doses of sanity into the world's nervous system, then perhaps the younger generations will start being able to breathe easier when it comes to their long term prospects. In my opinion, there is a good possibility that getting people to start using the web under much more thoughtful and rational terms can only help matters.

Hacker News has itself been an interesting social experiment from a very successful capitalist enterprise. Perhaps it can start stimulating "real world" social experiments involving projects like Linux on the Web (or whatever the best name for it happens to be) so that we can all start turning the corner in terms of finding ways of life that can balance the needs of private things (like businesses) and public things (like human communities).


But none of this is Linux: JSLinux runs an x86 emulator build using emscripten (https://bellard.org/jslinux/tech.html), with enough hardware emulated (including a 9P filesystem and a VirtIO block device) to make the whole thing possible. I've not tested this, but I wouldn't be surprised if you could get docker containers or even kubernetes running on it (given all the syscalls should be there).


You didn't answer the question: "What does it actually do?"

I get that you have a vision, but when I run the code you wrote it does something. That something is hopefully something you designed it to do. What is that something?


I absolutely do not mean to be rude when I say "The description of what this is, is complete word salad."

Having tried the thing, it seems best summarized - currently - as "This thing is a GUI, written in javascript, allowing a user to view and manipulate the contents of a browser's origin private file system (OPFS)."

Did I get it right?

Also, what, exactly, would be its use case(s)?

You seem to be of a similar generation to me (Gen X)? So like yourself I grew up through those halcyon days of ZX81s, VIC-20's, Amigas and so on, as well as various flavours of Unixen, and finally Linux these days. I just don't grok the relationship between the aforementioned word salad introduction, and whatever the usefulness of this Thing could be.


How's this for a word peanut: It's like Linux... only on the web.

Perhaps the most important aspect of Linux is its ability to provide an interface between the low-level files sitting on a hard drive and the (C system call) application layer.

The main point of this project is currently the ability to provide a dependable interface between the low-level files sitting in the browser-managed sandbox and the (JS call) application layer.

Once people start getting comfortable with the idea that the files in their web browsers are as dependable as the files in their native systems, then we can start having more serious discussions about the exact use cases that might follow.

It'll have to involve an evolutionary process just like GNU/Linux itself experienced in the 1990's.


People read a lot of different things into the word Linux, so saying something is like Linux without qualifying in what sense is probably going to be confusing to a lot of people.

Like I've been using Linux for 20 years, you bet "like Linux" conjures up different ideas in my head than in for example my girlfriend's, she has mostly interacted with modern Linux DEs, never configured XFree86 in vim on a 15" CRT and has no fond memories of sysvinit.

Communication is tricky that way.


I have issues with seeing this as word salad, simply because in most instances that term is used to describe utterances that are entirely nonsensically, linguistic content so utterly absteuse that one has no hope of deriving any sort of meaning from it other rnsn, well, it's just a bunch of words tossed together. having read the description of the project, as well as several comments here on HN, I personally don't understand how someone might read that and somehow take away nothing from it in understanding. I feel like it is written fairly clearly and effectively, but ofc that's just me and as with all things, YMMV.


Can you give us a summary?

I’m struggling to see how a way to treat the browser cache as a file system is supposed to inject sanity into human communication.


This seems like a cool concept, but it doesn't seem concrete to me. What exactly does it do? What kind of real-world things does this enable?What can we do with this that we couldn't before?


If by "real-world" you are specifically talking about the commercial space, I wouldn't hold my breath. I can only imagine there first being a DIY/hobbyist scene attached to it, and then possibly an academic/research scene.

I think it could trivially enable all the micro-applications that people are constantly dreaming up... the kinds of things that are hidden away in all the various shell or python scripts across creation, as well as the little web apps all over github that just can't get any traction.

I think this could be a project to sort of unite all of those things under a common umbrella.


I don't think the parent meant commercial use-cases, more like what can you actually do? Or what is a concrete use-case that you are testing it for? Or what is one goal for it to do in the future?


A well-documented online platform for enabling machine learning research is one use case that should have obvious interest. I think Tensorflow.js should work pretty well at this point, and I've heard of new-fangled APIs such as WebGPU that could start being put to good use.

One thing that's fascinated me for a while has been the concept of rolling your own hardware that can plug directly into the web. (I know Chrome has had WebUSB and WebBluetooth enabled for some years now.)


I don't see how any of these use-cases gain any clear benefit over using them through a system like this over just doing it normally. Honestly, I cannot imagine using a niche system like this for researching much of anything will do anything other than just cause needless friction.

And "plug directly into the web" how exactly? Elaborate. Do you mean using them locally, externally, magically? Something else?

The project seems decently interesting, but like a lot of other people, I'm seeing a lot of text but not really clear answers to very valid questions.


Like what micro applications? Examples you have in mind?


Hmm... maybe dumb little things like automatically downloading the youtube videos from a certain channel so you can just have them right in your browser to watch whenever and however you want.



That directory you linked to belongs to a previous version of the project.

As long as your files have a .gb (gameboy) or a .nes extension, you should be able to start playing them by double clicking them. You just need to drag n' drop whatever rom files you have onto the desktop. For controls, you should be able to use a USB gamepad, or the keys: w, a, s, d, ., /, space and enter.


I like the idea and the use of the new Browser FS. I agree with everyone about the importance of it being 'Linux' because Linux implies you can install stuff for Linux on it.


This is nonsense, it has nothing whatsoever to do with Linux, and appears to be completely useless.


Interesting idea, but is it really "on the web" when it's just files stores in the user's local browser?


That's an interesting philosophical point. There are definite future use cases for working with distributed or network-based file systems.

But the issue I needed to solve first has always been the one dealing with the purely local aspects of the system. People need to be convinced that this local system is as rock solid as all of the local native systems they're always working with.


The issue is that's not under your control: browsers can and will delete the data. https://gist.github.com/pesterhazy/4de96193af89a6dd5ce682ce2... covers the issues related to indexeddb, and I wouldn't be surprised that similar limitations exist OPFS. Practically, either you have internet, and so storing data elsewhere is more robust (and treating any browser-based storage as a cache), or you don't, and running a "native" app is simpler than trying to run a PWA in the offline browser (and storing the data on the local file system means users can actually access the files outside your system, vs whatever opaque setup the browsers have).

That's not to say your system isn't interesting, it's that it's likely going to hit many of the same issues as previous approaches in this area (e.g. https://offlinefirst.org), and so you need to work out how to solve those issues.


Does this support iOS WebKit? All I see is Tux sitting on a globe.


Try viewing in desktop mode. There's a UI menu launcher in the bottom left.


The desktop icon grid is done well. I like the animation when you move multiple icons. Also the autocomplete on the Terminal is a nice touch. Good job! I look forward to seeing future additions to it.


How is this different from other web desktop environments like https://www.windows93.net ?


Hmm, https://shell.segfault.net is something that is kinda doing this i guess.


The link you provided is completely different - it's free disposable real Linux servers (more specifically it's probably just containers) that you can easily ssh into, or even connect from the browser.


This is awful. We need to back out of the browser, not dig ourselves deeper and deeper into that engineering mistake.


You should make the text reflow on mobile.


Sorry, I'm kind of old. I never got the hang of dealing with mobile things!

(I assume this is in reference to the hand-coded html document entitled "What is Linux on the Web?" rather than the desktop environment itself.)


I feel you, and I still roll hand crafted HTML and css for all my projects.

This doc helped me, basically my one stop shop for making text reflow and telling mobile browsers that they shouldn’t try to “fix it” for me: https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layou...

But for what it’s worth, looks fine to me as is on iOS safari.


How do you get anything more than Tux sitting on a globe in iOS Safari?


Oh, you’re right, I was referring to the docs pages. Clicking through, all I see is Tux on a globe.


Are you planning to add a browser inside?


I think a better concept along those lines might be to work on a websocket bridge (e.g. via Node.js) to the "outside world" in order to offer the various kinds of services that can be difficult in a web browser context due to CORS policies.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: