Friday, April 3, 2015

Running OpenBox in Chrome OS


I had heard of Crouton before, but only in the context of people running Ubuntu on their Chromebooks. It turns out that Crouton can run many Debian derivatives, including Debian itself. Crouton works by configuring a target OS inside a chroot, allowing both OS's to run simultaneously and share the same kernel. As you'd guess, the overhead for running a guest OS is low. The Crouton install script also has a variety of target configurations, including Xfce, LXDE and yes, Unity.

Having a sub-$200 Chromebook and only needing to run a few Linux applications natively, I wanted to use Courton to run a light WM (Window Manager) instead of a full-fledged Desktop Environment. While an OpenBox target didn't already exist on Crouton, the core target allows for a bare-bones installation in which the user can install their own software afterwards, à la carte.

A Google intern recently wrote a feature that allows Crouton chroots to send their display to a native window in Chrome OS. With the Crouton script and my Chromebook in Developer Mode, I installed Debian Wheezy with no WM or DM by using the command sudo sh -e ~/Downloads/crouton -r wheezy -t core,xiwi -- though I'm sure I could have left core out, as the xiwi target would pull it as a dependency.


I then entered the chroot with the sudo enter-chroot command, and installed OpenBox and urxvt by issuing apt-get install openbox rxvt-unicode fonts-inconsolata to the terminal inside the chroot. After that, I chose the exit the chroot, and re-start it with sudo enter-chroot -b xinit openbox-session. I can now do Java development, run IPython Notebook, or even host a mail server.

(Note, if you're going to live with this long-term, make sure to create a proper .xinitrc file -- allowing you to leave openbox-session off of your enter-chroot command -- and read up on properly configuring OpenBox.)


No comments:

Post a Comment