📅 December 20, 2018
👷 Chris Power
I recently wrote a post on why I enjoy programming on the Pixel Slate. The post was meant to be a philosophical discussion on why I enjoy using the new chrome tablet as a programming device. I lauded its versatility — being able to run linux, android, and chrome apps on one machine, its compact size, and it’s overall performance. I was; however, warmly reminded by very kind people that the post had one major flaw: I was not programming ON the Pixel Slate. Thanks to these kind words of encouragement, I decided to do a bit more research, and actually code on the Pixel Slate itself; noting the Slate’s performance and usability as a local programming device.
In other words, he doesn’t program on a pixel slate. He uses it as a replacement for keyboard and monitor for the machine he really programs on.
You aren’t programming on the slate. You’re connecting to another PC. You could have bought any laptop.
I too could program on any network connected device with ssh client.
Yeah as someone who programs… that’s some bullshit right there.
When setting up a new programming environment, There are three main things that you need.
The first thing you need to do is enable linux apps on your chrome device through Crostini. To enable linux apps, simply go to settings -> linux, and click to install linux (Beta). Once the install completes, you’ll have a working debian VM and a Terminal app to use.
apt-get install git
asdf-node and follow these directions: https://github.com/asdf-vm/asdf-nodejs. once finished, install the latest LTS node
asdf install nodejs 10.14.2
2. drag and drop: drag the downloaded file to the ‘linux files’ section of your files. 3. right click and select ‘install linux package’ or whatever it says 4. all done! you have VS code!!
pretty much just follow the linux instructions: https://www.jetbrains.com/help/webstorm/install-and-set-up-product.html
sudo apt install openjdk-8-jdk
3. move tar file over to your linux files 4. unpack tar file in terminal, and run the .sh script. Optionally, you can create a desktop entry to run this like any other app in chrome os. But I won’t get into that here
vim is about as straightforward as it could possibly get here. Crostini appears to install a modern version of vim (8.0.707 as of this writing), so you’re good to go. You most likely have your own dotfiles if you’re a vim person. Either way, its all ready to run for you.
For my purposes, I am working on this here blog. This is a gatsby site, which means we’re working with react.
you can open your terminal, and cd to the directory and run
code . OR you can just open the vscode application as you would any other app, and open the directory from there.
Once you’re in, you’re all set and ready to work. Install your dependencies via NPM/Yarn as you would any other linux/unix system, and you’re off to the races.
Only issues I’ve seen so far. You have to use the Crostini VM to connect to localhost with some things like express in node. which is easy enough. just run
hostname -I in your terminal to check the IP of your VM and use that instead of
Is this setup quirky? yes. But its REALLY nice to have native linux running on Chrome OS. It allows you to set up your environment the way you would any other linux machine, yet, you have Chrome OS running on top of it! And the form factor of the slate is just amazing; which is the real reason why I chose it in the first place.
One more thing to note: These programs run in a BETA version of a linux VM. So there are some slight issues that you would expect out of such a setup. Namely, The performance of VSCode and WebStorm don’t feel 100% perfect (Vim on the other hand runs just fine), but its pretty close. And Google is only going to improve the native linux app experience moving forward; I’m sure we’ll get native feeling apps soon. Nonetheless; I find this to be a very compelling first-draft of what the future of Chrome OS holds. The Slate held up very well when running Terminal, VSCode, and Webstorm; along with multiple chrome tabs and windows. And hey, I even wrote this blog post from a locally running instance of WebStorm.