Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A patch for the "crosh as window" app in ChromeOS. Deprecated.

Open crosh as a window in ChromeOS

I've spent a lot of time using my Samsung Chromebook as my main machine and I'm pretty much conviced that it is all I need. I usually use a browser and a terminal, that's it. The great thing is that ChromeOS can satisfy both needs, by using the great Secure Shell extension, that allows you to connect via SSH to remote machines.

But there are times (very few now, for me at least) when you want to have a fully operational Linux installation. That's when you can use Crouton (through the Chrome Shell, called crosh), which allows you to run a standard Linux distribution (Ubuntu, for example) as an additional process within ChromeOS.

The only problem: If you want to use shortcuts like Ctrl+w (in Vim, for example), Chrome will take the default action associated to that shortcut, which is not what we want. One solution is to open crosh as a window (not to confuse with "in a new window"), but this not easy to do right now in ChromeOS.

Luckily, github user "adlr" came up with an extension that opens crosh as a window (see the extension here). The bad news is that the extension broke a while ago.

Now there is a solution for this (see here), actually a very elegant one, which consists in a patch to the Secure Shell extension that allows you to open crosh as if you were connecting to a remote machine. I hope they include it in the default extension.

So how do you use this patch? I went ahead and patched Secure Shell and made it available here[^1]. You need to:

  1. Download and unzip the file.
  2. Uninstall Secure Shell if you installed it from the Chrome store.
  3. On the "chrome://extensions/" menu, check the "Developer mode" box in the upper right.
  4. In the same menu, go to "Load unpacked extension" and navigate to the folder PatchedSecureShell/0.8.22_0. You will have now the extension installed!
  5. Go to the "Apps menu" and right-click the Secure Shell icon. Select "Open as a window".
  6. Now, when you open Secure Shell, set the name and the hostname field to "crosh" and leave the username blank as the image below.

Configuracion

Enjoy.

Thanks to Wayne Davison for the patch!

[^1]: If you don't trust my patched version, you can follow the instructions here, no hard feelings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment