Linux Format

Adding Crouton for a taste

Discover how to use an old-school chroot to house a brand new Linux distro that runs side by side with Chrome OS.

-

Lucky old us managed to get hold of one of the new generation of Chrome OS tablets: Google’s Pixel Slate, the i5 edition with 128GB storage, which was launched in January 2019. It’s definitely at the high end of the available Chrome OS devices, what with its delicious 3000x2000 display and expensive optional keyboard.

But for all intents and purposes, everything we do with it will apply to a regular Chromebook. That being said, there are so many devices on the market, all with their own quirks and all locked down to various degrees, that it’s not always possible to boot another OS without reflashing firmware. Flashing a new BIOS, or indeed patching and repacking the old one, is well documented, but this may require hardware modificati­on and risk bricking your machine. You can read about modifying firmwares at https://mrchromebo­x.tech.

There’s an awful lot of Linux-related hackery that can be done without recoursing to a whole new OS – we’ll talk about this in a couple of pages. One of the most popular is Crouton, a set of scripts that set up a Linux chroot on Chrome OS. This allows you to run Linux apps, or even entire desktops, from within Chrome OS. If you want to start messing with your Chromebook in a way that Google doesn’t officially endorse, whether that’s using Crouton, Chrx (see page 39) or going deep and reflashing firmware with flashrom, you’ll need to enable Developer Mode. This

isn’t really something you should do lightly, since as well as enabling you to access hitherto off-limits parts of the OS and storage, that same access is theoretica­lly possible for any malware you may inadverten­tly run.

For this reason, activating Developer Mode is a bit of a rigmarole, and has some consequenc­es. Most relevantly, any user data on the device will be deleted (‘powerwashe­d’ in Chromeos’s upbeat terminolog­y). The erasure is a security measure, the threat being that if someone stole your Chromebook and put it into Developer Mode then they’d have access to any stored user data. Similarly, when you revert to normal (Verified) mode, stateful data will once again be wiped, in case anything untoward got there while protection­s weren’t in place.

Developing issues

There’s an awful lot of tinkering that can be done without enacting Developer Mode. Accessing the Play Store to run Android apps and enabling Crostini (on supported hardware) doesn’t require Developer Mode. Also, Developer Mode shouldn’t be confused with the similarly named Developer Channel, which is where newer Chrome OS features such as Opengl accelerati­on via VIRGL are rolled out.

Anyway, on with Crouton. First we need to download the main Crouton script from https://goo.gl/fd3zc. Now open a Crosh shell with Ctrl+alt+t. Recent changes in Chrome OS preclude executing files directly from the Downloads folder, so our first task (after we start a proper shell) is to install the script somewhere it can be useful. Our second task is to use it:

> shell

$ sudo install -Dt /usr/local/bin -m 755 ~/ Downloads/crouton

Crouton can install a number of desktop environmen­ts with an Ubuntu 16.04 base. Run sudo crouton -t list to see them all. The xfce target is

probably the least likely to give you problems – or xfcedeskto­p if you have around 1GB for common apps as well. You can also use the -r switch to specify a different base distro, but bear in mind newer Ubuntu releases probably will require further persuasion to play ball. We were feeling wild and crazy so went with: $ sudo crouton -t kde-desktop After hammering the office Wi-fi downloadin­g a googol (Google it) of packages and installing them in a flurry of terminal output, the process finished without error. Hopefully the same is true for you. Check the official docs (https://github.com/dnschneid/ crouton) if you run into difficulty. Once you’ve set up a username and password you should be able to start KDE with sudo startkde or sudo startxfce4 if you went with the lighter desktop.

Our first first-world problem was that our fancy high res display was pretty illegible, and our second was that this made it hard to navigate to the display settings page and activate scaling, which requires a restart of the

chroot to take effect. Our third problem was that performanc­e was pretty terrible, and our fourth was that when we exited the chroot our graphics were heavily corrupted – switching to the console with Ctrl+alt+refresh fixed this. Apart from all that everything seemed fine, but it’s probably a better idea to go with Xfce.

If you missed it post-install, there are some handy shortcuts for switching between Chrome OS and the

chroot: Ctrl+alt+shift+back and Ctrl+alt+shift+ Refresh. When you’ve finished playing in the chroot, exit by logging out. It’s possible to add other targets, be they desktops or other package groups, to your chroot. By adding the Xiwi target we can run our desktop in a window and, by adding an extension, get a shared clipboard, which is handy:

$ sudo crouton -t xiwi, extension -u -n xenial The last two options tell Crouton to update the

chroot called xenial . You’ll need to install Chromium inside the chroot to get the shared clipboard. It’s possible to set up multiple chroots, back them up and do all sorts of things which we won’t get into. What we will get into (because now your chroot won’t work until you do) is to add the Crouton Integratio­n extension to Chrome OS. This is just a matter of visiting https:// goo.gl/ovqoet and pushing the button. Now when you re-enter the chroot, move the pointer toward the top of the screen, click the cross and hey presto – we’re in a Window. If you’re only interested in the command line stuff, you can use the cli-extra target and start the chroot with sudo startcli .

 ??  ?? We did eventually manage to get Xfce running in an Ubuntu 18.04 chroot, but taking a screenshot of it running in a window didn’t work.
We did eventually manage to get Xfce running in an Ubuntu 18.04 chroot, but taking a screenshot of it running in a window didn’t work.
 ??  ?? Running KDE Plasma really taxed our device, but we got nostalgic seeing the artwork from the older version in the Xenial repos.
Running KDE Plasma really taxed our device, but we got nostalgic seeing the artwork from the older version in the Xenial repos.

Newspapers in English

Newspapers from Australia