Atom on chromebook (was: Let's talk ChromeOS) [RESOLVED]


#1

Hey guys,

I have been following Atom.io for a hot minute, and it is an editor I am very excited about. I try to keep up with the blog and various news aggregators, but there is always one subject that is mysteriously vague: ChromeOS. The most common references to the OS concerning Atom are usually rants along the line of “Why don’t you support my OS? I want it for (my_os), (other_popular_os), and ChromeOS”. There never is actual information concerning Atom implementation for ChromeOS, and I want to change that.

With that said, I have a question for the dev’s. Other OS’s logically take precedence over ChromeOS due to market size, so it is illogical to ask for a timeline. However, the possibility of support is not yet dictated. Does Git intend to ever (keyword here) give Atom.io support to ChromeOS?

###Thoughts to keep discussion away from the “support my OS” useless threads:

Do you think ChromeOS needs Atom.io?
I think so. The editor market is pretty weak in ChromeOS, with the nearest competitor being Caret, which is much less powerful than Atom.io. The cloud IDE market is developing within ChromeOS, but at the level of maturity it is at I do not think it would be able to compete with the features offered by Atom.io, nor the respect that the Git name brings. ChromeOS seems like a platform that is welcoming to the web developers, something that Atom.io shares. Atom.io would bring features that are only comparable by having multiple specified-use editors, an all-in-one solution (both web and backend language support, offline and online capabilities, code compilation, plugin support) for code development simply does not exist on ChromeOS at this time.

Do you think ChromeOS can fully run Atom.io? I am not sure about this. There are offline-capable chrome apps, but I am not experienced with their development. The size of Atom.io is still moderately lightweight, but compared to the current size of comparable apps concerns are raised. Plugin support seems difficult with the locked-down nature of the OS. However, the Chromium base gives a lot of hope to support, and I have heard rumors that Atom.io was offered on the Chrome App store a while back for a short period of time.

This thread is not for complaining for lack of support, it is for information. If ChromeOS support is slated, I would be ecstatic. If ChromeOS support is a difficult possibility, how can we help ease the porting? If there is no intent for ChromeOS support, a solid answer and reason would be much appreciated.

I have a dream of programmers living on the cloud, and I feel that the Chromebook is the physical embodiment of that. I want the customizable nature of Atom.io to help facilitate that dream.


Deploy atom online
Cloud based editor?
Atom on ChromeOS without chroot ? Chromebrew / Anaconda
Compatibility on Linux ARM
Have you ever thought about a mobile app?
#2

Atom is using Chrome Embebed Framework for the GUI (good for you :smile: ) and a Node.js base runtime for the code (bad for you :frowning:). This means that apps can be build with HTML, but could only run where Node.js is available, where ChomeOS is not one of its platforms. The reason to do it this way is because web technologies doesn’t currently support access to the underlying filesystem, where Node.js can be able to do. One alternative would be to use chrome.filesystem on ChromeOS, but this would require a huge work and currently the Atom core source code is not available, so at this moment is not available and it will not be in some time. The good news are, except from the fact of using Node.js (based on v8, the same Javascript interpreter of Chrome) and the usage of Node.js packages environment, it’s mainly a question of what APIs are available, so theoretically it would be possible to port Atom to work as a full native web app, but due to the decissions regarding to its runtime it would be a huge task to do it.


#3

The above part is true …

But this part is supposition, unless there is a timeline posted somewhere that I’ve missed?


#4

So from what I gather the sole requirement for implementation would be access to the source code in order to optimize it to run. Waiting for the source code to open up is a possibility, but is there truly no other requirement? Would it be able to fully run as a native web app with no need for Google to update ChromeOS for dependencies? It is one thing for a group of developers to update their favorite IDE, it is entirely another to get enough backing on the Google issues site to get the chromium devs to update something.


#5

It was said that, some time in the future, source code would be released, but no date was said. It’s my impression that we should wait some more weeks or months, not short place.


#6

Current Web APIs are capable of that, but the main problem is related access to user filesystem, that’s the reason GitHub decided to use Node.js as backend. So yes, once Chrome and/or Firefox implement a way to access user filesystem (they are working towards a standarized API regarding this), it’s only a matter of adapt the APIs. Problem here then will be the fact that Atom relies too much on the Node.js and NPM ecosystem, that although browserify do miracles, it will be a huge work, specially if people is interested on using the native browser APIs instead of the Node.js ones… :-/


#7

There has been plenty of work done to port brackets.io to Chrome OS. Aren’t they both built in very similar fashions?


#8

Not technically support for ChromeOS, but if you can get Crouton running on your Chromebook, you should be able to run the Linux version of Atom.io.


#9

Turns out it only took about 19 hours!


#10

F*ck yeah!!! :smiley: Can we think it was due to this topic…? :stuck_out_tongue:


#11

Now that the source is up, I am trying to do that now. I have encountered a few issues due to how I want it running. I am not the biggest expert in crouton, but I currently utilize it for command line Debian Sid. Instead of running an OS on another screen instance (as crouton initially intends) I bring up bash shells to work with file systems and do any grunt work that is needed.

It would be nice to be able to utilize this setup and bring I would say “hybrid” support to ChromeOS from Atom.

As in: Atom is installed and run via debian CLI, and the GUI is handled by ChromeOS. I think that crouton is meant to bring a fusion between generic Linux OS’s and ChromeOS, and I think that Google supports this concept with Chromebooks by freeing up dev-mode activation within them. I will document my trials with this implementation here.

##Current Status
Chromebook: HP 11 with Atom 1.7 dual core (a little weak and ARM processor may give issues, but this is more a proof of concept). Optimization is a goal for down the road.

Work so Far: Downloaded and attempted installation. Encountered issue when running initial script/install command concerning the existence of /etc/bin/something_I_can’t_remember. ls shows that it does exist. This error was brought up with node.js, which is installed, but may not have the needed libraries for the dependency error given by the script. Will look through the install directories and the git page for a full list of dependencies.

So the error after running script/build was:

/usr/bin/env: node: No such file or directory

Then I found a tip online on the github page:

I’ve found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so “ln -s /usr/bin/nodejs /usr/bin/node”

Edit: The script now runs and is building now but it is not outputting anything and seems to be stalling out. It may just not be outputting this stage and just takes a while, or the ARM architecture may be messing things up (they list x64 as a requirement for linux). I am gonna keep working.


#12

Atom.io really dislikes my chromebook.

gyp: name ‘chromeos’ is not defined while evaluating condition ‘target_arch==“arm” and chromeos==1’ in deps/breakpad/breakpad.gyp while loading dependencies of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.8.11
gyp ERR! command “nodejs” “/usr/bin/node-gyp” "rebuild"
gyp ERR! cwd /home/cloudsurfer/Downloads/atom/build/node_modules/minidump
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! minidump@0.5.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the minidump@0.5.0 install script.
npm ERR! This is most likely a problem with the minidump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls minidump
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.11
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “–userconfig=/home/cloudsurfer/Downloads/atom/.npmrc” “install” "–quiet"
npm ERR! cwd /home/cloudsurfer/Downloads/atom/build
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.4
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/cloudsurfer/Downloads/atom/build/npm-debug.log
npm ERR! not ok code 0

I am gonna take a deeper look and see what I need to do to get this thing to run.

Some food for thought: [The thread where I found the dependency solution,][1]

@houmie (and everyone who comes across this bug in the future)

These explain why:

http://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907
http://debian.2.n7.nabble.com/Node-js-and-it-s-future-in-debian-td1042211.html (only read this last thread if you’re a masochist)

As a Node developer, I would think hard before using Debian’s packaged version of node, and would use Ubuntu with chrislea’s PPA for Node or Debian stable with Node built from source in preference to the stock Debian nodejs package for the foreseeable future. The discussion on this bug makes clear that Debian has a very different idea of the role of Node in the wider world than most of the Node community.

From these errors, it sounds like I will have to work out some issues on the node.js side of things now.

Is this helping you guys at all? Should I move this thread over to the github account for atom.io?
[1]: https://github.com/joyent/node/issues/3911


#13

I get it working on my Ubuntu machine with the instruction on the repo Readme. I needed to do git pull several times because code gets commits each some minutes, but after downloading half-intenet I get it working :slight_smile: Give it another try with git pull and redoing the steps. The main problem would be regarding X11 at launch time, but it should work


#14

From what I read on the docs, seems it would be feasable, but would need some work.

Atom is based on Atom-Shell, a combination of Chrome & Node.js similar to node-webkit. A first aproach would be to make Atom to work remotely, showing the interface on Chrome and having the core running on background. Later, it can be seen how to move the Node.js environment to the browser. browserify would do the trick, and regarding to native APIs maybe using it as a Chrome App instead of a pure WebApp would solve this, but the main problem is related with the C/C++ bindings, where there would not be an easy solution in the browser and more specially with the fact that APM/Atom-Shell has different headers for the V8 bindings that the NPM/Node.js ones…


#15

Has anyone tried to use Emscripten to compile atom-shell as a pure JavaScript Chrome Web App? :stuck_out_tongue:


#16

I don’t believe it’s a long-term solution, performance would be sub-optimal compared to use the native V8 engine and there’s also the problem with the native APIs.


#17

gyp: name ‘chromeos’ is not defined while evaluating condition 'target_arch==“arm” and chromeos==1

How do I fix this?

edit; this did at least something

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get autoremove

mkdir -p ~/.gyp
vi ~/.gyp/include.gypi
Adding the following:
{
variables: {
‘chromeos%’: 1
}
}


#18

I have node and npm working on the chrome book without using a chroot ubuntu with cruton.

I just used rasberry pi binarys.
http://nodejs.org/dist/v0.11.12/node-v0.11.12-linux-arm-pi.tar.gz

Extracted it into a folder called node in /usr/local
Then

chmod /usr/local to 777
ln -s /usr/local/node/bin/node /usr/local/bin/node
ln -s /usr/local/node/bin/npm /usr/local/bin/npm

It could be possible to run this if we can do it from the browser or popup a window…


#19

@LiamMitchell Did you eventually manage to get it working on ChromeOS?


#20

I’m running into a similar problem here. I have the HP Chromebook 11 and have ran Crouton to have Ubuntu xcfe running parallel to ChromeOS. Following the instructions contained in the README for building from source on Linux, i’m running into the same problem that @RdeWilde and @CloudSurfer had with gyp: name 'chromeos' not defined.

I am going to try and work through this, however i’ll admit i’m a bit of a newbie with linux. So if anyone has found a solution and wouldn’t mind listing the steps here, i’ll take responsibility for writing them up in their entirety and submitting them back to the project repo for others to use in the future.