Minimal March – Part 2 : .NET on a Chromebook
Tags: dotnet, chromebook, linux
Published: 2020-03-04 18:17:08

---
title: Minimal March – Part 2 : .NET on a Chromebook
published: true
date: 2020-03-04 14:32:23 UTC
tags: dotnet,chromebook,linux
canonical_url: https://jeffreyfritz.com/2020/03/minimal-march-part-2-net-on-a-chromebook/
---

After writing my previous post in this [Minimal March](https://jeffreyfritz.com/tag/minimalmarch/) series, it was pointed out to me that my approach is still a little bit of ‘[gatekeeping](https://www.urbandictionary.com/define.php?term=Gatekeeping)‘. I was using a very expensive machine with lots of memory and drive space in a virtual machine. What about those folks that don’t have access to these resources? Let’s knock down those doors and show that ANYONE ANYWHERE can be a .NET developer.

I set the following parameters for myself, to ensure that I was getting a computer that just about anyone could acquire:

1. Purchase a laptop at my local discount retail shop, a Walmart in my case.
2. Spend less than $200
3. It must be a Chromebook – this is now very common in high-schools here in the US
4. Configure it with .NET developer tools and work on productive software on my Twitch stream

… and it worked.



<iframe src="https://player.twitch.tv/?autoplay=false&amp;video=v561287709" allowfullscreen="true" scrolling="no" width="620" height="378" frameborder="0"></iframe>

[Watch Minimal March PIVOT! Live Coding .NET on a Chromebook !coffee from csharpfritz on www.twitch.tv](https://www.twitch.tv/videos/561287709?tt_content=text_link&tt_medium=vod_embed)

Urban Dictionary defines Gatekeeping as the following:

> When someone takes it upon themselves to decide who does or does not have access or rights to a community or identity.
> 
> <cite><a href="https://www.urbandictionary.com/define.php?term=Gatekeeping&amp;defid=6476252">Urban dictionary</a></cite>

I’ve seen this in our technical and software development communities on Twitter, Reddit, in-person, and even at conferences. Teens and college graduates are again and again told that they can’t be considered a ‘real developer’ unless they use **technology X** where X is the “cool” or “hip” tools to use this month. How many developers do you see in the San Francisco area that DON’T carry Mac laptops? At Microsoft technology events, how many presenters are carrying a Surface Book?

For a developer presentation at an event, it is GOOD to have a fast, brand-name machine so that your demos work quickly and you can get access to spare parts easily should something go wrong. If you’re someone interested in getting started in software, there is _NO NEED_ to spend $3,000 on that fully-loaded Mac Book, Alienware, or Surface Book. Let’s get started with something simple, something you can access without taking out a loan.

Yes, we could build a machine around a Raspberry Pi. That would require some technical knowledge, acquiring a display, adding a keyboard and mouse and not being at all practical for students or developers to carry with them to school, the local coffee shop, or the office.

## The Walmart Challenge

Walmart has a great cross-section of technology at their retail stores. You can find iPhones, Playstation 4, XBox, laptops and other expensive systems right next to very inexpensive Android phones, tablets, and Chromebooks. Every town in North America has at least one Walmart, and I visited my local store on Monday evening this week in search of a bargain.

{% twitter 1234634393429381123 %}

I did a quick walk through the computer section and looked at the candidates. Here is what I found:

{% youtube -CQTVSTGEbo %}

<figcaption>Shopping for $200 Chromebooks at Walmart</figcaption>

… and I settled on this [HP Chromebook 14](https://www.walmart.com/ip/HP-Chromebook-14-14-Full-HD-Display-AMD-A4-9120C-AMD-Radeon-R4-Graphics-4-GB-SDRM-32GB-eMMC-Audio-by-B-O-Ink-Blue-14-db0043wm/309927001), saving $50 off the list price and coming in JUST under my $200 budget.

![](https://jeffreyfritz.com/wp-content/uploads/2020/03/image-2-1024x413.png)

4GB of RAM and 32GB of drive space with an AMD A4. This would be a tight fit, but we should be able to write code and build web applications on it.

## Installing Linux

“Installing” is probably the wrong term and “Activating” is the better term now. With the latest versions of ChromeOS, Google now has [instructions for installing Linux](https://support.google.com/chromebook/answer/9145439?hl=en) on your Chromebook available. I couldn’t believe that it would be THIS easy:

<iframe src="https://clips.twitch.tv/embed?clip=GeniusPopularLarkPicoMause&amp;autoplay=false" allowfullscreen="true" width="620" height="378" frameborder="0"></iframe>[Installing Linux on a ChromeBook - It's THAT easy](https://clips.twitch.tv/embed?clip=GeniusPopularLarkPicoMause)

After a few minutes, I had a terminal running that had ALL of the Linux features I wanted. I couldn’t believe it was that easy… but there are some limitations:

- That Linux instance is running inside of a container
- It’s named ‘penguin’ and as much as you might want to rename it, that penguin name is going to come back
- Interactions with the Chrome UI aren’t easy
- Forget about fonts

Those last two items were a little hard for me. I have a set of fonts that I like to use while developing, and I fought the good fight.

## Fonts, Developer Mode and Bricks

There currently is no way to install fonts on ChromeOS through the native menu and user-interface.  After some searching online, I found some instructions about rebuilding the hard drive in 'developer mode'.  The steps for this are not hard to follow, but require you to change the drive partition that ChromeOS boots from.  Furthermore, developer-mode requires you to use a Ctrl+d keystroke to activate the machine at boot time.  When you configure developer-mode you will be presented this screen:

![How to Enable Developer Mode on Chrome OS to Get Root Access](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fi1.wp.com%2Fbeebom.com%2Fwp-content%2Fuploads%2F2016%2F06%2FChrome-OS-preparing-system-for-developer-mode.jpg%3Fresize%3D640%252C308&f=1&nofb=1)

With Developer Mode activated, you can read and write to the entire disk. Brilliant! I can copy my fonts into an appropriate folder and activate them. After placing them in the /usr/local/share/fonts folder and fighting with font utilities for about an hour, I shut down the machine and went to dinner.

When I returned, I accidentally pressed the `spacebar `INSTEAD of` Ctrl+d` to activate my Chromebook… and this happened:

![](https://jeffreyfritz.com/wp-content/uploads/2020/03/20200304_034642762_iOS-1024x576.jpg)<figcaption>Uh oh…</figcaption>

Fortunately, there is a very well documented [system restore process for ChromeOS](https://support.google.com/chromebook/answer/1080595?hl=en). After restoring the OS, I decided to abandon Developer Mode going forward.

## FiraCode in the ChromeOS Terminal

The ChromeOS terminal is actually more akin to a web page that you can format with CSS. It’s not, in my exploration, able to see into the files and folders on your Linux container running in the terminal. However, you can configure it with some custom CSS to use fonts that are available on the web.

The folks working on the [FiraCode font made directions available](https://github.com/tonsky/FiraCode/wiki/ChromeOS-Terminal) to add their font as a font-family and CSS markup to enable it in the terminal. It’s not perfect, but now my eyes are more at rest with the font-ligatures and fixed-width text for coding.

## Adding my Linux Configuration

I took my previous configuration from my last blog post and stashed it on my GitHub as a repository called [dotfiles](https://github.com/csharpfritz/dotfiles) that I could download to any machine with a git client. I added my current .bashrc, .vimrc, and wallpapers to the repository and copied the git commands from [my previous blog post](https://jeffreyfritz.com/2020/03/minimal-march-part-1-getting-started-with-net-and-c-at-the-command-line/) into a series of scripts to help me fetch and configure the plugins for vim.

Once the repository was cloned locally, I ran the scripts in the /bin folder and I had Omnisharp, EditorConfig, and the NERDTree plugins installed along with my fonts downloaded, and the git features for my prompt configured.

## Installing the .NET SDK

The .NET SDK was just as easy to install as it was in my previous blog post, and the same instructions from my installation in a Linux VM worked again. This time, instead of getting a 64-bit version of the SDK, I got an AMD 64-bit optimized version. I can write the same code, target the same .NET Core libraries, and the appropriate runtime for my Chromebook would execute the code for me.

## Performance 

Performance, well this is where things start to slow down. This machine has a dual-core processor running at 1.8 GHz. Compiling and running my [Blazor project and unit tests](https://github.com/fritzandfriends/BlazorWebFormsComponents) took a very long 20-30 seconds instead of the snappy 3 seconds that I was used to in the Linux VM.

<iframe src="https://clips.twitch.tv/embed?clip=AttractiveTentativeSparrowKlappa&amp;autoplay=false" allowfullscreen="true" width="620" height="378" frameborder="0"></iframe>

It WORKED, and that’s the important part, but I think we can do better. I’m going to work on optimizing some build scripts to make this run quicker going forward.

## Summary

I’m going to continue to work with this Chromebook for the rest of this week and probably next week as well. Let’s see how much performance we can squeeze out of this little machine and maybe even generate some scripts to help other developers who are working with similar machines and configurations.