Initial Setup
First, follow the Quickstart instructions
here.
You now have two things set up – a VM called termina and a container inside
of that VM called penguin. This VM and container are “special” – files within
penguin are accessible via the Files app and any GUI applications installed
inside of penguin will be accessible via the launcher. Other than that,
penguin is just a regular debian stretch
LXC container.
To access a shell inside of pengiun (which is inside of termina), simply
launch the Terminal program. This starts the termina VM (if not already
started), starts the penguin container (if not already started) and drops you
in a shell.
Configure Terminal
Annoyingly, the terminal bell is enabled by default. From within the Terminal
program, press ctrl + shift + p. Here you can disable the bell, change your
font size, etc.
Set Up Crosh
To create new VMs and containers you use crosh (Chrome Shell). You can launch
it from inside of Chrome with ctrl + alt + t. Launching crosh in a Chrome
tab isn’t ideal, though, because you can’t do things like switch windows in vim
(e.g. ctrl + w + l) without accidentially closing the tab in Chrome. To
solve this, install two extensions:
This will give you a launchable program called Crosh Window that runs crosh
in its own window. From inside Crosh Window, you’ll want to press ctrl + shift + p again to disable the bell and configure it to your liking.
Fix Some penguin Issues
The penguin container is where you want to do most of your work because it is
tied into the rest of Chrome OS. That said, there’s one particular oddity it has
– your user does not, by default, have a known password. This is a problem if
you want to change your shell (among other things). To fix this we’ll connect to
the container from crosh as root.
First, launch Crosh Window and connect to the termina VM.
vmc start termina
Once connected to termina, connect to penguin as the root user using the
provided run_container.sh script.
run_container.sh --container_name penguin --user root --shell
Now, you can change your user’s password
passwd <username>
Back in the terminal app, you should be able to change your shell.
sudo apt-get update
sudo apt-get install zsh
chsh -s /bin/zsh
Get a Working tmux
Google has done some special
things
to the Terminal app and penguin to keep the text sent to the shell secure.
Unfortunately this doesn’t play nicely with the provided version of tmux in
debian stretch. To solve this we need to install the backports apt repo and
install the newer version of tmux.
Add the following line to your /etc/apt/sources.list file:
deb http://ftp.debian.org/debian stretch-backports main
Now install tmux from the backports repo.
sudo apt-get update
sudo apt-get install -t stretch-backports tmux
Install a GUI linux app
From inside of penguin, run:
sudo apt-get install libreoffice
Now you can launch Libre Office directly from your launcher, no extra work
required. Note that you can move files back and forth between Chrome OS and the
linux container via the Files app (you’ll see a special Linux Files section
on the left).