Project Crostini is Google’s ambitious plan to bring a full Linux desktop environment to ChromeOS. While this move will mainly cater to developers, I suspect it will be a pretty compelling feature for the general consumer market in the future (can anyone sat Steam on ChromeOS?). While the Beta of Project Crostini is pretty nice, it lacks a easy way to manage and troubleshoot common issues. This guide was put together to help with some basic maintenance and troubleshooting steps that I have come across over the past few days:
Updating the Virtual Machine
Unlike ChromeOS and Android which both offer graphical ways to update the software and operating system, the Linux virtual machine does not. Fortunately as this is simply using Debian, upgrading the operating system and applications are pretty simple to do at the command line.
Launch the Terminal Application from the Chrome Application Launcher. This will drop you directly into your virtual machine. Run the following commands
sudo apt-get update sudo apt-get upgrade
This will automatically upgrade operating system components as well as applications managed through apt repositories. This will not upgrade .deb packages you install from external sources unless they also add a apt repository (such as the Debian version of Google Chrome)
Stopping the Virtual Machine
If you ever need to stop the virtual machine forcefully, this can be done at the ChromeOS Shell (ALT + CTRL + T). You simply need to execute the following command
vmc stop termina
After executing the stop command, wait about 10 seconds and your virtual machine should halt. This could also help conserve battery if you are not using any Linux applications.
Destroying the Virtual Machine
It is awesome that Google is providing root access in the virtual machine but with great power comes great … you know the rest. It is not uncommon for any Linux novice or expert to damage a machine beyond reasonable repair. After backing up any important data, you can execute the following commands to destroy the virtual machine.
vmc stop termina vmc destroy termina
After about 10 seconds, relaunch the “Terminal” application in your Chrome Application launcher and it should provision a new virtual machine.
Display Errors When Opening Applications
Sometimes you may get error messages such as “Error: cannot open display: :0” when launching a Linux Application. This can sometimes be fixed by stopping the virtual machine and re-launching the application (vmc stop termina). If you are still unable to re-launch the application, a reboot of your Chromebook may be necessary.
I must point out that all GUI Applications launched with “sudo” such as “sudo firefox” will always fail with the same error message. I am not aware of a workaround.