One of the most read posts on About Chromebooks is from last April when I detailed how I was coding with my Pixelbook. Technically, I wasn’t coding on the Pixelbook, because my solution was to remotely access a Raspberry Pi that had Python installed on my local network. Thanks to the addition of Linux containers through Project Crostini in Chrome OS, I don’t have to rely on — or be limited to — another computing device for my coding.
Note that my “coding” needs are rather meager: I’m not a full-time developer but I am enrolled in a Computer Science certificate program at my local community college. Depending on your coding needs, a Chromebook may or not work for you. And there are other options out there to make this work; I stayed away from the main one called Crouton for these reasons I specified last year:
I should note that there are several ways to do this. I wanted a method that didn’t require using Developer Mode and Crouton scripts — which does slightly water down Chrome OS security — nor the cloud since most of those solutions can add up as you might pay for processing time. So for me the best option was something more localized, didn’t require any Chrome OS modifications and would have a set, low cost.
Last semester, I relied on a Microsoft Surface Pro for class; this semester, I’m all in on the Pixel Slate, thanks to Crostini, which runs the Debian distro of Linux in a secure container. It’s seamless and appears native, alongside the Chrome browser and Android apps on my Pixel Slate, as shown above.
Since Crostini supports a full Linux command line environment and GUI apps, using my Pixel Slate for development is not very different from using a traditional PC with Linux installed. For example, to install IntelliJ IDEA or Sublime Text, I use the same Linux installation instructions as any other Linux user.
In our first class, we also used a student-friendly IDE called jGRASP, which is an open source program. It has some of the best debugging tools, so I’ve also installed it on my Pixel Slate. Here I’m using the debugging tool to step through my code and can see the characters in an external text file I’ve read in:
Python is already installed by default, so there’s nothing do to there. For Java, I also need the JDK, or Java Developers Kit, which is available from Oracle, although there’s an open source version called OpenJDK also available. Essentially, if there’s a Linux tool available, you should be able to install it on your Crostini-supported Chrome OS device, and that includes Git if you need version control.
This isn’t quite a perfect solution, however, since there are some features and functions not yet available in Crostini. If you’re developing an app that relies heavily on graphics rendering, GPU acceleration isn’t in Crostini. However, it’s likely coming soon based on recent developments by the Chromium team. There’s no audio support in the Linux container yet, and if you need to read or write files to a connected device, say over USB, that’s still in the works too.
And there are instances where an installed Linux package doesn’t create a shortcut in the Chrome OS launcher; for those, I simply open up the Terminal app and start the package from a command line.
Typically, if you can download a Debian package from the web in Chrome OS, you can install it from the native Files app and that generally gets you the shortcut.
One other nice feature that’s built into Chrome OS and Crostini is the ability to share files and folders between the two platforms. When I need to download a Linux package, for example, I can simply do that in Chrome OS; I have my Downloads folder mounted as a share in Linux so there’s no need to move files around. And the Dev Channel of Chrome OS 73 provides access to Google Drive as a Linux mount as well, which is a handy way to read and write files in the cloud.
Again, there are multiple ways to create code on a Chromebook and there’s no “best” way since we all have different requirements. However, I get the “how do I code on a Chromebook” question on nearly a week basis through email and social networks, so it made sense to create “version 2” of my approach.
8 thoughts on “Coding on a Chromebook: I’m all in with Crostini and the Pixel Slate”
I fairly happy with my pixelbook, however I’m disappointed that I cannot use serial ports to work on CircuitPython.
Another good option, at least for Python, is Pydroid 3 in the Google Play store. It works great and supports tkinter, Kivy and other UI frameworks.
No mention of Visual Studio Code?
I neglected to mention only because I’m not using it on a daily basis, but yup, it works, as does Eclipse and Android Studio. I’d guess that your IDE of choice should work. 🙂
Taking a Linux course on my HP X2 now.
I’m curious, since I’m considering going the same route. I’ve used both a Samsung Chromebook
Plus and a Toshiba Chromebook something-or-the-other in the past, and I’m strongly considering something like the Pixelbook instead of my next Macbook Air.
My needs are similar to yours: terminal, Sublime text, browsers. It’d be nice to be able to do local Drupal development in Docker, but I have workarounds for that that wouldn’t necessarily keep me from switching to a Pixel.
Why did you switch from the Pixelbook to the Slate? Everything I’ve read so far suggested the Pixelbook was the better option for a web dev machine.
Great question! So with Crostini, you should be able to do everything you listed using the Linux container. This article may help get you going with Docker containers as well: https://hackernoon.com/pixelbook-revisited-running-docker-containers-aa7c742a7dec I don’t have any Drupal/Docker experience so I can’t say more on that topic. 😉
My sole purpose moving from the Pixelbook to the Pixel Slate was two-fold. When I did the Chrome Show podcast on Gigaom years ago, I kept saying I wanted a Chrome OS tablet. And I wanted a device that was a little less unwieldy in “leanback” content consumption mode. The Pixel Slate was it. It’s also a little more powerful than the Pixelbook; it uses 8th-gen Intel Y-series processors while the Pixelbook uses 7th-gen Y-Series. Not a huge improvement but worth a mention. I can’t see why the Pixelbook would be any better for development over a Pixel Slate (provided you have a keyboard for the Slate). They’re essentially the same device in different form factors. Cheers!
Hey, so I was wondering if you have any links to learn and understand more on how you gave jgrasp permission to execute and run. I got everything installed, but am still running into some issues. Would really like to learn more about running linux on my samsung chromebook 3!
P.S. new to programming ?