Open Source News

A SysAdmin's Journey into Chrome OS - Part 2

Disclaimer

  • This article it not intended to be an endorsement or review of anything. I do not intend to spend time talking about setting up or how to use a Chromebook; there are many many websites out there that do an excellent job of that. This is just documenting my experiences with Chrome OS, and its appropriateness to my work as a Systems Administrator.
  • All statements and opinions are mine alone.

Part Two: Taking it to the next level

In my last post, I talked about my initial impressions of Chrome OS and the Pixelbook. By and large, my first few days with the device were pretty favorable. There are certainly some quirks and annoyances, and some new things to get used to, but I was pleased with the native Chrome apps and how well Android apps work in Chrome OS.

So, before we dive into using a Chromebook for work, let's review my scorecard of frequently used work applications:

  • Personal email, calendar, docs, etc: Check. All covered by default applications
  • Work email, Calendar, docs, etc.: Eh, sorta. I can use the Chrome profiles feature to load them, but it's cumbersome.
  • Slack: Check
  • Zoom: Check
  • KeePass: Check
  • Simplenote: Check
  • Terminal applications: Not yet.
  • Global clock: Not yet.
  • Text editor: There's a built in text editor called Text. I haven't done a lot with it, but it appears pretty simplistic, and probably not adequate for daily use, and certainly not for coding.
  • Google Hangouts: Check
  • File Manager: Check
  • VirtualBox for running Virtual Machines: Nope

So now, let's see about filling in some of the blanks, and to do that, I'll be using the feature that prompted me to buy a Chromebook in the first place: Running Linux apps natively. Starting with stable version 69, Google introduced support for running Linux apps using something called Project Crostini. You enable this by going into Settings, scroll down to "Linux (Beta)" and click on Enable. (Yes, technically this feature is still in Beta. If you don't see "Linux (Beta)" in your Settings, then sorry, your Chromebook does not support Linux. Note too that some older Chromebooks may require extra steps to enable Crostini.) You'll need to wait some while the Chromebook downloads and installs a Linux Virtual Machine. Eventually it will finish, and you will have a new app group in your app list, called "Linux apps", with just one application (so far): Terminal.

Running Terminal will place you in a Linux shell. If you're a Linux user like me, you will be in familiar territory. Technically what is going on here is Chrome is running a Linux VM named "termina". This VM in turn is running a LXC container named "Penguin", which is where you are when you run Terminal. There are also few settings for the Terminal app that you can tweak. You can get to those with this shortcut: Ctrl+Shift+P.

(Slight annoyance: About half the time when I run the Launcher and type "terminal" to run the Terminal app, it doesn't start. I have to repeat to get it to run. No idea why.)

Penguin is a bare bones, essentially "headless" (no desktop) installation of Debian Stretch (9.x) (Debian, yay!). From the command line you can install Linux applications using the Debian APT package manager. Any Linux apps installed (with a GUI) will show up in the Linux Apps group in your Launcher. They can also be run by hitting the Launcher and just typing the name of the app, just like any Chrome or Android app.

It's important to note that, like the Android apps, Linux apps run in a container isolated from the root Chrome OS; it cannot interact directly with apps or resources in Chrome. For example, since I intend to travel with this device, I installed the Android app OpenVPN Connect. This works fine in Chrome OS, BUT the Penguin container does not "see" the network change and will not use the VPN connection. In addition, because of the limited nature of the container and some of the restrictions in place, I discovered I could not run OpenVPN within Penguin (if you want the technical reason, it couldn't modify the tun interface). Just be aware of this.

Enabling Linux will also add a new folder to the Files app, called "Linux files". Any files you create in the home directory of Penguin will show up here, but Penguin cannot directly access other folders in the Chrome file system. If you want to make a file available to Penguin, you have to use the Files app to copy it to the Linux files folder.

These caveats aside, and despite still being in "beta", Crostini seems to work pretty well. And the Terminal app filled in one of my missing applications: a ssh client. From the Terminal app I can ssh to my home servers, my primary work computer, and to work-related servers. (TIP - Create a .ssh/config file with shortname alias for each server you want to ssh to, with the IP and the user to login as. And create a ssh key-pair. You'll save yourself a lot of typing.)

Once I had Crostini running, I was able to install some apps to fill in the gaps. First off, I installed Google Chrome in Penguin. That Chrome then served as my "work" browser, configured for my work account. This gave me back my "separation" of work and personal browsers.

TIP - If you're using the Launcher and typing out app names to Launch them, the Chrome OS native browser will be labeled just "Chrome", and the Linux version will be labeled "Google Chrome", so that's how you can tell them apart.

I also installed Geany, my preferred GUI IDE editor (of course, my favorite Linux editor is still Vim). This filled in two more gaps in my work app list.

Be advised, as I mentioned above the Penguin container is *really* bare bones. There is no desktop. Yes, you can install a desktop in Penguin, like Gnome or XFCE, but I wouldn't recommend it. You can't access that desktop directly; you have to install a VNC server in Penguin and a VNC client in Chrome, and use *that* to access the desktop. And even doing so, the experience is not very good (I tried it). Also a lot of apps and command line tools you might expect are not there by default, and need to be installed. Note too that the time zone is set to UTC by default, so you probably will want to change that.

I mentioned I could use ssh in Penguin to connect to a remote server. However there is another good option for that, and it doesn't involve using Crostini at all. There's a Chrome Web store app called "Secure Shell App". This is a little more full featured terminal application than that in Penguin (although it still doesn't support tabs, like my favorite xfce4-terminal app). You can setup connection profiles, and you can even tell it to use a ssh keyfile for connections, although since it's a Chrome application it can't use any ssh keys you might have created in Penguin; you will have to store the key in the Chrome filesystem, e.g. Files -> My files -> Downloads -> ssh.

Big bonus: Secure Shell App can SFTP mount a directory on the server to which you connect, and that mount will show up as a folder in Files. You can even specify which folder on the remote server to mount in the Secure Shell App profile (I recommend creating different profiles for just-ssh and for SFTP mounting). It's pretty cool, and makes copying files from a home file server to Chrome OS a lot easier. To disconnect the SFTP mount, right click on it in Files and choose "Close".

So, we've filled in a lot of gaps in what I needed. However, Crostini does have some shortcomings. As of this writing, Crostini does not enable the GPU (graphics processing unit), which slows downs performance. Linux apps also can't access the USB ports, or some other parts of the hardware, and no VPN access. Linux apps just don't "look" as good, and some apps may also have a problem with the resolution scaling used in Chromebooks. (Google is supposedly working on addressing some of these shortcomings.) And it's not a full Linux desktop experience.

And I have another nit to pick, this time with how Chrome OS works rather than directly due to its Linux support. If you have an app open, and then run the Launcher and select or type in the name of that app again, it will just take you to the already open app. I think I mentioned last time that I use a lot of terminal sessions in my daily work. You can run multiple Penguin terminals, or multiple Secure Shell sessions, but doing so requires opening the Launcher, right clicking (remember, that's a two-finger tap) on the icon and selecting "New Window" from the pop-up. Kind of a pain, and not nearly as easy as the keyboard shortcuts I have setup on my Xubuntu machine.

One missing application is my multiple time zone clock. The apps I've looked at so far in the Web and Play stores don't really do what I want. As a temporary workaround, I added these two lines to the bottom of my .bashrc file in Penguin:

alias tzs='TZ=America/New_York date ; TZ=America/Chicago date ; TZ=America/Denver date; TZ=America/Phoenix date; TZ=America/Los_Angeles date'

tzs



This creates an alias that displays the current time in the major continental US time zones, and runs that alias every time I log in. When I need the updated time, I can just run 'tzs' again. (You can also install tzwatch in Penguin, but it doesn't really do much more than what my alias does.)

One final TIP for today: I found that at times certain things would suddenly stop working properly. For example at one point I could not get the caps lock shortcut (Alt+Launcher) to work. Frequently when these quirky problems would show up, I found I could just shutdown the Chromebook and restart, and the problem would clear up.

So, let's follow-up with the app scorecard:

  • Personal email: Chrome
  • Work email and Google applications:
    • Can run in base Chrome browser by clicking on profile icon and choosing other account.
    • Can also run in dedicated Chrome browser launched from Penguin (i.e. as a Linux app).
  • Slack: Chrome app
  • KeePassDroid: Android app
  • Simplenote: Android app
  • Terminal: Built in Terminal (Penguin), and Secure Shell Chrome app
  • World time clock: No Chrome option found yet I like, but I have a command line workaround.
  • Text editor: Chrome Text app, vim in terminal session, Geany Linux app.
  • Hangouts: Chrome extension
  • File manager: Chrome Files
  • VMs: Still nope.

So we're pretty much there. Still, it's not a full Linux experience.

Next time: The Whole Shebang.

Continuing Reading A SysAdmin's Journey into Chrome OS

A SysAdmin's Journey into Chrome OS - Part 1

A SysAdmin's Journey into Chrome OS - Part 3

Read more by Larry Baerveldt

Tags chrome, chromebook