Skip to content

Troubleshooting and Working With Linux in Project Crostini

K

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:

Disclaimer: This Page Has Been Archived

Please note that this blog post has been archived and may contain information that is outdated, defunct, or covers topics that are no longer of interest. It is being kept available solely for reference purposes, in case others might find portions of it useful.

For more recent and up-to-date tutorials, I recommend visiting KMyers.me or other websites that specialize in the topic you are interested in. It is always advisable to seek the most current information to ensure accuracy and relevance.

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. While this is often a very bad idea, the workaround is to run the following command prior to any application launched with sudo

xhost +