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


#75

I finally get it through my head that this discussion is about what people want in running Atom on chrome. I keep responding with stuff about what could be done in the foreseeable future. I’ll shut up now. I’m not helping,

Just remove the [resolved] tag.


#76

You can always use the “Reply as Linked Topic” (you have to hover over the post you want to link from for the link to show up next to the time code). And yes, I think it is perfectly valid in this case since you do want to have a somewhat different discussion.


#77

Did you have to do anything to get the key bindings working nicely? I have just installed Atom in Crouton, but some shortcuts, such as ctrl-F for moving the cursor forward, do not work, and I also can’t figure out where the cmd key on a chromebook keyboard is. I’m using Toshiba chomebook 2, but I suspect the keyboards are the same?


#78

Once the normal chromebook keybindings are set up then you will be able to set up the Atom bindings just like any other installation.

— See Edit below. This stuff doesn’t apply any more. —
In March of this year Google replaced the X11 graphics stack with their own modified version called freon. As of early June many x86 chromebooks had switched to freon but no arm. I don’t know what the status is now. Since the os is auto-updated you can get the change at any time.

When freon first came out crouton had a bug that caused the special search-key keybindings to fail. These were the bindings such as search-left becoming the home key. There was a PR to fix this and I don’t know if the PR is in the stable release yet or not. I don’t know because I installed the PR from the authors fork.

You can read about this in my long thread on the crouton repo.

Edit: I just noticed the PR has been released so you can ignore all the junk I typed about the search key bindings problem. Unless maybe you are interested in ancient history.


#79

I’ve never had a cmd key so I’m not certain about the answer. I suspect it is the search key.


#80

OS X’s Command/Cmd/⌘ key is the same key, keycode-wise, as the “Windows” key. Often it is referred to as the “Super” key when one wants to talk about it in a cross-platform way. But on Mac keyboards, the Alt and Super keys are swapped physically.

There is also an older topic here where I talk about the different meta keys and their cross-platform names along with a little bit of history where they come from:


#81

I know that the search key can be the “windows” key. Some tweaking may be involved, not sure.


#82

Another approach could be running Atom as a Chrome app. Is there a way to abstract away the differences between Electron and the webview provided by Chrome OS?

What are the things that are missing from Chrome OS that prevent Atom from running natively? Have these been raised as Issues for Google?

Things I can think of that might be a problem:

  • Atom brings its own Node.js / io.js, and might depends on things here that aren’t in Chrome OS
  • some Atom packages need git to install
  • worse, some Atom packages need C / C++ code to be compiled
  • I’m not sure Chrome apps have access to various binaries available in the Linux layer beneath

#83

Unfortunately even with the very best of intentions, @mark_hahn has muddied the waters somewhat in this discussion.
Saying “install crouton to run atom on chromeos” is the same as saying install vmware to run windows apps on osx - that is not the same as having a version of Atom as a ChromeApp.

For your information Mark, ChromeOS (and desktop Chrome) has quite a comprehensive API for “packaged apps” that is comparable to “traditional desktop OS” such as Windows and OSX (apologies for so many quote marks).

Also saying “install crouton” is also not feasible from a practical point of view as it requires putting a chromebook into developer mode which essentially gives up a lot of the security built into ChromeOS and hence would not be an option for people using managed chromebooks, just as install a VM would not be an option for many people using managed laptops running traditional OS’s.

Now onto the practicalities of getting Atom ported to be a Chrome Packaged App…

Dependence on Node and its API’s is a big one as Chrome’s API’s are very differnet, especially for things like filesystem access. Likewise communication between packages apps is tightly locked down but is required for things like loading code dynamically (aka the whole plugin infrastructure)

Packages depending on C/C++ native code may or may not be an issue given the availabiltiy of both Emscripten and PaCNL but again it depends on how mcuh work is needed to port the native code across to either one,

There are several efforts to port git to JS so thats not necessaritly an issue, though none qre quite mature enough yet.

From the little I’ve read about Atoms architecture, the core and UI layers are failry well abstracted and all parts seem quite modular so it might be possible to initially do a partial port, simliar to the Tailor port of Brackets to run as Chrome Packaged app.


#84

Which I never claimed. I discussed running apps in crouton versus as a chrome app at length with a number of users in this thread. I think everyone in the discussion understood the difference.


#85

Fair enough and no offence intended, I agree that using crouton (which I use too) is a decent workaround while there is no native Atom chrome app.

I was mainly hoping to rekindle this discussion and point it again in the direction of what it would take to get at least a partially functional Atom running as a chrome app.


#86

I may be showing my ignorance, but what is a “native Atom chrome app”? Is it different from a chrome extension? Is it something that only runs on chromeos? What access does it have to the system calls, like file and network APIs?

If it can access every call a linux app can then I have been wrong. Atom should be able to run as a chromeos app by porting electron. It would still be very hard, electron isn’t tiny, but it wouldn’t be as hard as running it in a browser, as a lot of people would like.


#87

Not at all, its a good question!! as this is still a huge point of confusion even in the developer community, let alone people outside it and Google have not done a great marketing job with it.

Basically Chrome Packaged Apps (Googles marketing material just calls the “Chrome Apps” now) are a bundle of html/css/js in a zip file, like extension which they grew out of, installed via the web store or side-loaded that come with a manifest file that importantly describes the permissions the app wants.

Unlike extensions, this gives Apps access to a very broad API:
https://developer.chrome.com/apps/api_index

that for instance includes access to the FULL devices file system (under users initial approval), device hardware (USB, BT), raw sockets, etc.

Note: this is NOT "working in a Browser, this is fully fledged app that happens to use a system API written in Javascript. Note also that this is for both ChromeOS and desktop versions of Chrome, capabilities are (almost) exactly same for both!

BUT if you look through the API docs, you’ll see that they are very different from both the traditional POSIX and the Node API (which is pretty close to posix-in-js).

Infact you can think of the Chrome API as an equivalent to the Electron APIs, so porting Atom to them would be difficult and a big job. But hey, people have written whole x86 virtual machines in JS so its not impossible and even likfely doable by 1 person (initially).

There’s also very tight restrictions on runtime code loading so as I said, that would need to be especially worked around and might perhaps prevent a port from the Electron APIs to the Chrome APIs altogether, though looking at the list of Electron modules, there seems to be a reasonable overlap with the Chrome APIS.

@mark_hahn hope that helps to clarify things?


#88

Yes. Thanks.

So this is a far cry from running in a browser which everyone would love. It would actually be much closer to running the existing native app. While this would solve the problem of having to run a chromebook in developer mode it wouldn’t help on any other platform. In a windows, mac, or linux environment there would be no advantage over loading the existing app.

So we are left with implementing a very hard solution for a single environment. I just can’t see this happening. Obviously I’m biased because I think running in developer mode is a good solution. Atom is only for programmers and most programmers are used to running things in developer environments, they are developers after all. (grin)


#89

I’m reviving this discussion because Google announced Android Apps for ChromeOS, so an Android port would be enough to cater Android and ChromeOS?


#90

That would be pretty cool.


#91

Hi Mark,

I would love to get Atom up and running on my Toshiba Chromebook. Your post has given me hope, and I have already installed Ubuntu for dual boot, but I edit my sites now in the ChromeOS but have to start Ubuntu every time and use Zed or Caret. There is a way now that I will try later where using crouton to install Debian to work on the ChromeOS side without installing Unbuntu, but that is for another day. I have more ease of use on the ChromeOS side, I rather use it for creating templates not having to use Atom on Ubuntu or Komodo Edit which I do love, however, I want to start using the features of working in the browser.

Can you help me get started with instruction of installing Atom on my Chrome browser?

Cheers!


#92

If you read this massive thread you will see many people wanting to run Atom in a browser. IMHO, it isn’t possible.


#93

Well, the headline does say “resolved” so we should probably fix that then.


#94

Running Atom on a chromebook in ChromeOS, which is what the headline (subject) says, is resolved. You asked about running it in a chrome browser which is a totally different thing and IMHO impossible.