A resource for learning and tinkering with Arduino

A resource for learning and tinkering with Arduino

Tuesday, January 21, 2014

Chromebook Programming

I recently received a Chromebook for Christmas and wanted to set it up to be my main computer. A Chromebook doesn't have a traditional operating system installed on it such as Windows or OSX and because of this traditional software doesn't run on it. It is primarily and internet browser, specifically Chrome. (hence the name Chromebook) Nowadays you can find online software to do a lot of the things you would normally have installed software do, so a Chromebook isn't at a huge disadvantage when compared with other computers. They are also really cheap ranging in the $200-$400 range for most models. However you do run into problems if you really need a specific piece of software that doesn't have some form of online equivalent, which for me was extremely important if I wanted to be able to do any of my normal programming.

After looking around some I discovered that you could use a script called crouton to install a Linux distribution alongside the Chromebooks operating system. This would allow me to switch over to Linux anytime I really needed to work on something that just wasn't available on the Chromebook stock system.

There are loads of tutorials all over the internet detailing this process so I'll give a brief overview of what needs to be done and provide some links to other more detailed instructions. The main thing I want to get into in a later post is setting up your Linux environment to allow you to program Arduino compatible microcontrollers.

Essentially you need to put your Chromebook into development mode. This gives you access to a few things that aren't available by default. BEWARE doing this wipes your hard drive and if you decide to switch back from developer mode it wipes it again. Getting into developer mode can be different on different chromebooks.

Generally you hold escape and refresh and tap the power button. It will take you to the recovery screen which makes it seem like you just broke your computer.

Hit ctrl+d to boot into developer mode.

Once in developer mode you can download the crouton script.

Open a crosh by typing ctrll+alt+t

Type shell and hit enter to open a shell terminal.

Then type " sudo sh -e ~/Downloads/crouton -t xfce"

Note: this will install the xfce desktop environment. You don't have to use this environment but it seems to be the one the developer prefers and as such is way more stable than the others in my experience. I usually prefer cinnamon on my machine but when I tried it the screen was a little buggy and flashed a lot when anything on the screen changed. I also tried enlightenment which is usually my go to for a lightweight environment but some of the software I tried to install just didn't work quite right. So I decided there must be a reason everyone says to use xfce and everything has been working much better.

Once you get it installed you can run it by typing "sudo start xfce4" the 4 indicates that this is version 4 of xfce. This command only needs to be typed each type you turn your computer back on. Since most chromebooks have a huge battery life and don't really need to be powered down that often you won't need to do this all the time, only when you feel the need to restart your machine.

You can then switch between ChromeOS and Ubuntu (the flavor of linux behind the scenes here) by pressing ctrl+alt+forward(the little arrow pointing right) and then ctrl+alt+refresh(the little circle arrow) and pressing ctrl+alt+back to switch back to ChromeOS.

Don't forget the refresh part otherwise you get this screen that's just black with a bunch of text and you may like I did think something is horribly wrong when all that happened was you forgot the second keystroke.

Anyway here are some links to other sites that have further instructions on the matter:

http://www.howtogeek.com/162120/how-to-install-ubuntu-linux-on-your-chromebook-with-crouton/

http://www.webupd8.org/2013/12/install-ubuntu-on-your-chromebook-using.html

Most of these sites have links to the crouton script which you can download.

In another post I'll talk about the steps you need to take to get Arduino IDE up and running, since there are a few extra things you need to do.

3 comments:

  1. I only did a partial read, but that's fantastic that the Chromebook can take Linux! I would not find the Chromebook useful enough to purchase if that was not the case; nevertheless, I still prefer a Windows-capable machine too, and an older, but nice and brand new, model can be ~$450 for a solid Toshiba one, so Im not swayed to a Chromebook yet. :)
    ~Gabriel
    http://electricrcaircraftguy.blogspot.com/

    ReplyDelete
  2. is this really reliable? My son uses his chromebook for school and will be taking a robotics class where the instructor told him to install arduino IDE. Before I do the instructions above, just want to make sure that this will not cause his chromebook to need a OS reinstall.

    ReplyDelete
  3. This blog awesome and i learn a lot about programming from here.The best thing about this blog is that you doing from beginning to experts level.

    Love from

    ReplyDelete