Cyrus Stoller home about consulting

Using Crostini for Rails development

Previously, I’ve written about how I setup a cheap Linux laptop to take traveling. Unfortunately, I have been frustrated that the hardware on these cheap laptops has become too weak for me to do meaningful work. The minimal RAM results in the system slowing to a crawl when multiple tabs are open. As a result, I found myself not really using my cheap laptop anymore.

On my old travel laptop, I used Cruton to transition from ChromeOS to Debian, but that’s started to feel clunky. Now that Crostini is more mature, I have been curious whether this would make for a better travel laptop experience. With the Linux environment more deeply integrated into ChromeOS I’ve been hopeful that development will feel more natural.

Pixelbook Go

Not all Chromebooks support Crostini yet. I chose the Pixelbook Go, mainly because it didn’t feel like cheap plastic construction and because I felt confident that it wouldn’t lag with multiple tabs open. Oddly, it feels pretty similar to a Macbook Air when I first picked it up. Granted $650 isn’t as cheap as my previous travel laptops, but this still feels materially cheaper than my Macbook Pro, which is the main reason I want a travel laptop in the first place.

From a technical specs point of view, the Pixelbook Go has a Intel M3 processor and 8gb of RAM, which is comparable to the now defunct 12-inch Macbook. Not a powerhouse computer by any means, but with 10+ hours of reliable battery life and all metal construction weighing only a little over 2 pounds this felt like a good combo for travel.

Installation

Gotchas

1) Replacing zsh as the primary shell

$ sudo vim /etc/passwd

Copy the following line (where cyrus is your username):

cyrus:x:1000:1000:cyrus:/home/cyrus:/bin/bash

And add the following in the line above it:

cyrus:x:1000:1000:cyrus:/home/cyrus:/bin/zsh

Then run:

$ chsh -s zsh

2) Copy and paste from Chrome

At first I got frustrated that I could not copy and paste directly from Chrome into the Crostini terminal using CTRL+V. I’m still not entirely sure why, but you need to use CTRL+SHIFT+V instead.

3) No tabs in the terminal

I typically use multiple tabs in iTerm to keep projects separated. From what I can tell so far, the Crostini terminal does not support this yet. Fortunately, tmux works great. I just haven’t figured out how to make the mouse bindings work like they do on my Mac.

For one-off tasks and setting up a development server, this works well. But, when I need to switch between tabs often, I feel some mental friction in my workflow. My hunch is that this may be due to the fact that I haven’t customized my tmux.conf. If I want to use this laptop regularly for more than just debugging and writing blog posts, I’ll need to put some time into getting this setup better.

4) No terminal configuration

I find the red cursor block to be a little annoying. From my use so far, I haven’t found a way to adjust that yet. The terminal also doesn’t respond well to characters that are more than a fixed width. This became a problem when using the default theme for oh-my-zsh. So, I’ve adjusted my zshrc file to use a different theme when on a Crostini machine.

5) Linux freezes

The only solve I’ve found so far is to restart the Chromebook. Fortunately that doesn’t take very long (usually 30 seconds), but I wish there were a way to handle this more gracefully.

6) Installing postgres and redis

My previous travel laptops have run Ubuntu. So, in the past, I’ve been able to use apt packages to install everything, but I’ve found that I need to install some of these packages from tarball to get the right versions when using Crostini.

Conclusion

I forget that I’m using a Chromebook when I surf the web and check email. The main time I’m aware of its limited hardware is when I boot a development server or run a test suite. So far, performance has been more than sufficient for my travel needs, but falls well short of what I would use as my primary laptop. For me, travel is the ideal use case for a Chromebook.

I hope this is helpful. Happy hacking and safe travels.

Category Tutorial