Hacker News new | past | comments | ask | show | jobs | submit login
Chrome OS native development (solarianprogrammer.com)
113 points by AlexeyBrin on Sept 14, 2017 | hide | past | favorite | 50 comments

The thing is, you can get a Windows laptop with a bigger SSD, more RAM and ports for the same price as a decent Chromebook. Instead of jumping through hoops to run linux on chromeos, you can just install the distro of your choice as a windows replacement. My opinion: Developing on a chromebook is like typing with a hand behind your back; You can do it... but it doesn't make a lot of objective sense unless you have bizarre constraints that force you to make such concessions.

"Okay" Chromebooks seem to cost less than the equivalent Windows laptop. The CPU and memory is often fine but I agree, they are all too often limited by the size of eMMMC storage. I managed to get a HP Chromebook 13 G1 for 250$, 3200*1800 IPS display, 4GB RAM, Core m3 CPU but 32GB eMMC. Even playing around with a compressed filesystem it's limited, especially since 4GB RAM basically mandates I have some swap space. Ultimately I'm left with about 16GB free. There is a micro SD slot but that isn't very fast.

HardKernel makes ODroid boards which offer board-mounted eMMC as an alternative storage medium; you can choose between a normal microSD card, or a small custom eMMC PCB with a mezzanine connector:


It'd be cool to see flash memory slots put on ARM laptop boards like you see DRAM slots today. "16GB expandable to 2x 128GB!"

M.2 SSDs are the solution. Many low end laptops support them without listing it on the spec sheet. Look around for service manuals with mobo pictures to determine what one supports before making a purchase.

Yeah, good point. There's no way a custom flash chip could beat the combination of cost, density, speed, endurance, and industry-standard footprint.

That's an amazing price given it's retailing for more than twice that. One option to expand storage is have an always-inserted, low-profile USB 3 flash drive like SanDisk Ultra Fit, providing read speeds upto 150 MB/s.

>unless you have bizarre constraints that force you to make such concessions

Like true software freedom? An ARM chromebook with Coreboot and Linux puts me squarely in Richard Stallman approved territory. Living the dream; No binary blobs on modern hardware. Freedom software for everything. I'm watching industry slowly boil the rest of you with firmware blobs, locked bootloaders, and curated app stores.

I'll take my 5GHz i7 and Intel Management Engine over software freedom and an ARM processor any day.

I don't think it's living the dream unless your dream fits in the constraints of its limitations

If ye love wealth better than liberty, the tranquility of servitude than the animated contest of freedom — go home from us in peace. We ask not your counsels or arms. Crouch down and lick the hands which feed you. May your chains sit lightly upon you, and may posterity forget that you were our countrymen! — Samuel Adams

I've never got why people bring up these 1700s quotes which have such drastically different meanings when you consider context. Like the context of this one being US independence, not a better but less open mousetrap.

Just because a certain algorithm was created to handle a very difficult problem doesn't mean it can't be used to handle much smaller problems.

Plenty of algorithms go from practical to impractical based on the size of the dataset they're applied to.

Not that I think bringing algorithms into this makes for any more of a straightforward discussion than the 1700s quote from Samuel Adams with no additional context or rationale does.

Just because you can't see a connection between the two ideas does not mean it does not actually follow from that. (It's only a non-sequitur if you lack the imagination.)

I don't think it's non-sequitur, I think it's dramatization for the sake of making using an underpowered laptop, which after jumping through hoops and funding a corporation that's the anti-thesis of what Stallman would want to support is now running free software, seem a lot more romantic than it is.

I'm actually fine with someone doing that but I especially don't get then implying everyone who needs more computing power than that is a "boiling frog" because their vastly more powerful machines aren't open. Buying products from heartless multinationals licensing from Google (which is literally as "the man" as you get) then jailbreaki... sorry, rebuilding... them is not some great stand against "the man" "boiling the clueless masses in closed software"

Well said!

It's worth noting though that there is Chromium OS, too, although I will be honest I've only ever used Chrome boxes that were machines with real (closed) ChromeOS on them. I didn't "jailbreak" any of them, I just put them into developer mode and turned off the image signature verifications.

I too am not really sure that one can say legitimately an ARM box is more open than one of those AMT i7 Intel machines, regardless of what OS you put on it. You can't build your own ARM like you can build your own MIPS. (None of us plebes can legitimately build our own processors anyway, maybe you can, not me anyway.)

I learned "how" in a Computer Architecture class 'I' and 'II', but only just enough to give me the sense that if I was on a large desert island with lots of natural resources and the only person left in the world, I might manage to have a rudimentary computer again before whenever the time I die... although I might have to reinvent a transistor and a semiconductor and some other things I didn't think of, first.

That being said, ARM has patents, Intel has AMT, MIPS has the chinese government, I'm just glad there's still some kind of diversity because when we're running all the same identical Intel chips (or any of the competitors for that matter), we're all doomed.

I admit this rather pithy, but I'd kinda like the functional equivalent of both. I'd like high-end and open.

For now, I compromise.

Chromebooks are usually very handy, portable and have decent battery life. What exactly Windows models are competitive in this area and still in the same price range?

The idea with ChromeOS is that you should use web apps, web IDE's ...

Nice - I like Chromebooks for on-the-go work because they are light, have great battery life, and Google's tentacles make for a slick UI.

I use crouton and xiwi, though, because while native is nice, you can't beat surfacing X windows into Chrome tabs. I love the cheap 10-11" ones for stuff like OpenSCAD and KiCAD.

(Also, if you keep your work backed up offline, $200-300 for a replacement isn't bad, compared to a high-end powerhouse. That's nice in a mobile machine; life happens.)

I use a Chromebook with Crouton as my main personal laptop now, and it has worked well for me. I'm using i3wm instead of a traditional desktop environment.


I'm pleasantly surprised to hear you can run KiCAD on a chromebook. I have one (https://www.amazon.com/Samsung-Chromebook-Wi-Fi-11-6-Inch-Mo...) with some tiny processor and it crashed yesterday with a single tab open. I'll have to try out your setup!

A new "made by Google" Chromebook codenamed "Eve" is rumored to be unveiled on the Oct 4 Google event. If the rumor is true then I think Google is now really paying more attention to the laptop market, and the whole Chrome OS ecosystem is very likely to get more mature in the near future. I would love to see JetBrains tools running natively on Chrome OS one day.

source: https://chromeunboxed.com/google-hardware-event-could-be-on-...

Oh, they are definitely paying more attention to the laptop market. They partnered with Samsung recently to make Chromebook Plus/Pro models, and the ARM version came with a strange 6-core processor only described as, 'OP1.'

It looks like it's a Rockchip with two Cortex-A72s, four Cortex-A53s, and a recent Mali GPU. But the 'OP' branding is apparently an attempt by Google to brand or designate ARM chips that have certain peripherals, performance-enhancing features, and support for ChromeOS stuff.


I was surprised how good the Samsung Chromebook (ARM version) was - it worked decently well, ran pretty much all Android apps I tested (which filled the gaps in ChromeOS very well!) and the stylus was useful for notetatking.

It sounds reasonable. More thinking that Microsoft Windows and notebooks don't get along and have plenty of issues. This makes competition easier. If Chrome OS is well integrated with the hardware that makes a difference abd follows the Apple route.

I hope it does more than simply ChromeOS... the $200 dollar beaters are fine for what ChromeOS is. There are very few reasons to buy a "Chromebook Pixel" in 2017... unless it does something more than Chrome.

Don't forget that newer ChromeOS devices support running Android Apps, including Termux. It doesn't have an X built in, but you can do a ton of stuff with it:


Yeah, at one point I had a whole non-dev-mode workflow set up for working on Love2D games. There are Android apps for text editing, version control, and even one for running .love files. Even the shader access worked.

except development seems to have stalled. Very few devices are still supported, even after a year+ since the first one. For instance my C201P is still not supported even though the C100 which has identical hardware has had support for a long time

I have a Samsung Chromebook 3, and in the time I've owned it, Android Support has moved from Dev channel to Beta channel. Seems like development is active from where I'm sitting, anyway.

Crouton is not Chrome OS.

Even the author acknowledges that with "Running Chrome OS and Crouton side by side is the easiest path for a complete Unix like development experience."

The article presents ways to code directly on Chrome OS, without Crouton, you just need to read past the first paragraphs.

What kind of terminal are people using that develop on ChromeOS? I used a Samsung XE303C for a while and I was happy with my options in Crouton, but I could not get used to using a terminal in a Chrome tab.

I understand there is a way to disable the behavior that "ctrl+w immediately closes the tab and terminates the shell" since I hit that key combo enough times to turn me off of doing important work in a Chrome tab altogether, that might help, but I wonder if anyone has come up with a really nice solution that they'd be willing to share here.

Install the crosh extension (which depends on the ssh extension). Now you have a better term in a standalone window.

It's more configurable. You can open the javascript console and set your preferred colours, turn off certain keybindings (so they can pass through to the stuff running inside your terminal), etc. Here's a dump of my notes on this:


● preferences

●● general info See [^ nassh faq] (yes, not the 'hterm hack' file, confusing eh?) for details on how to configure.

See [^ pref mgr] for the full list of configurable preferences. To configure, you need to: - run crosh shell in a browser tab (not standalone window) - open 'Developer Tools', console. This will open a javascript repl side-by-side with the crosh window, within the same browser tab

Get the current value of a preference:

    term_.prefs_.get('OPTION NAME')
Set new value:

    term_.prefs_.set('OPTION NAME', <NEW-VALUE>)
Reset to default:

Reset all preferences to default:

●● copy/paste

By default: - selected text will be automatically copied - Ctrl+Shift+v will paste into hterm

These defaults seem fine by me :)

●● basic changes

Fixes the ALT key (mostly, anyway):

    term_.prefs_.set('alt-sends-what', '8-bit')
●● $TERM

Actually, hterm is already set to 'xterm-256color' by default. ChromeOS must change that to 'xterm' somewhere.

●● look & feel

The bloody scrollbar (I use gnu-screen's scrollback buffer instead) and bell are annoying:

    term_.prefs_.set('scrollbar-visible', false)
    term_.prefs_.set('audible-bell-sound', '')
This is my preferred font size (174x51). See [^ nassh faq] for more info on setting fonts, blinking cursors, etc.

    term_.prefs_.set('font-size', 13)
Colours can be set using either: - a CSS name - in hex, with #rrggbb - in decimal, with rgba(red, green, blue, opacity) - opacity = a number from 0 to 1. Best suited for a semi-transparent cursor

    term_.prefs_.set('foreground-color', 'ivory')
    term_.prefs_.set('background-color', #002b36)
    term_.prefs_.set('cursor-color', 'rgba(255, 20, 147, 0.75)')
See [^ css colors] for an easy to use chart.

●● override chrome shortcuts

There are many chrome shortcuts which get in the way. Running hterm/ssh in a seperate window will disable many of them (C-w, C-n, C-t).

Some are still left, like the Ctrl+<number> and Alt+<number> shortcuts (switch to n'th tab, switch to n'th widow). To disable these:

    term_.prefs_.set('pass-ctrl-number', false)
    term_.prefs_.set('pass-alt-number', false)
Use this in conjunction with chromeos/settings/"Keyboard settings"/"Treat top row keys as function keys". I'm not sure what the most convenient combo is, yet! Remember that Search+[1-0,-+] = F1 to F12, as well.

    term_.prefs_.set('media-keys-are-fkeys', true)

Wow! Thank you isr

I did nodeJS development on my Chromebook for a while, it worked well, the only thing that was missing is the 'you complete me' autocomplete plugin for Vim, but I think there's a way to get that working.

I'm using a Chromebook that I like pretty well as a fancy terminal. A setup that interests me is Kenn White's at https://blog.lessonslearned.org/building-a-more-secure-devel... -- keeping it out of dev mode and using Android apps to fill some gaps.

Big blocker for me starting over and doing that is VPN support. I have to decipher how to convert my work's OpenVPN config to Chrome's ONC format.

I'm currently running with this approach as well on a Chromebook Plus. I'm still not entirely switched over to using it full-time but it's very usable for a lot of terminal-based development.

Not mentioned, but for node.js dev termux almost gets there, but just falls short. You can't hit a node.js server running in android/termux from a full fledged local ChromeOS browser tab. It doesn't have port access. Have to go run an android browser.

Alternatively, I've been just doing browser based dev. The free GCP google cloud shell lets me edit and host so long as I have a connection. If I wanted I could still keep it in sync with git running under termux.

Give me xwindows support in termux and I will happily ditch every other os.

I'm guessing you can't really distribute your native apps to your users.

What about Android dev for Chrome OS? Does it allow you to use C and C++ NDK when running on a Chromebook?

Just to be clear, Chrome OS is a Unix-based OS right?

They don't immediately explain that in their docs and, being a web dev, it's hard to tell from the outside.

Fourth paragraph of the article:

> Chrome OS is Linux under the hood so, in principle, you can run any standalone Linux binary on it. More precisely, Chrome OS is based on Gentoo Linux.

Correct, Chrome OS is a Linux-based distribution. I believe it is/was based on Gentoo although I may be misremembering that.

You are correct. Gentoo was selected for its Portage package management system.

Chrome OS uses a Linux kernel. I believe much of it comes from Gentoo.

docker on chrome is would probably satisfy all these use cases...

Its scary to think how much more Google will know about us if it gets into the OS market too.

I'm a bit confused; isn't Android basically them getting into the OS market?

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact