Friday, January 2, 2015

Having fun with Crouton

Chromebooks run ChromeOS, which is based on Linux but is made to appear running only the browser. Even though we can do so many things with just the browser these days, I stil have a few reasons why I need to keep a notebook that is not a Chromebook around me: Gimp (very occassionally when I take photos and need to touch them up), Calibre (to manage and populate a Nook Glowlight with eBooks) and GnuCash (to balance my checkbook).

Since I replaced it with Toshiba Chromebook 2, my old Samsung ARM Chromebook was looking for a good alternative use, and I thought I may be able to use it to run GnuCash under Crouton. Crouton is a tool to let us run more traditional Linux distros in a chroot environment on ChromeOS devices. I learned that it recently got better by allowing its virtual desktops shown in separate windows, side by side with native Chrome browser windows. One downside of Crouton is that it can only run under developer mode, side-stepping the ChromeOS's security model.

Even though I cannot turn my primary Chromebook to developer mode (because it has to be enrolled for enterprise access to access the workstations at work), I can sacrifice the ARM Chromebook that has now become redundant.

So, following instructions from the primary site of crouton, here is what I did:
  • Turn Chromebook into developer mode (this wipes the device)
    • Turn off the machine
    • Hold ESC + Refresh and turn the machine on to go into Recovery
    • Ctrl-d to reboot into the developer mode
  • The usual Chromebook activation
  • Download crouton by visiting https://goo.gl/fd3zc
  • Install crouton extension by visiting the webstore
  • Type Ctrl-Alt-t to open a terminal-looking window, type shell and then type
    cd ~/Downloads; sudo bash to get a useful interactive shell running as root
  • Type sh ./crouton -r trusty -t xfce and let it run (takes some time)
  • Type sh ./crouton -r trusty -u -t extension and let it run (takes some more time)
  • Type sh ./crouton -r trusty -u -t xiwi and let it run (takes some more time)
  • Then type startxfce4 which will open a XFCE desktop environment, Ubuntu trusty distribution.
  • Open a terminal in that Ubuntu environment, install gnucash as I normally would (e.g.
    apt-get update
    apt-get install gnucash

    just like any Debian-derived distribution).
A few tips I had to figure out by trial and error that I didn't find on the Web (I am not saying these tips do not exist elsewhere; I am saying that I didn't find them ;-) are:
  • Even though crouton -t xfce,extension,xiwi is supposed to be the syntax to install multiple targets, I couldn't get it work well. Adding xiwi as an update (notice the -u option in the above) after everything else seemed to be a way to make it work.
  • After reading about crouton but before trying it out myself, I wondered how to make the two environments talk with each other (especially how to transfer "gnucash" data file across as running it is the primary reason why I am interested in this whole exercise), but it turns out that it was surprisingly easy and straightforward. In the Ubuntu environment that runs under crouton, ~/Downloads is the same Downloads local file shown in the Files application on the ChromeOS side.
  • Every time I turn the Chromebook in developer mode on, it goes into Recovery and needs Ctrl-d to continue booting. The Recovery screen looks scary but this seems normal.
  • Running the crouton environment is done by
    • Type Ctrl-Alt-t for a terminal-looking window
    • Type shell and then
    • Type sudo startxfce4 -b
  • Even though Samsung ARM Chromebook is not a speed daemon and has merely 2GB, it is more than adequate to fill my needs. I've seen people say xiwi (which lets the X session to be seen in its own window, instead of occupying the full screen and has to be switched with Ctrl-Alt-Back/Forth keys) is too slow to be usable, but I am not running graphical games. I have a suspicion that I will be cursing it when I start using Gimp, but until then ... ;-)
(Left side runs Crouton in its own window, right side is just a normal Chrome browser)




No comments: