Displaying items by tag: Chromebook

Monday, 28 January 2019 21:21

Install Ubuntu Linux On Any Chromebook

Chromebook Linux


I have a HP Chromebook G4 from 2014 that won't receive official Linux (Crostini) support, so I decided to use Crouton to install Ubuntu instead.

I thought some of you might be interested in this, so this article presents step by step instructions for installing Ubuntu on any Chrombook model, using Crouton. There are also a few tweaks / tips, and instructions for removing it.

Crouton, or Chromium OS Universal Chroot Environment, makes it easy to install Ubuntu or Debian in a chroot environment on Chromebooks, no matter the Chromebook model or architecture. Using Crouton, you continue to use Chrome OS, but you can easily switch between Ubuntu and Chrome OS when needed.

Compared to the Crostini solution for Chrome OS offered by Google, Crouton has wider device compatibility, and it enables direct hardware access. Also, compared to virtualization, Crouton has zero speed penalty since it runs natively.

On the other hand, Crostini is an official project and doesn't need enabling developer mode (which is required to be able to install Ubuntu or Debian on a Chromebook using Crouton). Since your Chromebook runs in verified mode, it also means Crostini is more secure.



Install Ubuntu on a Chromebook using Crouton

Switching your Chromebook to developer mode is insecure! Crouton supports encryption, but as the Crouton wiki page mentions, "the encryption is only as strong as the quality of your passphrase".

Before you proceed:

  • Backup your data. Google backs up your passwords, browser extensions and so on, but you may want to back up the files that you've saved in your Downloads folder though.
  • You may want to create a restore image for Chrome OS by installing the Chromebook Recovery Utility extension. You'll need a 4 GB or larger USB flash drive or SD card.

1. Switch your Chromebook to developer mode.

Installing Ubuntu on your Chromebook with Crouton requires switching the Chromebook to developer mode.

Enabling developer mode may vary depending on the Chromebook model you're using. You can find out the instructions for switching your Chromebook to developer mode by visiting this page, clicking on your Chromebook model, then follow the instructions.

From what I've seen, these are the instructions for most models: invoke Recovery mode by holding down the ESC and Refresh (F3) keys, and poking the Power button. After entering Recovery, press Ctrl + D (there's no information about this displayed on the screen - you have to know this to use it). It will ask you to confirm and then reboot into developer mode.

This may take a while!

From now on, each time your Chromebook boots up, you'll need to press Ctrl + D or wait 30 seconds to continue. Don't press the SPACE key as it will reset!

2. Download Crouton.

Go to the Crouton GitHub project page and click the goo.gl link at the top of the page to download the latest version of Crouton. This is a direct link to the latest Crouton download (it may change though). Leave the downloaded file in the Downloads folder.

3. Install Ubuntu

Crouton install Ubuntu Chromebook

Now it's time to install Ubuntu on your Chromebook. To do this, open the crosh shell by pressing Ctrl + Alt + T. This should open a terminal-like tab. Type:


Now you can type the following command to see the Crouton help text:

sh ~/Downloads/crouton

To install Ubuntu 16.04 with the Xfce desktop (a lightweight desktop environment), and enable encryption, use this command (don't run it before reading what everything does and how to customize it):

sudo sh ~/Downloads/crouton -e -t extension,keyboard,audio,xfce

-e adds encryption and -t specifies installing the following targets: 

  • extension: clipboard synchronization and URL handling between Chrome OS and Linux (requires installing the Crouton Integration Chrome extension)
  • keyboard: adds support for Chromebook keyboard special keys
  • audio: adds support for audio playback via Chromium OS's audio system
  • xfce: the Xfce desktop environment


Xfce desktop running on a Chromebook (via Crouton)

You can see all the available targets (which are not just desktop environments, but may also be predefined package lists, like touch for touchscreen gesture support, etc.) by running:

sh ~/Downloads/crouton -t help

Crouton can also install e17, Gnome, KDE, LXDE, and Unity desktops. Also, you can specify multiple targets by separating them using a comma.

You can also install the xiwi target to allow running Ubuntu in a Chrome OS tab or window (unaccelerated). This requires installing the Crouton Integration Chrome extension. A screenshot of this can be found at the top of the article.

While Crouton installs Ubuntu 16.04 by default, you can specify a different Ubuntu version (either older, like 14.04 - trusty, or newer like Ubuntu 18.04 - bionic), and even Debian or Kali Linux. To change the installed Ubuntu (or Debian / Kali) version, append -r  to the installation command. For example, to install Ubuntu 18.04 Bionic Beaver instead of 16.04 Xenial Xerus, the command to install Ubuntu on your Chromebook becomes:

sudo sh ~/Downloads/crouton -e -r bionic -t extension,keyboard,audio,xfce

You can see all the available Ubuntu, Debian and Kali releases that you can install on a Chromebook, use this command:

sh ~/Downloads/crouton -r list

Some versions are not officially supported though, but they may work. This includes Ubuntu 18.04 Bionic Beaver!

How to use Ubuntu installed on a Chromebook using Crouton

To start Ubuntu (with Xfce desktop environment) on your Chromebook, press Ctrl + Alt + T to open a crosh shell, then type:

sudo startxfce4

You'll be prompted to enter your password, encryption password, and then Ubuntu will start.

The command used to start it varies with the desktop environment you've installed, and is displayed after completing the installation. So if you've installed KDE, use sudo startkde, and so on.

Switch between Chrome OS and Ubuntu using Ctrl + Alt + Shift + Back and Ctrl + Alt + Shift + Forward. This way you switch between Ubuntu and Chrome OS without exiting Ubuntu.

To exit Ubuntu, log out from the menu present on the top panel.

A few tweaks for your new Ubuntu (Xfce) desktop running on a Chromebook

1. There's no graphical tool installed by default to find and install new applications. You can install Ubuntu / Gnome Software application by opening a terminal on your Ubuntu desktop running on top of Chrome OS, and typing the following command:

sudo apt install gnome-software

Normally you could now launch the "Software" application from your applications menu (System -> Software). But launching the Software application from the menu doesn't allow you to install any packages, displaying an error about not having permissions to install any packages, and I didn't find any way to fix this. But there is a workaround that can be used. Instead of launching Gnome / Ubuntu Software from the menu, you can launch it like this:

  • In Ubuntu 16.04 Xenial Xerus (default Crouton Ubuntu version):
gksu gnome-software


sudo -H gnome-software

If you still can't install applications using the Software app, log out (and make sure you don't enable saving your current session on the Xfce logout screen) and try again. Or try killing any background-running gnome-software instances using killall gnome-software, and try again to install some software.

You will only be able to install regular (DEB) packages using Gnome Software. Installing snap packages doesn't seem to work, or at least I couldn't find a way to make it work. Installing snap packages doesn't using any installation method you may try - using Ubuntu Software or from the command line.

2. You might want to add third-party PPA repositories, which you'll find in many online guides for installing various software that's not available in Ubuntu directly. But this command does not work by default when installing Ubuntu on a Chromebook using Crouton.

To enable the add-apt-repository command you'll need to install a package called software-properties-common. Open a terminal on your Ubuntu desktop and use this command to install it:

sudo apt install software-properties-common

3. The default Crouton setup for Xfce may be a bit... ugly. To fix this, go to the applications menu -> Settings -> Settings Manager and change:

  • Appearance -> Icon tab: change the icon theme to elementary Xfce darker
  • Window Manager -> Style tab: change the theme to Greybird

This is how the window borders and icons will look after this change:

Crouton Xfce theme tweaks

You may also try the other themes to see which one you like the most, or install more themes.

How to uninstall Ubuntu (installed using Crouton) from Chromebook

If you want to completely remove Crouton, you can reboot your Chromebook and press SPACE while booting to turn on OS verification. This will reset the Chromebook / Chrome OS.

You can also recover your original Chrome OS installation, in case you've created a backup using the Chromebook Recovery Utility.

If you only want to delete the chroot created when you installed Ubuntu with Crouton, exit Ubuntu (by logging out), and in Chrome OS press Ctrl + Alt + T, then type:


Next, use this command to remove Ubuntu:

sudo delete-chroot 

Replacing  with the Ubuntu version codename. By default this is xenial. If you've installed Ubuntu 18.04 Bionic Beaver, its codename is bionic

If you don't know the Ubuntu version / chroot name, you can get a list of the chroot names you have installed by using this command:

sudo edit-chroot -a
Published in GNU/Linux Rules!
Saturday, 26 January 2019 14:46

Install Cinnamon Desktop On A Chromebook

Ubuntu or Debian in a chroot environment on any Chromebook model, without removing Chrome OS.




You can read more about Crouton and installing Ubuntu on a Chromebook using it in an article I posted a while back: Install Ubuntu Linux On Any Chromebook

Crouton used to have a target which allowed easy Cinnamon installation, but that's no longer available. Installing Cinnamon desktop on a Chromebook using Crouton is still possible, and this article guides you through this process. 

Cinnamon installed on a Chromebook using Crouton (in Ubuntu 18.04)

Cinnamon is a desktop environment that's derived from Gnome 3 but using a traditional desktop layout, being the main desktop environment of the Linux Mint distribution. Since Crouton doesn't support Linux Mint, Ubuntu 18.04 (Bionic Beaver) will be used as the Linux distribution on top of which we'll install Cinnamon desktop.

Install Cinnamon on a Chromebook with Crouton (Ubuntu 18.04)

Note: if you close tab in which you run the commands below, remember to type shell after pressing Ctrl + Alt + T or else the commands won't work (you need to type shell if the prompt looks like this: crosh>).

This article assumes you've already switched your Chromebook to developer mode and you've downloaded Crouton in your Chromebook's Downloads folder. 

1. Install some basic Crouton targets in a new Cinnamon chroot using bionic (Ubuntu 18.04) as the Ubuntu version.

In Chrome OS press Ctrl + Alt + T to open the crosh shell as a new tab in Chrome, then type:


Now use the following command to create a Cinnamon chroot and install the core, cli-extra, xorg, keyboard, audio and extension targets for Ubuntu 18.04 (bionic):

sudo sh ~/Downloads/crouton -n cinnamon -r bionic -t core,cli-extra,xorg,keyboard,audio,extension

You can skip the keyboard, audio and extension targets but you may need them in the future (you can add them later on though).

We're using bionic because it has a more up to date Cinnamon version. It's still not the latest version though, but you could use a PPA to install an even newer version. But for this guide we'll stick to the Cinnamon version provided by Ubuntu 18.04 Bionic Beaver. The default Crouton target uses Ubuntu 16.04 (Xenial Xerus), which has Cinnamon 2.8.6, released back in 2015.

2. Install Cinnamon in the new "cinnamon" chroot

Use this command to enter the cinnamon chroot created in step 1:

sudo enter-chroot -n cinnamon

And now type the following command to install the Cinnamon desktop and dbus-x11:

sudo apt install cinnamon dbus-x11 xterm

It may take quite a while until Cinnamon is installed, so go grab a cup of coffee... or two. You could also install the complete Cinnamon desktop, as available in the Ubuntu 18.04 repositories (this does not work if you use a PPA), by installing the cinnamon-desktop-environment package, but that will result in a very long installation time and a lot of extra packages being installed.

It's important to mention that installing dbus-x11 is very important - without it, you'll see an error when trying to start Cinnamon, which says "Could not connect to session bus: usr/bin/dbus-launch terminated abnormally without any error message".

Also, the command installs XTerm because the Gnome Terminal app that's installed with Cinnamon doesn't start. So later on when you want to launch a terminal your Cinnamon desktop, launch XTerm instead of Gnome Terminal. You can also install Tilix or some other terminal emulator.

3. Setting up a script to start Cinnamon

Assuming you're still in the Cinnamon chroot (if not, type sudo enter-chroot -n cinnamon), type the following:

echo "exec cinnamon-session" > ~/.xinitrc

Next, while still being in the chroot, use this command to download a script that starts Cinnamon (you can inspect it here) in the Downloads folder, and make it executable:

cd ~/Downloads

wget https://gist.githubusercontent.com/logix2/4d877912dcde328daf629826b4fd4fc9/raw/c612616e89b53591b04594f83ad9f0c7c1b232b8/startcinnamon

chmod +x startcinnamon

And exit the chroot:


Now in Chrome OS, use this command to copy the startcinnamon script to /usr/local/bin:

sudo cp ~/Downloads/startcinnamon /usr/local/bin/

The Downloads folder is shared between Chrome OS and the chroot, that's why you can copy the startcinnamon script on Chrome OS, even though it was downloaded in the Cinnamon chroot. We've downloaded it by using the chroot so we cam use wget.

The Cinnamon start instructions are based on Tenn1518's crouton-cinnamon repo.

4. Starting Cinnamon

Now you can start Cinnamon by typing:

sudo startcinnamon

If you've closed the tab from your Chrome OS browser, open a new crosh tab by pressing Ctrl + Alt + T, type shell, followed by sudo startcinnamon on a new line. This is how you'll start Cinnamon from now on.

Switch between Chrome OS and Cinnamon by using Ctrl + Alt + Shift + Back and Ctrl + Alt + Shift + Forward. This way you switch between Ubuntu / Cinnamon and Chrome OS without exiting Ubuntu.

To exit Cinnamon / Ubuntu, log out from the menu present on the Cinnamon panel.

Tweaking Cinnamon running on a Chromebook with Crouton

1. Installing some basic applications

Cinnamon is pretty bare-bone when installed on a Chromebook. You get Nemo, the default Cinnamon file manager, but quite a few essential applications are missing.

Let's install some important applications. Start Cinnamon, open XTerm (or some other terminal emulator that you've installed, but not Gnome Terminal because, like I explained above, it doesn't start) and use this command to install Ubuntu Software Center (Gnome Software), a graphical text editor (Gedit), a command line text editor (nano), image viewer (Eye of Gnome), video player (VLC), Gnome System Monitor (for viewing CPU/memory usage, etc.) and software-properties-common (so you can add PPA repositories):

sudo apt install gnome-software gedit nano eog vlc gnome-system-monitor software-properties-common

It's worth noting that Cinnamon now uses its own fork of some Gnome applications, but those are not available in the Ubuntu repositories (except Nemo file manager).

You won't be able to launch the Software application, used to install additional software, from the Cinnamon menu. Instead, open a terminal and launch it using this command:

sudo -H gnome-software

If the application doesn't list applications, try to restart Cinnamon. On my Cinnamon Crouton installation, Gnome Software doesn't show any applications on its homepage, but the category pages do list applications, and the search works as well.

Gnome Software app

You can use Gnome Software to install "traditional" DEB packages from the Ubuntu repositories or from PPA repositories, but it can be used to install Snap or Flatpak packages. Such packages can't be currently installed if you're using Crouton.

There's also an alternative. You can use Synaptic as a graphical tool to install additional software. You can install it using:

sudo apt install synaptic

Synaptic too must be started from a terminal, like this:

sudo -H synaptic

2. Install and use some extra themes

Default theme used after a bare-bone Cinnamon installation in Ubuntu 18.04:

Cinnamon running on a Chromebook, using Numix GTK theme (for window borders and controls) and Moka icon theme:

If you don't like the default applications and icon theme, you can install some more. This commands installs a couple of Gtk as well as icon themes:

sudo apt install numix-gtk-theme greybird-gtk-theme suru-icon-theme moka-icon-theme

You can now use one of these themes by going to the menu > System Settings > Themes, and changing the Window borders, Controls and Icon themes.

How to uninstall (delete) Cinnamon from your Chromebook



Now you can use the command that follows to delete the Cinnamon chroot (assuming you used the "cinnamon" chroot name, as used in the instructions from this article):

sudo delete-chroot cinnamon

 Remember: If we share content related to GNU / Linux we are contributing to the free software project!

Published in GNU/Linux Rules!