This isn't setting up a local dev environment in Chrome OS. This is setting up a local dev environment on a Chromebook. I was hoping this would show some new way to actually develop in Chrome OS itself, just saying "boot into Ubuntu!" is a lazy answer.
The real question is why have we devs been forced to bastardize this OS since 2009 in order to actually use the darn thing? Where's the innovation Google? Where's the Chromebook for Devs? Because I bet if we looked at the numbers, we're the only ones buying these things anyways.
Ummmm. It is possible to run a full-blown Ubuntu including arbitrary kernels etc. Some are doing it.
This is just an easier method if all you want is access to a powerful Debian userland: it turns out that Debian already solved the problem of creating a self-consistent cross-compiled directory tree ages ago so it makes sense to reuse that solution here.
Ubuntu is still not ChromeOS -- my point is simply, why has Google not pursued the "lets build a $250 dev box for startups" avenue... since we've been playing this game going on 4 years now with not much traction beyond the dev community.
"Still, with over 2,000 schools now using Chromebooks, the real market for these devices sure seems to be in the education space. Over the last year or so, I’ve heard from a number of educators that they prefer to use Chromebooks with their students than an iPad (their students probably think the exact opposite…). Not only are they obviously cheaper and come with service contracts and management consoles for administrators, but having a full keyboard and larger screen clearly make them attractive devices in the view of many teachers and school administrators. The fact that the devices auto-update regularly and are pretty much safe from viruses also makes for an attractive selling point when compared to traditional laptops. For Google, of course, this also means many of these kids will grow up in the Google ecosystem of Gmail and Google Drive, which surely isn’t going to hurt it once these students go on to college or get jobs."
I love my chromebook so I'm fairly interested in doing this. I have two questions:
1) How does having a chroot environment affect battery life? Does access to the Ubuntu tools cost a ton of battery?
2) After I go into developer mode can I still get updates to Chrome OS?
Article author here. Anecdotally the battery life takes a bit of a hit, but I've been running it pretty hard to get everything installed. I haven't done any tests. I have a suspicion that Chrome limits its CPU usage, and the chroot does not. That said, the battery life isn't completely shot in the chroot.
I got my Chromebook on Monday, so I haven't updated it after initial boot. I'm not sure about the updating issues, but you can always go into non-Developer Mode and update from there. If that causes problems for the chroot, it's really easy to back up the chroot (it's just a directory) and reinstall it with Crouton: https://github.com/dnschneid/crouton#you-want-to-make-a-boot...
So in other words, I can't answer any of those questions yet, sorry!
Thanks for the preliminary response. I am very tempted to do all of this "hacker" stuff to my Chromebook but I'm worried that's a slippery slope. As is I have no local files, no battery worries, so it's essentially a maintenance free machine. Once I start doing local work I'm going to want more and more until it's basically just a netbook. I think it's maybe good for me to have a machine where I can't constantly be tinkering.
If you did this, would there be a significant lag from i/o? I assume sticking a Class 10 SD card in it and booting archARM would be pretty quick, but still slower than the SSD that ships with the machine.
Haven't tried on this machine specifically, but never noticed much lag as a result of running from USB on others. There is a USB3 port on the back if you're concerned about performance (just remember this is a $250 ARM laptop, not a MacBook Pro).
I've been thinking about getting a chromebook but as a macbook air user I'm not sure if it's worth it. Do you have any thoughts on an Air compared to the advantages of a chromebook?
It's hard to say. I bought the Chromebook because I have a Macbook Pro but I wanted something lighter, cheaper, and with better battery life to use in class and on the go. I really wanted a MacBook air but at $250 versus $1000+ I couldn't justify the upgrade. I think if you already have the MBA you can probably avoid the Chromebook for now as the use case is largely the same. However if you want something cheap and light to browse the internet and use Google Docs/SSH on the couch then go for it, you won't regret the purchase.
If you're unsure whether or not a Chromebook is the right system for you, check out the specs[0]. Note that the Chromebook isn't extremely powerful, but that is not the product's goal.
Back to Ubuntu/Chrome: Rather than install Unity (which I actually don't mind on some systems), I opted for the actual crouton dev team's recommendation of XFCE[1].
XFCE is made for an underwhelming environment, and its performance is better than what Unity would probably offer.
You can in fact switch between Chrome-os/Ubuntu with 3 or 4 key presses, depending on your chromebook model. Your install likely won't come with vim, git, etc. installed as ujeezy noted, but if you're familiar with gnu/linux, you already know you what you want from your environment.
I, like many of you, have a couple of computers to lug around: Work laptop (windows), Macbook (expensive shiny development tool). Being that I really have come to enjoy the macbook's battery life, even when using lots of high-resource tools/windows, I'm not sure where this chromebook will fit in. Breaking my macbook scares me, but so does being without it.
If you have a chromebook, definitely try this out. I was expecting to have to deal with lots of issues, but the install was extremely smooth (other than the downloads coming in at 20-30kb/s).
Things to note:
* Make sure you read Crouton[1]'s readme - there are a few potential 'gotcha's in there.
* Disable XFCE or Unity's screensaver.
* As ujeezy noted, you'll need to install vim/emacs, git, gcc, etc.
* While nice, and amazing for what it is, this will probably not replace your default dev environment, unless you exclusively use programs that aren't resource intensive, and/or only exist in terminal.
If ChromeOS doesn't provide you enough tools to run archbootstrap, you can run archbootstrap on a separate machine with the chrome disk attached and then put the disk in the ChromeOS laptop. A bit of hassle but perfectly doable.
I know the OP was interested in unix tools, but I've been wondering could you build a lightweight IDE or dev toolset in chrome itself? It looks like action.io and cloud9 have been some nice browser based tools, but what about building something using google native client that runs locally in chrome?
This. I have been considering trying but I have no experience with such tools so I think the task would be a little bit beyond me. I can't see a reason why Cloud9 couldn't make an offline version for Chrome, minus a few features.
Article author here. I can try a newer Vim when I have some time and update the post, this was just the first thing I got working. Thanks for the heads up.
While Sublime Text is nice (and rather attractive), many people still prefer vim and emacs. It's a matter of personal preference, in the end, as both vim and emacs are quite extensible. With the existence of tools such as YouCompleteMe, syntastic, delimitmate, etc., one can outfit vim with the functionality of Sublime Text or even some heavier IDEs in a matter of minutes (using vundle and pathogen to handle the extensions). My largest reason for preferring vim is its presence by default in almost every UNIX system I've touched. I just have to pull my .vimrc over to whatever machine I'm working in, if I'm spending enough time there to warrant it, and I'm almost immediately at home.
I'm a vim guy so I can't really speak on emacs, but I imagine things work in a similar fashion.
He covered web based IDEs and also having a dev machine to ssh into, most people have either no internet or shitty internet outside of their home and work. How does action.io solve that?
> most people have either no internet or shitty internet outside of their home and work
we think this is a situation of "skating to where the puck is going to be, rather than where it is", but we do have plans to build a bridge between an offline/online dev environment. If you'd like an invite, please email me at arun <at> action <dot> io
Is there any reason you couldn't keep an offline copy of the environment in the browser by using http://bellard.org/jslinux/? It takes a while to boot, but if you saved the RAM to local storage then it should resume instantly.
You'd have to sync the state of the VM when they come online again, but that could be done efficiently from within the VM in a manner similar to dropbox syncing.
Looks nice, apparently supports Vim and Emacs too.
Although it only works for Rails so far... there is a whole world out there that's not Rails. And they are only planning to support NodeJS, Django and some other frameworks.
Co-Founder of action.io here, we have python, node.js and go boxes already and many more in the pipeline. And in the future, the ability to create your own custom dev environment.
if you'd like an invite, please email me at arun <at> action <dot> io
Wow Action.IO is exactly the idea I had the other night and I thought it would be the best thing ever. Web-based IDE with SSH access and some console tools. Glad someone else already did it!
I dont get it , for the price of a chromebook , one can get a netbook with a full linux plateform to install whatever stack one needs (and ides like netbeans/eclipse/sublimetext2...) , what's the point being a chromebook for development purposes ? ( it is a question not a rant against chromebooks )
The ARM Chromebook looks to be a much nicer piece of hardware than anything under $250 on Amazon's top 20 list of netbooks[0]; bigger screen, dead silent (no spinning HDD, no fans), great battery life, and a keyboard/touchpad better than nearly every low/mid-end PC laptop I've used.
And you lose this benefit if you go outside CrOS as described in the article (I'm fine using it as a SSH terminal myself), but they're more or less disposable. I could chuck mine out the window, watch it get trampled in a conveniently timed parade, run out to Best Buy and pick up another one, and I'm right back where I was minus only $250 and an hour (incl. drive time and re-syncing).
Because Chromebooks are zero administration, and easily replaceable. Having set up my Mac OS X environment for the umpteenth time, and wrestled with wireless backups flaking out again, Chrome OS is the new "it just works". And if your laptop gets squashed by a steam roller, you buy another one, and you're back where you were.
Of course, what the article is describing means that you are back to admin hell again, which I don't advocate at all. Googlers use a Chrome Remote Desktop to get work done on a Chromebook, which helps, but of course, requires someone else to punt off the sysadmin, otherwise it's your problem again, just one step removed.
I wouldn't purchase a Chromebook as a primary development environment. I would purchase it as a home machine if I already have a work machine.
For me personally, it's not a environment I'd want to develop in 100% but it's nice for vacations or conferences. 2.5lbs vs 6lbs when you are in and out of a couple of airports and train stations is a big deal.
I've not been able to duplicate the battery life in a netbook running Linux 100% of the time. My side hustle is tech writing so most of my dev work is on my "big Bertha" Linux box and when I'm out and about and need to do light dev and mostly write or consume, I'm on the Chromebook.