Running Atom in the browser?


#1

I had thought that it might be possible to run Atom in the browser using Browserify (or, at least, a process similar to Browserify’s). However, the fact that Atom uses Oniguruma for syntax highlighting leads me to believe that making Atom run in-browser would be a pretty crazy amount of work.

Am I right? Is Atom really firmly rooted as a desktop app?


Port Atom.io to an in browser solution?
Atom in browser
Crazy idea
#2

I was wondering the same thing.

Can anyone answer if it’s possible to run the Atom code in the browser via Browserify? If not “as is” could it be hacked? I’m wondering because I’m starting a project which needs a JSON editor, and I would like it to be based on React.js (since I’m using React for other parts of the app).


Atom in a Browser?
#3

Most of the problem is porting the node file system and net stuff. I’ve thought about having the fs calls go over a websocket and then to a project folder on the server, which could be the local desktop. I don’t think the net calls are necessary for most Atom usage.

In any case I would take browserify and start adding fs calls one by one.


#4

hello Mark, could you please provide more details on the limitations ?


#5

Node requires access to the file system. That access is used heavily in the core code and many packages. Browsers can’t allow that access for security reasons.

There has been talk of supporting node in a browser plugin. This is a fake solution because then you are really running native code just as Atom does now. It would not give the main advantage of browsers which is to run a web app anywhere anytime.


#6

Hello I’m looking to use atom in a classic client server scheme. When atom runs on the server and edit the server files. On the client side I want to run atom GUI in browser. So the security limitation is not an issue. How do I do that?


#7

Atom isn’t designed to work in the way you’re describing. It would take a complete rearchitecture to do so.


#8

As stated earlier in the thread, you can’t run atom in the browser but you can run it on the server and remote into it from a browser. There are a number of complicated solutions to run xwindows on a server without a monitor, but I think X2Go can do what you want. I’ve never used it.

Of course it is a lot simpler to run Atom as a local app and access the files on the server, which is what many people, including myself, do.


#9

I use Transmit to mount a “Transmit Disk” which acts like a mounted disk, but any changes made on it are instantly reflected on a remote FTP server.


#10

I was thinking about similar thing and also realized that file system might be a problem here, but then I came with other idea.

What about running Atom on some computer (server?) and access it remotely from another one via browser. This “server” would transmit “GUI” of Atom to you over the network but file system would be the one from server’s disk.

I think that it would be easier solution to create but at the same time give you almost same possibilities as running it in browser of “client” PC.


#11

Obviously a simpler version with an intelligent tab and a non-frame atom client overwrite web area will be very much easier to hack.


#12

I just came across this (by pure chance)

happy new year! :slight_smile:


#13

Couldn’t you run the “front end” of atom in the browser and then change the file system to say, access your google drive?


#14

It would be a lot of work compared to doing the same thing with Ace. The display component of Atom is not easily separable from the others.


#15

It could use a local server similar to the one used by the Jupyter project, it is open source.


#16

actually i do believe you could run it in the cloud because atom was made out of electron which is a web app framework meaning atom is programmed in HTML, CSS, JS and maybe a few other languages but those are all Web languages meaning if you got the code (atom is opensource i think) you could probably make a html file and paste it into that and it should work anyway thats just a theory


#17

Correction: Electron was made out of Atom. Atom was originally designed with part of Chrome built into it, so that it could be mostly written in JavaScript. Then the devs got the idea that what they had was so useful that they could split it off and use the Chrome + Node framework for other things, so Electron was born.

The code is right here. Have at it.

you could probably make a html file and paste it into that and it should work

I can guarantee you that it would not work like that. Actually converting Atom into something that can be accessed from the browser would take much more work than copying and pasting the code. You can paste a web app into Electron and expect it to work, but the opposite is not necessarily true. Too much of Atom is built on elements that would have to be rewritten and retested to support a purely online experience.

anyway thats just a theory

A theory is something that has been tested and is generally accepted by the scientific community to be a productive way of looking at the world that allows us to make predictions and invent things based on the knowledge. You mean that it’s just a hypothesis.

Non-hypothetically: yes, it’s possible. As has been stated repeatedly in this thread, it would take a large amount of work to do. The dev team is not going to do that work because that isn’t their vision for Atom and because there are some great online editors already. If you would like to do it, Atom is free and open-source.