
Development on a Chromebook: an opinionated guide - simon_weber
http://www.simonmweber.com/2013/04/20/development-on-a-chromebook-an-opinionated-guide.html
======
wycats
I've been using Nitrous.io (formerly Action.io) on my ChromeBook Pixel and
loving it. I've been using my Pixel full-time as a development environment for
a couple of weeks now, and haven't given up in frustration yet :)

The Nitrous guys have been extremely responsive, fixing a bunch of bugs that
were causing me problems (like awaken-from-sleep, problems with $COLUMNS on a
retina display). Their terminal emulator is great; it even has mouse support
(although it seems to be off by 1 diagonal column -- looking forward to seeing
that fixed soon).

One extremely important point: by default today, ChromeOS discards tabs when
it runs low on memory. This experience was sufficiently problematic for me
that I almost gave up on the entire thing, until I learned about
[http://gigaom.com/2013/04/05/running-out-of-memory-on-a-
chro...](http://gigaom.com/2013/04/05/running-out-of-memory-on-a-chromebook-
heres-a-30-second-solution/). tl;dr Google is experimenting with zRAM
(<https://en.wikipedia.org/wiki/ZRam>), which will eventually be on by
default, and you can trivially enable it right now. Do it.

~~~
raingrove
Thanks for the kind words, Yehuda! We're also working on a Chrome app that
will make the experience even better on Chromebooks, stay tuned! Also, if you
need an invite, let us know: hello (at) nitrous (dot) io

~~~
stickhandle
A Chrome app is a great idea. What kind of timeline? Weeks, months, seasons -
away?

~~~
iamclovin
don't want to put a date on it, but stay tuned :)

------
gcb0
\- So this company sells a laptop that works as a browser for a online site
and nothing else.

\- great, i will buy one and waste a lot of time to make it work offline.

... genius. just genius.

I would just write it off as a good hack or something, but the chrome books
have ZERO advantage. it's hardware is pure garbage if you compare it to
anything on the same price range.

~~~
CrazedGeek
Are there that many $250 laptops with 6 hours of battery life?

And you don't have to "waste a lot of time". Crouton
(<https://github.com/dnschneid/crouton>) makes setting up and using a chrooted
Ubuntu incredibly simple and straightforward, and there are other easy ways as
well.

~~~
Wilya
Any decent modern netbook will give you 5 or 6 hours of battery. The EeePCs
claim something like 8 hours of battery life. The Chromebook isn't bad, but if
you don't want ChromeOS, it's not fantastically better than the loads of other
netbooks on the market.

~~~
nkorth
I don't know of any company that's still making new netbooks, so unfortunately
that option might not last too long. I like tablets, but I hate them for
killing the netbook market!

~~~
beagle3
Microsoft killed netbooks before tablets finished the job, by mandating 10"
and specs that made them much more expensive.

They'll taake my 9" eee from my cold dead hands!

------
doktrin
Nice write up, this will definitely come in handy if I ever decide to go the
Chromebook route.

However, as much as I like the thought of trying something new, I'm still
having trouble justifying the purchase. In other words - why develop on a
Chromebook as opposed to a lightweight notebook?

I guess it's a question of typical use case, but I don't find myself too often
developing in areas without wi-fi. A 100mb /mo plan also felt like fairly
sparse offerings, but it sounds like that's NBD in practice.

As far as the price point is concerned, I'm pretty sure there are refurbished
lenovo x220's / 230's available for the same as a Samsung Chromebook (~$500).

Especially with regards to the latter, I guess I'd feel a little weird
spending close to the same about on $ on a 3g browser with a terminal.

I'd love to hear thoughts from anyone who's moved to a Chromebook for on-the-
go development.

~~~
bluedino
> In other words - why develop on a Chromebook as opposed to a lightweight
> notebook?

It's half the price of the Lenovo you mentioned. It has fairly long battery
life, it's small yet has a full-size keyboard. It's slick hardware compared to
a $299 Best Buy laptop or a netbook. But it has a whole list of disadvantages.

You can't fire up a VM. You can't browse using the actual desktop versions of
Chrome, Firefox, Opera, or IE. You can't use software package X. You need to
be connected to the internet to do development. It's just a fancy ssh/rdp
terminal in this case.

I understand the romanticism about developing on a Chromebook. I love the 11"
Air, and despite the low-resolution screen and low specs (ULV CPU, 2GB or 4GB
RAM and 64GB/128GB SSD) you can actually get stuff done. Is it the 'Ultimate
Developer PC'? No, but a great machine.

The Chromebook is far more limited, but maybe the next revision along with a
regular Linux distribution will be a workable solution for the rest of us.

~~~
doktrin
> _It's half the price of the Lenovo you mentioned._

To clarify, I did mention the price was close to _refurbished_ models. This
isn't a like-for-like comparison, of course, but it reflects my choices as a
consumer. I'm more likely to pick up a refurbished Lenovo X-series than a
refurbished Chromebook, for instance.

For reference, there's a x230 on sale from the Lenovo outlet for $546 [1].
Price and availability vary, of course, but this isn't super uncommon.

[1]
[http://outlet.lenovo.com/SEUILibrary/controller/e/outlet_us/...](http://outlet.lenovo.com/SEUILibrary/controller/e/outlet_us/LenovoPortal/en_US/catalog.workflow:item.detail?GroupID=445&Code=R9W419M-2306CTR)

~~~
bluedino
You get what you pay for when it comes to the Lenovo - the slightly bigger
screen is available in IPS and blows the Chromebook screen away. The i5 (and
available i7) is very powerful CPU, you can have 8GB of RAM and your choice of
SSD/HD...

~~~
derekp7
You actually get a choice of having both SSD and HD at the same time (not sure
if this is what you were implying) -- since the X230 (and 220 I believe) has
an mSATA slot under the palm rest. I've got mine booting off the mSATA (128 GB
running Fedora), and have the spinning disk left with the factory installed
Windows 7 (plus a large partition formatted ext4 for my VMs).

------
guylhem
I'm sorry but the proposed options are not acceptable.

No VPN? SSH as a plugin ???

Using a Chrome plugin for SSH is taking unnecessary risks. I see no reason why
there couldn't be a terminal application on the Chromebook.

If it's due to UI, maybe there could be a way out of the GUI - IIRC the
Chromebook runs on X-Windows.

If you can't hack it in a way where ctrl-alt-f1 will get you to a genuine
linux getty, running standard GNU/Linux command line software after a
recompile, I don't want a Chromebook for development.

Unless you have money constraints, it makes more sense to purchase a real
laptop - a macbook if you need the battery time.

~~~
simon_weber

      Using a Chrome plugin for SSH is taking unnecessary risks.
    

What kind of risks are you concerned about? It's a sandboxed NaCl plugin with
a strict CSP that runs OpenSSH. I suppose you could get concerned about key
security (since they're stored in an html5 filesystem), but you should really
have a passphrase on those anyway.

    
    
      If you can't hack it in a way where ctrl-alt-f1 will get you to a genuine linux getty, running standard GNU/Linux...
    

Developer mode lets you do exactly this. Crouton just gives you a pleasant way
of running a full Ubuntu install.

edit: I agree that vpn support is a huge disadvantage right now.

~~~
guylhem
[it is just a theoretical concern. I do not give ssh passwords or keys to
applications I am not comfortable with. Any browser plugin qualifies as such.]

I haven't one, and so far thought against purchasing one, yet if developer
mode gives me a real console, I may give it a try. Is it sandboxed or
restricted in any way (storage, network, etc), like for the privileges in
android, that may prevent me from running an important daemon (say openvpn,
creating or accessing tun/tap interfaces, doing tcpdump etc) ?

From [http://www.chromium.org/chromium-os/developer-information-
fo...](http://www.chromium.org/chromium-os/developer-information-for-chrome-
os-devices/samsung-arm-chromebook#TOC-Entering-Developer-Mode), I understood
that one had to reboot to get a command line.

I don't want to reboot everytime I need a terminal.

Is it possible to Ctrl-Alt-Fx to get a console while leaving the browser
running? Could you please detail about your experiences in developper mode?

(ie can you leave X, or do you just get a xterm)

In [http://stackoverflow.com/questions/11205504/chromebook-
chome...](http://stackoverflow.com/questions/11205504/chromebook-chome-os-
developer-mode-abilities) it mentions Ctrl-Alt-t - but is that a xterminal or
a text-mode getty?

I'm old school and prefer having gettys in inittab so that Ctrl-Alt-Fx gets me
to the xth getty - and yes I know about tmux and screen.

~~~
simon_weber

      Is it possible to Ctrl-Alt-Fx to get a console while leaving the browser running?
    

Yup. With dev mode on, you can enable root access to VT2 (which is getty). VT1
is CrOS, so you can switch between the two as you please with Ctrl-Alt-F{1,2}.

There's an example of what VT2 looks like here:
<http://www.digifail.com/research/chrome.shtml>.

    
    
      Is it sandboxed or restricted in any way [...]?
    

With dev mode on, you're root, so you can do whatever you want =)

Ctrl-Alt-t gets you crosh, which runs hterm in a browser tab.

~~~
guylhem
Very interesting then.

In fact, I was so interested that before placing an order, I googled a bit to
check its internals and make sure that the Chromebook Pixel could be upgraded.

Huh, soldered RAM, soldered SSD - ok whatever, what about the mini PCIe LTE
card? Can I remove it and put something more useful in there? Nope - only USB
is wired, so you can't put a mSata instead of the LTE card.

And I'm sorry, but that's a dealbreaker.

I would have got one if I could have put 16 Gb of RAM + a decent ssd, I might
have purchased one with only 4 Gb - just like my current macbook air, as long
as I could upgrade the SSD (like I did - on the macbook air!!), but with less
storage that my current laptop and no possibility to fix that? No way.

I'll wait for a new version. If it provided ~0.5 Tb of SSD and 16 Gb of RAM,
with the same hardware specs, I could spare with 2k USD - at least until the
macbooks get touchscreens.

But trying to use the current model for the kind of development I do is just
unreasonable. I need at least storage space, and I don't fancy the idea of
travelling around with an external HD or praying for LTE connectivity.

~~~
tr4656
They won't have that large of an SSD because Google would want you to use
Chrome OS using cloud services as opposed to local hard drive space. I doubt
they will go above the 16GB or whatever it is that they currently have.

------
stickhandle
We need a robust web-based development environment. Think jsFiddle for other
languages but more complete. Version control integrated (think github or
bitbucket). Deployment integrated (think heroku). Dependency management.
Offline capabilities (probably limited). Technically, i have little doubt it
could be possible. No idea what the business model would look like. SaaS/PaaS?
A freemium setup would likely be possible? Free base usage, paid extensions?
[edit] looks like nitrous.io and/or cloud9 are doing exactly this.

------
brent_noorda
Very ignorant question: "development" means developing what? Applications? Web
sites? mobile something-or-other? chrome plugins? If applications then for
what OS? Where does the compiler run? Is this just a shell into some other
server that runs the compiler?

~~~
simon_weber

      "development" means developing what?
    

I probably should have put that in: I work on everything you mentioned, with
the exception of mobile apps.

I do most of my work remotely (my campus wifi is pretty good), but everything
works locally as well.

~~~
brent_noorda
Suppose I have a c++ file I want to compile. I've assumed you couldn't do that
on a chromebook directly, but would need to open a terminal on some system
that does run a compiler. So does developing on a chromebook require that you
also have an account on some remote computer and you're using the chromebook
in various ways to remote to that other development system? I.E. does most of
your chromebook development come down to using it as a smart terminal?

~~~
simon_weber

      I've assumed you couldn't [compile c++] on a chromebook directly
    

You can, actually - just not out of the box. I describe switching to dev mode
and using crouton for this in my post.

    
    
       does most of your chromebook development come down to using it as a smart terminal
    

That said, yes; I normally remote into beefy servers on campus. I may find
myself doing more local work once I graduate, however.

------
donniezazen
Chrome PDF Viewer doesn't have PDF highlight feature which has forced me to
consider it a secondary laptop.

~~~
kgingeri
Try PDFZen from the web store

~~~
donniezazen
It is nice. Google integration would be nice.

