Skip to content

Coder on a Chromebook with Crouton

Jason Striegel edited this page Oct 29, 2013 · 3 revisions

Caution: I've only started experimenting with this, so it's completely untested. This presumes you're okay with putting your Chromebook into dev mode, which will reformat your device and wipe away any data you have locally stored on it. Proceed at your own risk.

Enter dev mode

Older devices need a small hidden switch to be flipped. details here

On newer Chromebooks, you hit Esc-Refresh-Power and then type Ctrl-D at the recovery screen. details here

Install Crouton

Crouton is a way of running a full version of Ubuntu on your Chromebook at the same time Chrome OS is running. It installs the Ubuntu files in a chroot, which you can enter and exit. Inside the chroot, your terminal acts just like an Ubuntu box, and from there you can launch the Coder server.

Details are here, but here's the quick version.

  1. Download http://goo.gl/fd3zc

  2. Ctrl-Alt-T to get a terminal. Then type shell to get to a shell prompt.

  3. sudo sh -e ~/Downloads/crouton -t cli-extra

    This will take a while to run while it installs all the Ubuntu packages.

  4. It will ask for a user/pass for your new chroot instance. I'm using coder, so you'll see some references to that in this howto. Modify as needed.

  5. Enter your new Ubuntu instance with sudo enter-chroot

    You're now logged in as the coder user in your Ubuntu chroot.

Install the necessary packages

  1. Enter your Ubuntu chroot, if you haven't already:

    sudo enter-chroot

  2. Install node.js, npm, git, and some other dev essentials.

    sudo apt-get install nodejs npm git build-essential redis-server g++ zip nano vim

    This is also a good time to your favorite editor like nano or vim. ;)

  3. As the coder user, clone the Coder files from git into the coder-dist folder within your home directory:

    cd ~/

    git clone https://github.com/googlecreativelab/coder.git coder-dist

  4. Install Coder's required node packages:

    cd ~/coder-dist/coder-base/ npm install

  5. Install all the core coder apps into the coder application directory:

    cd ~/coder-dist/coder-apps/

    ./install_common.sh ../coder-base/

    You will see some errors here about not being able to stat a media directory. You can ignore that.

Configure Coder to run on localhost

There's a pre-made config file and a special server for running Coder on localhost without https. It's a good way to get up and running with a local development environment.

  1. Replace the default config with the localhost version:

    cd ~/coder-dist/coder-base/

    cp config.js.localhost config.js

  2. Launch the coder localhost daemon.

    node localserver.js

  3. Test it! Make a new tab and go to http://localhost:8080

    When you're done, you can kill the server by hitting Ctrl-C in your terminal window.

Start the Coder server when you log in

The Coder server won't start up automatically. You'll have to launch it from the command line when you first log into your Chromebook. On the bright side, it's easier to see debug logs from the node daemon this way.

  1. Ctrl-Alt-T to make a terminal tab.

  2. sudo enter-chroot to start and connect to your Ubuntu instance.

  3. Finally, launch the server:

    cd ~/coder-dist/coder-base/

    node localserver.js