Latest Links

  • The insane amount of entropy in this space is why I’ve pretty much given up doing front-end development. There’s just no sane return on your investment where it concerns time and patience. Read More

  • This seems like an interesting way to manage a set of Docker hosts without resorting to mapping dozens of individual TCP ports. Read More

  • An iconic figure, and (on all accounts) a kind man. Read More

  • Let’s see how this goes. I’m very curious as to how their network management works. 

  • I have to wonder if there’s some kind of uncercover business faction at Google.
    Must be hard to surface occasionally with useful stuff like this while watching trainwrecks like Google+ take up immense resources. 

  • I’m intrigued. And amazed that it’s gotten $5 million in pledges at the time of this writing (ten times the goal). 

Feb 27th

Running Sublime Text on a Raspberry Pi 2

I have this tendency to be persistent. Sometimes exceptionally so, and to lengths that border on the obssessive, especially when it comes to how technology should work.

Two years ago, I adopted Sublime Text 2 as my “non-vim” editor, and mostly stuck to it, even when it spontaneously combusted when trying to perform Clojure syntax highlighting.

But one of the things that annoyed me (ever since I got my ODROID-U2, in fact) was that it only ran on Intel hardware, even considering that an Ubuntu ARM build shouldn’t be significantly harder.

Two years hence, older and arguably not much wiser, I decided it was time to fix that — and here it is, running on a Raspberry Pi 2:

There’s hardly any magic involved — all you need to do is run Ubuntu (I’m using this community-maintained image, which is now my standard OS for it), download Sublime, unpack it and issue the following commands:

# add support for i386 binaries and user-level QEMU
$ sudo apt-get install qemu-user binfmt-support

# add extra repos for i386
# (I had these handy)
$ sudo tee /etc/apt/sources.list.d/i386.list 
deb trusty main restricted universe multiverse
deb trusty-updates main restricted universe multiverse
deb trusty-security main restricted universe multiverse
deb trusty-backports main restricted universe multiverse

# update your package list
$ sudo apt-get update

# install i386 versions of Sublime dependencies, including libc, X11, the works...
$ sudo apt-get install libc6:i386 libstdc++6:i386 libglib2.0-0:i386 libX11-6:i386 libpangocairo-1.0-0:i386 libgtk2.0-0:i386

# Run Sublime Text
$ qemu-i386 sublime_text

And boom, you’re running Sublime Text 2 on a Raspberry Pi, with i386 code translated on the fly to ARMv7.

This will likely work for most other pre-packaged Linux binaries (as long as you install the right dependencies), and, with a fair amount of extra tweaking, will also let you run (some) Windows binaries.

Of course, even though this is possible, it is only barely usable on the Raspberry Pi 2 even considering its beefier CPU. But it does scratch my particular itch, and I can cross it out of my to-do list1.

I’ve yet to try it on my ODROID-U2 (which should be nearly twice as fast), but didn’t want to pollute that with a bunch of single-use Intel binaries2. But I’ve already built a working Docker container that runs on the Pi (one of the reasons I’m using Ubuntu on it is that Docker works great, provided you use armhf base images), and I’ll eventually find the time to test it there in earnest.

For real-life use, Caret (which runs perfectly well with Chromium, even on Raspbian) is a much better option — and one I definitely recommend if you need a coding editor, at least until the Sublime Text developers come to their senses and ship an ARM build.

Come on, guys, it can’t be that hard. Call it an alpha, or call me to help you set up a cross-compiling environment…

  1. You’d be surprised at the amount of stuff I think I ought to “fix” some day… 

  2. Although, to be honest, the prospect of being able to run WINE and Evernote on an ARM machine is tempting… 

Recent Posts

With a Spark In My Ears

Nothing much to report this week, thanks to a bout of the flu which my sinuses decided to support by providing me with a completely free (and quite painful) earache that has made it very hard to sleep at all. Read More

And Then There Were Five

After spending part of last weekend 3D printing a rack enclosure, this weekend I finally put together an upgraded Raspberry Pi 2 cluster. Read More

More Raspberry Pi 2 Benchmarking

So what do you do on a Saturday morning? Me, I benchmark ARM development boards using Clojure. Read More

First impressions of the Raspberry Pi 2

I got my hands on one today, and after arriving home and re-purposing a Class 10 MicroSD card, here are a few short notes on it. Read More

Getting Hy On Dokku With New Relic

It’s been a long while since I last posted about my new site engine, so I thought I’d make amends in a big way — and, in the process, outline a training session on deployment models that’s been on the back of my mind for a while. Read More

Template For Small Countries

A few years down the line, I intend to write a memoir about the golden years of the mobile industry in Portugal. But the past week brought to mind a particular moment that I think is worth sharing now. Read More

Leprechauns Not Found

To kick off the year with some excitement, I flew to Dublin this week to visit partner facilities. Alas, the only thing I was able to fit into the tight schedule was nearly freezing my ears off, and there was not a leprechaun in sight. Read More

2014 in Review

Like last year, I’m not particularly optimistic towards 2015. And if I were, I would likely have a hard time cheering up people. Read More