Introduction
Google has provided a list of devices that before 2019, could still have Crostini
installed. After 2019 all devices are expected to offer Crostini
support. Crostini
isn’t an operating system. Rather, it is a Linux application support to work with Chrome OS. It integrates well and it’s easy to use. We can install an Arch Linux distribution in it for example. This year I bought my first Chromebook
. This was model C302C. It is pretty affordable. Unfortunately for whatever reason, it doesn’t seem to provide any support for Crostini
anyway! This is the reason why I wrote this article and also why I think it’s still very relevant. We are going to see how to install another alternative environment with Linux in it. My Google Chrome OS is version 83.04091.0.
Going through the intricacies of the Google Chrome OS operating system I realized that this is an operating system brilliantly made for an average user. We can download and use our favorite google store apps, play our music on Spotify, watch videos on YouTube, make our TikTok videos, with the extra advantage of being able to work with it as if it was a common computer. With this system, we can still make our PowerPoints, send our emails, use Microsoft Office, make Word documents, Excels, use Note, and browse endlessly through the Web. Further we can also watch our favorite series and videos using NetFlix. A system like this can be a blessing if we have to commute a lot to and back from work and of course for any long trip. However, when I dove into this system I immediately had this dilemma:
Everything is so great and yet so different! How does this work for a Software Engineer?
Let’s turn our Chrome OS machine into a powerful DevOps machine without changing its operating system!
Notes
With this article I’m providing a quick guide on how to turn our Chrome OS machine into a powerful DevOps machine. The goal is to provide a guide instead of a rule. These are the steps that have worked in my case and I’m sharing them with you in order to help you. More details can be found on the source references I placed on the last card. Let’s begin!
Preparation
Before we start, there are a few things to be aware:
- All our local data will be removed. I could not find a way around it at this point.
- We need to make sure to back up everything we need in your machine.
- The first step may take up to 15 minutes and so we also need to make sure our battery is fully charged or that your machine is connected to the power supply.
System Setup
- Let’s turn your machine off.
- We press ESC + REFRESH key combination and press the ON button in this order. (It’s important to notice that the refresh button icon may take different shapes in our keypad).
- We let go of the ON button while keeping the other keys on.
- We let go of the other keys afterward.
- Let’s wait for a screen to pop up. It should say something like: > Please insert a USB stick or SD card
- We press CTRL-D.
- We should now get a screen that says something like:
- To turn OS verification OFF, press ENTER. > Your system will reboot and local data will be cleared. > To go back, press ESC (escape).
- We press ENTER.
- This process will take anything between 5 and 15 minutes and will show us the following message: > Preparing system for Developer Mode. > This may take a while. > Do not turn your computer off until it has restarted.
- After restart, we should get this message: >OS verification is OFF. Press SPACE to re-enable.
- We will press CTRL-D instead.
- Our computer should now start normally and although it looks like an ordinary machine, it has underwater given us more system rights.
Download Software
In order to be able to work with our Chrome OS machine as a DevOps engineer, we need to have some sort of Linux shell, and we need to be able to run executable files and install software. For chrome
we have crouton which is the Chromium OS Universal Chroot Environment.
To best follow further instructions, let’s take note that we will download everything into the default ~/Downloads folder. Also, important to notice, is that at the end of this section we will have a Chrome OS environment
and an Xfce
Desktop Environment distributed by Xubuntu
.
Before we continue let’s make sure we download the software we are going to need for Xfce.
- Chrome — We’ll download the Debian version.
- Intellij Toolbox — We are going to install a basic JetBrains development environment. We are quite free to choose other tools like Eclipse.
- Crouton — At the bottom of their Git page we find the link to it in the chapter Usage: https://goo.gl/fd3zc. This will download a bash script which will download and install Xfce in your machine.
Extending our OS
Let’s begin:
- With our Chrome browser opened we press ALT + CTRL + T. This will open the crosh prompt.
- Let’s open the shell by typing shell and pressing ENTER.
- We can now install crouton. Let’s take into consideration that xfce is one of the many crouton comma-separated params we can add. If we have a touch screen machine, we can add touch. If we want to use the integration extension we can use
xiwi
(i.e.xfce
,touch
,xiwi
):
sudo sh -e ~/Downloads/crouton -t xfce
- We fill in all the details it asks us for, and we should finally get this output:
Please specify a username for the primary user: jesperancinha
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Here's some tips:
Audio from the chroot will now be forwarded to CRAS (Chromium OS audio server),
through an ALSA plugin.
Future Chromium OS upgrades may break compatibility with the installed version
of CRAS. Should this happen, simply update your chroot.
You can flip through your running chroot desktops and Chromium OS by hitting
Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.
You can start Xfce via the startxfce4 host command: sudo startxfce4
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...
Done! You can enter the chroot using enter-chroot.
chronos@localhost ~ $
- We are ready to start up our environment. To start our Linux Xfce environment, let’s just run:
sudo startxfce4
Xfce Visual Setup
- Once we are in Xfce, we should see the following screen:
- Depending on the system, we may find that our machine has an issue with characters. To fix this we have to go to Applications -> Settings -> Appearance -> Fonts. We should see something like this:
- Let’s just pick a font that we like and that contains all characters.
- Finally we may find it important to take screenshots to make documentation. To do that we only need to configure a shortcut to print screen. Let’s got to Application -> Settings -> Keyboard -> Application Shortcuts. We should be looking at this:
- All we need to do is press Add. It will show us a pop-up like this:
- Let’s fill in xfce4-screenshooter -w. This switch will allow us to take a screenshot of the current pop-up window. We can also use -r to just take a screenshot of a selection.
- The following popup will ask you to press your key combination. In the example setup we see that for this command line there are two shortcuts configured SHIFT + CTRL + F4 and SHIFT + CTRL + F5. This isn’t a standard and it’s up to the user to choose the matching favorite combination. As a fair warning, be careful with this next popup window as it is extremely sensitive. It will also recognize an F key as the configuration finish.
Xfce Utilities Setup
As of this moment, your Linux “Machine” is ready for all our DevOps activities. In this chapter, however we are going to have a look at the command recipe, I used to set up the main Linux utilities that I love and I think are very much needed in a developers' environment. Let’s open the terminal at Applications -> Terminal Emulator. Here is this recipe:
cd ~/Downloads
tar -xvzf jetbrains-toolbox-1.16.6319.tar.gz
cd jetbrains-toolbox-1.16.6319
./jetbrains-toolbox
- Now, we should see the user agreement notice of JetBrains:
- All we need to do is go further with this installation and just install according to the instructions given
- As a standard, I recommend to install IntelliJ. I will mention it further.
- To install the rest of the utilities and Chrome, I faced a couple of issues and these are the next steps of this recipe:
sudo su
apt-get install fonts-liberation
apt-get -y -f install
apt -y install git
apt -y install maven
apt -y install npm
apt -y install libappindicator1
apt-get -y -f install
apt -y install curl
apt-get -y install gitk
- And finally we can install chrome
cd ~/Downloads
dpkg -i google-chrome-stable_current_amd64.deb
- One of the greatest utilities out there for Java developers is SDKMAN which works as a package manager for compilers. As describe in their page, the following are the steps to make this successful
sudo curl -s "https://get.sdkman.io" | bash
sudo source "$HOME/.sdkman/bin/sdkman-init.sh"
- Because we need SDK man for our regular user let’s also run the latter command as a non-root user.
exit
source "$HOME/.sdkman/bin/sdkman-init.sh"
- Please check SDKMAN’s website for more details on how to install multiple SDK’s
- If everything has been successful, we are now able to run Maven, Git, Curl, npm, Chrome and Intellij. We can also compile code in Java.
- Finally, just a final note on SDK installation with SDKMAN’s. All environments we select and install, are saved in ~/.sdkman/candidates. This is important if we want to configure our environment in Intellij with certain Java, Gradle, or other compiler distributions and versions.
After we are done with all of this, we need to know how to switch from Xfce to Chrome OS and vice versa. This can easily be done with the following combination of keys:
SHITF+CTRL+ALT+BACK
andSHIFT+CTRL+ALT+FORWARD
. It’s important to notice that the BACK and FORWARD navigation keys are the ones at the upper left side of the keyboard. They are also defined as the F1 and F2 keys.
Conclusion
We have seen pointers on how to turn our Chrome OS machine into a powerful and handy DevOps engineering machine. It is also a description of my own personal experience with a Google Chrome book. In the end a Chrome book is also a great computer, it has different look and feel, different commands, but we can still run our favorite Linux commands and make the most of it. Essentially in this guide, we started out with this:
and we have added this:
I hope you have enjoyed this as much as I enjoyed writing them and I hope to have helped anyone with blocking issues. I found lots of guides on the internet but eventually some things I had to find on my own. This is why I decided to share my experience with you.
I have run these steps in a ASUS C302C
google notebook with a pre-installed Chrome OS version 63.0.3239.116
(Official build) (64-bits). Then I changed this version to 83.04091.0
.
I hope that you have enjoyed this article as much as I enjoyed writing it.
I’d love to hear your thoughts on it, so please leave your comments below.
Thanks in advance for your help, and thank you for reading!
References
Top comments (0)