Monday, May 14, 2018

Linux apps are coming to Chromebooks

Excellent news for Chromebook users and Linux enthusiasts! Google announced that Linux apps are coming to Chrome OS.

Before we discuss that though, let's review Chromebooks and its OS: Chrome OS.

Chrome OS

Chrome OS was originally created as a Ubuntu spin off. It then migrated to Gentoo Linux and evolved to use custom Linux kernel. The UI has always been Chrome - the browser - being basically your only desktop app.

The other "apps" initially available used to be web apps (Gmail, YouTube, etc) wrapped inside a chrome window.
A Chromebook currently being sold on Google Store

Android Apps

Due to the limitations and availability of apps, Google worked to bring Android apps to the Chrome OS. While that's huge, you can run most of Android apps but not all.

Reports show that the majority of other applications work flawlessly. That's million of apps. As a result, we've seeing a growing popularity of Chromebooks.

But those apps lack advanced features for some users so Google decided to move further and extend that integration and bring Linux apps to Chrome OS.

Linux apps on Chrome OS

In order to run Linux apps on Chrome OS, developers are working on what's called Project Crostini - an extension that will allow Linux VMs to run inside a container on Chrome OS. First spotted on Reddit, it seems it's already available on Chromium developer builds with a preview being quickly available for the Pixel book.

The main objective is to run these VMs run within containers on top of Linux's built-in Kernel-based Virtual Machine (KVM). This has an extra benefit in terms of security as those Linux apps would have be sandboxed within the container (and/or the VM below it) so that restrictions would exist from the guest to the host.

VentureBeat has some interesting notes regarding this project. According to them, Chrome OS director of product management Kan Liu has provided some insights, including:
“We put the Linux app environment within a security sandbox, running inside a virtual machine. We made sure the user experience is seamless to the user. Whether you use a web app, whether you are using an Android app, or whether you are using a Linux app, the window treatment and the way you launch the app from the launcher is the same.” 
Source: https://venturebeat.com/2018/05/08/chrome-os-is-getting-linux-app-support/

Integration

Still according to VentureBeat, "you don’t see the windows from the Linux side; it’s just running within a Chrome OS window" so you'll see Chrome windows everywhere not different windows as you would if you were running Wine for example.

Also, another good news is that, according to Google, it's estimated that the VM “starts up in a second.”

Security

 Apart from running apps containerized within a VM, VentureBeat still reports:
“The files are actually inside the VM as well. From a security standpoint, that’s what makes it safer. But you’ll be able to access files from both sides. If you were ever to get malware in the Linux side, for example, it can’t contaminate the rest of Chrome OS.”
Source: https://venturebeat.com/2018/05/08/chrome-os-is-getting-linux-app-support/

Requirements

Some extra requirements include some extra storage space (300MB for Linux and more for the apps) and Linux kernel version 4.4 or higher.

What's Next

Considering that we already can run most of Android apps and soon, we'll be able to also run native Linux apps on Chrome OS, Chromebooks are definitely becoming a real operating system.

The reason why I never invested time on Chromebooks is the lack of productivity tools including the terminal, compilers, source control, a robust text editor, IDEs, package management tools (apt or dnf) and other programming languages. But it will change.

I'm pretty excited about this. Hope this feature becomes stable soon enough to be able to test my favourite tools on a Chromebook.