Skip to main content

Dart on a Chromebook: Success!

I finally have a viable approach to editing Dart directly on a Chromebook running ChromeOS! The usual approach to developing Dart code on a Chromebook is to use Chrome Remote Desktop to connect to another development machine. However, I wanted an approach that would let me develop in Dart while offline, for instance if I'm giving a talk on Dart and my internet connection goes down.

Crouton is a set of scripts based around debootstrap that bundle up into an easy-to-use, Chromium OS-centric Ubuntu chroot generator. Using Crouton, I was able to create a chroot running a basic Ubuntu setup. Within the chroot, I was able to install a JDK and then Dart Editor. Everything works, as you can see in the picture. I can switch back and forth between XFCE and ChromeOS's desktop using a key combination, and everything still runs at native speed since it's just a simple chroot.

I got everything working on my wife's Samsung Series 5 Chromebook running an Intel Atom processor. I have a newer ARM-based Chromebook, but there is currently no ARM port of the Dart VM. I used the 32-bit version of the JDK and the 32-bit version of Dart Editor.

I'm pretty excited that this works because this is one of the few things that was preventing me from fully switching to a Chromebook :) Now, all I need to do is get my hands on a Chromebook Pixel!


lch said…
Sweet! This makes the chromebook pixel viables as my next machine :)
jjinux said…
Unknown said…
Nice! I got it working too using a similar technique :)

The main issue with it on the Pixel -- the high DPI of the retina display makes most of the Linux desktops look really bad (very tiny!). You can fix the fonts, but I haven't found anything yet to uniformly scale the UI.
jjinux said…
Good tip, thanks. Have you gotten copy-and-paste to work between the two desktops? I've gotten to a point where I have a proof-of-concept working, but I haven't gotten to the point where it's a really enjoyable setup.
Unknown said…
Hi shannon ! I am trying to do the same thing on my new chromebook since 2 days but no results. Can you tell us about the way to install Dart editor on linux xfce with crouton please ?
I am a student trying to lurn Dart but i'm not an expert on linux :(
jjinux said…
David, make sure you have an Intel-based Chromebook. It won't work on ARM.

Make sure you're on the Linux side of Crouton.

Then, install the JDK.

Finally, install Dart Editor.

Actually, once you get Crouton installed, it's pretty much the same as installing Dart Editor on any other Linux.

Sorry, I can't give you exact instructions. I don't have a Chromebook anymore.
Unknown said…
OK Thank you Shannon i wil try it right now and let you know how is it going !
Unknown said…
crouton xfce on acer won't open zips from download.. i'll post my fails/success until it works.. that way if anyone comes here they can stop looking :D
Unknown said…
hells bells.. can't launch the editor... gives me the option to add to panel.. not sure what i'm doing.. driving me nuts...
jjinux said…
Peter, it sounds like you're at the point where it has less to do with the Chromebook and more to do with basic Linux usage. Find a buddy who knows Linux, and I bet he can help you!

For instance, to open up zips without using a GUI, install unzip:

sudo apt-get install unzip

Popular posts from this blog

Drawing Sierpinski's Triangle in Minecraft Using Python

In his keynote at PyCon, Eben Upton, the Executive Director of the Rasberry Pi Foundation, mentioned that not only has Minecraft been ported to the Rasberry Pi, but you can even control it with Python. Since four of my kids are avid Minecraft fans, I figured this might be a good time to teach them to program using Python. So I started yesterday with the goal of programming something cool for Minecraft and then showing it off at the San Francisco Python Meetup in the evening.

The first problem that I faced was that I didn't have a Rasberry Pi. You can't hack Minecraft by just installing the Minecraft client. Speaking of which, I didn't have the Minecraft client installed either ;) My kids always play it on their Nexus 7s. I found an open source Minecraft server called Bukkit that "provides the means to extend the popular Minecraft multiplayer server." Then I found a plugin called RaspberryJuice that implements a subset of the Minecraft Pi modding API for Bukkit s…

Apple: iPad and Emacs

Someone asked my boss's buddy Art Medlar if he was going to buy an iPad. He said, "I figure as soon as it runs Emacs, that will be the sign to buy." I think he was just trying to be funny, but his statement is actually fairly profound.

It's well known that submitting iPhone and iPad applications for sale on Apple's store is a huge pain--even if they're free and open source. Apple is acting as a gatekeeper for what is and isn't allowed on your device. I heard that Apple would never allow a scripting language to be installed on your iPad because it would allow end users to run code that they hadn't verified. (I don't have a reference for this, but if you do, please post it below.) Emacs is mostly written in Emacs Lisp. Per Apple's policy, I don't think it'll ever be possible to run Emacs on the iPad.

Emacs was written by Richard Stallman, and it practically defines the Free Software movement (in a manner of speaking at least). Stal…

JavaScript: Porting from react-css-modules to babel-plugin-react-css-modules (with Less)

I recently found a bug in react-css-modules that prevented me from upgrading react-mobx which prevented us from upgrading to React 16. Then, I found out that react-css-modules is "no longer actively maintained". Hence, whether I wanted to or not, I was kind of forced into moving from react-css-modules to babel-plugin-react-css-modules. Doing the port is mostly straightforward. Once I switched libraries, the rest of the port was basically:
Get ESLint to pass now that react-css-modules is no longer available.Get babel-plugin-react-css-modules working with Less.Get my Karma tests to at least build.Get the Karma tests to pass.Test things thoroughly.Fight off merge conflicts from the rest of engineering every 10 minutes ;) There were a few things that resulted in difficult code changes. That's what the rest of this blog post is about. I don't think you can fix all of these things ahead of time. Just read through them and keep them in mind as you follow the approach above.…