eklitzke.org

repz stosb

Crosh/SSH and ChromeOS

I have a Chromebook Pixel, which I like a lot and use regularly. Generally I use my Chromebook for non-coding tasks; for coding I prefer to use my Thinkpad (which has Fedora installed) because it has a "real" coding environment.

However, sometimes I'll code on my Chromebook as well, e.g. when I'm traveling and it's more convenient to bring with me. When I write code on my Chromebook I use a Debian chroot environment via crouton to do development. This is a pretty reasonable facsimile of writing code on a "real" Linux laptop: you can use things like Emacs, GCC, GDB, and all of the other GNU/Linux tools you know and love.

The biggest pain point of doing development this way is the window management in ChromeOS. I like having lots of terminal windows open, and ChromeOS makes it hard to do this. The "normal" and well-documented way to create a new terminal is to type Ctrl+Alt+T to get a new crosh window to appear as a new tab in a browser window. From the crosh tab you can get a terminal by typing shell. But this is pretty inconvenient: the new crosh window starts out as a browser tab, not a new window, and there's a lot typing.

There's an extremely poorly documented feature of the SSH app that makes this much easier. From the SSH app you can get a new crosh terminal window by setting the host to be the magic string >crosh and then supplying any username. This way when you type Ctrl+Shift+N from an existing crosh shell, a new window will pop up ready to become a terminal.