TurboTerm: The (Re-)Birth of My First Open Source Project




A quick note to mention I authored my first open source project today.  Not only was it a great chance to breathe some life into an old project of mine, but a chance to officially get comfortable using Git and GitHub.  More work and learning to do, but I am very proud to have a working (on Linux, anyway) terminal configuration utility.  I have included a todo file to capture the enhancements I plan to make. Enjoy!

TurboTerm is a simple terminal configuration file that makes the terminal more user friendly and welcoming to novices.

TurboTerm on GitHub.

Dual Boot GalliumOS on a Chromebook




I had some success running Ubuntu on my Chromebook through Crouton, but I started running into issues. My hypothesis is that since aspects of the Linux kernel are shared between ChromeOS through chroot with Crouton, I couldn’t get a clean installation of Apache to run. I assume this was due to permissions. So I set out on yet another Linux adventure to do a true installation of Linux on the Chromebook.

I found a nice utility called chrx that made the installation very straight forward.

Installing Linux via chrx onto a new (or freshly recovered) Chromebook is a two-phase process:

The first phase reserves space on your SSD or other storage device for the new operating system, and then reboots.

The second phase installs your chosen distribution, and configures the new system according to your selected options.

The installation proceeded smoothly by typing the following into the terminal.
Run chrx: cd ; curl -Os https://chrx.org/go && sh go

Follow on-screen instructions to prepare your Chromebook for installation

Stumbling blocks

I have a Bay Trail chromebook. I should have paid more attention. I did not notice this the first time I installed so even though the install went smoothly, when I pressed CTRL + L to launch into Ubuntu, it was non-responsive and would boot back into ChromeOS. The issue was that I needed to update my firmware. I found this nice firmware update script. I chose the first option which installed the RW_LEGACY firmware with a newer/working/customized version of the SeaBIOS firmware payload and then I good to go Ubuntu loaded nicely.

A second issue I ran into was that the full Ubuntu 16.04 install was just a bit too resource heavy for my now discontinued Acer Chromebook. Chrx comes with a variety of different distro installation options. I chose to go with GalliumOS. Gallium is built on Ubuntu and optimized for Chromebooks plus it has a very clean design.

My install of Apache, PHP, MySQL, and MongoDB all went smoothly so I have a nice and pretty responsive development environment. I have not really booted into ChromeOS since installing Gallium.

Thanks to reynhout for their work on chrx, MrChromeBox for the firmware script, and hugegreenbug the founder of the Gallium project. This is another example project demonstrating the remarkable power of open source software.

Book Review: Divine Direction

A book as big as your head!
Divine Direction: 7 Decisions That Will Change Your Life written by Craig Groeschel broke down seven decisions you need to make: Stop, Start, Go, Stay, Serve, Connect, and Trust. The book interweaves well-known biblical stories to demonstrate aspects of the decision. Overall, this book was topical and a quick read, and a good tool to do some self reflection. The seven decisions, in general, are good things to keep in mind day-to-day.
Unfortunately, the book lacks depth and substance. I can’t recommend it.

The Open Source Truck

The open source equivalent in a truck.

I went offline for project number 3.  I drive a 1991 GMC C2500 pickup truck.  I’ve owned this beautiful gold truck for about four years.  In it’s own, non-Internet-y way, the truck itself follows our ground rules.  It was cheap and paid for in cash (Rule #2).  You can buy a laptop for more than I spent on this. Whenever possible I try to do the work on it myself (Rule #1).  In many ways the truck is similar to open source software – it invites you to tinker, learn, and make it better.  It was built in an era when you popped the hood, you could actually see all of the mechanics laid out in a (mostly) logical way and without plastic covering everything. Thanks to my father-in-law and Truck-Mentor, Jim, we have done a lot of work together to breathe new life into this truck:

  • Replaced the radiator
  • New tires
  • New battery
  • New brake lines
  • New Bluetooth radio
  • Had the engine rebuilt
  • Cleaned the distributor cap
  • And now, replaced the headlight switch.

This particular project started with my daughter helping me do a quick oil change.  As she says, easy-peasy lemon-squeezie, but we didn’t stop there.  I noticed when I drove home from work on Friday evening that all of my headlights were out.  In being honest with Rule #5, being Honest and Transparent (HAT), I will admit to never having changed a headlight before.  So I thought this would be a simple project to learn.  But, in the back of my mind I thought it was odd that all the headlights were out at once.  I justified this by thinking maybe all the lights burned out slowly over time and I never noticed until they were all out. I did make a mental note though, that the light bulbs might not be the true issue.

I picked up a wonderful and comprehensive Haynes manual for my truck a few weeks back.  I wish I had done this years ago.  It guided me seamlessly through opening up the headlights popping out the old bulbs and dropping new ones in.  After knocking this out, I fired up the lights and…nothing.  My mental note was affirmed.  This was going to be a multi-step project.

It was fun to open up the headlights and replace the bulbs, but it didn’t solve the problem.

At Truck-Mentor Jim’s advice, the next step was to check to see if I had a blown fuse.  I never even thought about cars having fuses, circuits, and circuit breakers, but just like a house, they do.  The fuse box is conveniently located to the immediate left of the steering wheel and the fuses are labeled.  In the Haynes manual it included photos of good and “blown” fuses.  With a pair of needle-nose pliers I visually inspected each fuse to confirm they were all working.

Nothing wrong here. All fuses in good working order.

The fact that all the fuses were in working order was a good sign.  It meant if the bulbs and the fuses were working, the physical switch on the dashboard used to turn off and on the headlights had, after years of wear, stopped working.

The back of the headlight wiring harness: Don’t blame me, I work just fine!

I unscrewed the dash cover and inspected the back of the headlight switch.  No sign of wear on the wiring or the harness.  I took a piece of soldering wire and bridged together the red and yellow wires to complete the circuit and the lights turned on!  This was a huge milestone which meant I could now drive my truck at night even if I had to Jerry-rig a bridge out of a paperclip or soldering wire while I pursued a permanent fix  Confirmed: the physical dashboard switch had failed.

A quick call to Auto Zone and $13 later and we are good as new.  We are still abiding by Rule #2, as low cost as possible.  I was amazed that Auto Zone had a part that was over 25 years old on hand and in stock and in the right color.  I shared my amazement with the clerk at the store and he said, “We have over $600,000 of inventory in this store and more than $200,000 has never been sold in the six years I’ve worked here.”  A rush of thoughts entered in my mind that he probably should not be sharing the value of the inventory with a random customer, but I was also amazed at what a treasure trove of parts must be  tucked away, never to see the light of day.  I also left wondering how Auto Zone makes a profit.

The old headlight switch. It was me, I’m the culprit!

I busted open the old headlight switch and found a gooey, sticky paste.  I’m not sure if someone else opened this up some time in the past and tried to patch it together or if after 25+ years this weird epoxy finally gave out causing the switch to fail.  I closed everything up and we’re back in business.  The truck has a fresh oil change, a couple of fresh light bulbs, confirmed the circuits are all working, and now it has a fresh headlight switch.

Learnings

I should have trusted my intuition when I first started the project.  All the headlights going out at once was a clear sign that something else was wrong.  I should have trusted my intuition and checked the fuses then the switch first.

The Haynes manual is a huge help.  This bad boy guided me through each phase of the project: opening the headlights, finding the fuse box and checking the fuses, and then opening up the dash and replacing the switch.

Stumbling Blocks

This project had a lot of them!  I am finishing up reading Zen and the Art of Motorcycle Maintenance.  I will write about the book in a future post, but it introduces these things called, Gumption Traps, which are so stinking relevant.

gumption trap is an event or mindset that can cause a person to lose enthusiasm and become discouraged from starting or continuing a project. The word “gumption” denotes a combination of commonsense, shrewdness, and a sense of initiative.

I was challenged by the following gumption traps.  Just being aware of them helped me to move past them not get frustrated.

  • It was cold in the garage.
  • Garage had too much stuff everywhere which I kept tripping over.
  • I didn’t have the parts so I had to run to the store.  Then I had to run back to the store.
  • One of the headlights had a stripped screw so it was impossible to open up.
  • Wrapped my knuckle trying to get a headlight out.
  • As with all things auto repair, the job took more than twice as long as I thought it would.

I did a good job adhering to Rule #4, and not rushing the job.  At the end of the project I cleaned up the garage and put all the tools away.  A small thing I know, but something I have always been terrible at.  In so doing, I consciously avoided creating another gumption trap for my next project.

Run Ubuntu Linux on a Chromebook

Project number 2 is in the can! I am now running Ubuntu Linux on my Acer Chromebook in a dual boot environment thanks to Crouton.  Actually, it would be more accurate to say that I am running Ubuntu Linux concurrently and on top of the Chromium kernel. This 11 inch 64 bit Intel white workhorse met my needs for casual browsing since I first bought it in April of 2015.  Great battery life, to boot. But, I expect that in taking on this year of development and the many technical projects I have in mind I need more horsepower.  So, in honoring Rule #2, rather than buying a new laptop or spending any money, I wanted to breathe new life into hardware I already had. Call it the classical approach to technology.  Since Chromebooks are already written on top of the Linux kernel, it made getting going with Linux pleasantly simple.

I followed these instructions and was pleased that more than a year later and they still worked without issue.  I chose to install Ubuntu with the Xfce desktop enviornment because it is fast and light on system resources.  It’s not much of a looker, but it is powerful.  Once I landed in the desktop I fired up the terminal did a quick

sudo apt-get install filezilla

I installed the powerful FileZilla FTP client–much better experience than using sFTP which kept failing in Chrome.  Back in cPanel I created a new FTP user and I finished uploading WordPress.  Back in Ubuntu, I also grabbed Firefox

sudo apt-get install firefox

for a better browser experience and then I logged out.  On logout, Ubuntu closes and you’re brought right back to the session you left in Chrome.  I am loving having the simplicity of chrome right alongside the power of Ubuntu.  Now whenever I want to launch Linux I hit CRTL+ALT+T to launch the terimnal then:

shell
sudo startxfce4

Learnings

This was my first encounter with Crouton and it was a great experience.  Admittedly, I was unfamiliar with chroot.  From the GitHub, here’s a nice concise explanation and a quick pro/con analysis.

Like virtualization, chroots provide the guest OS with their own, segregated file system to run in, allowing applications to run in a different binary environment from the host OS. Unlike virtualization, you are not booting a second OS; instead, the guest OS is running using the Chromium OS system. The benefit to this is that there is zero speed penalty since everything is run natively, and you aren’t wasting RAM to boot two OSes at the same time. The downside is that you must be running the correct chroot for your hardware, the software must be compatible with Chromium OS’s kernel, and machine resources are inextricably tied between the host Chromium OS and the guest OS. What this means is that while the chroot cannot directly access files outside of its view, it can access all of your hardware devices, including the entire contents of memory. A root exploit in your guest OS will essentially have unfettered access to the rest of Chromium OS.

Thanks to David Schneider and the other contributors for his generous and amazing work on Crouton.

Stumbling Blocks

A few things where challenging on this project.  I didn’t read the instructions carefully enough the first few times and I had a difficult getting my Chromebook in developer mode.  The Chrome interface for develop mode was pretty intimidating and the bios made some of the scariest beeping sounds I’ve ever heard.  Besides that this project was pretty straight forward and clean.

I did manage to build more horrible identity management habits by not using a password for my sudo account in Chrome, having a riduculously guessable password in Ubuntu, and then reusing my same user ID and pass for FTP, host,  WordPress, and the WordPress database.  Keeping things easy for the hackers.  Just kidding, we are going to address password management in a future project.

Oh yeah, I also had to fight an acute, but strong desire to just buy a more powerful laptop.  Rule #2 grounded me.  I’m glad I fought that urge and enjoyed the classical challenge of giving this laptop a new future.

We landed here, on the internet, safely in one piece!

Our first project is in the can!  I call this project “Make a Website, Start Following Through on Your Development Plan.”

The first step was to find a domain name using Instant Domain Search.  I’ve been using this site for at least 5 years and it remains the fastest and simplest way to find a domain.

I then bought the cheapest hosting plan on Bluehost after hearing an advertisement on The Bill Simmons podcast.  Like Instant Domain Search, I have at least 5 years of experience with Bluehost.  I wanted a hosting plan that was basic, but would let me fully manage and run my own server including giving me the ability to experiment with a variety of programming languages and databases.  I bought the bear minimum services, opting for just a domain name, some basic hosting, and for 99 cents a whois proxy to keep my personal information safe.

The next step was to delete the default WordPress installation that Bluehost sets up, because of Rule #1: We prefer to build our own and then I uploaded my own version of WordPress.  I used cPanel to builtd a new database for the WordPress install.  For some reason, the user privileges on the default MySQL database on Bluehost were not working.  So I created a new database then created a new database user, linked the two together, and completed the World Famous 5 Minute WordPress install.

After some customizing and minimal-izing, here we are.  Along the way I had an impossible time getting the FTP Client to work on my Chromebook so I upgraded my Chromebook to Ubuntu (more on that in a few days).  I also introduced some horrible password and identity management behavior by reusing a subset of the same username and password combination to try to work fast, a violation of Rule #4.  I plan to clean that up in a future post when I explore using a password manager.

According to Rule #2: we always beep our costs low.  I fared quite well in this area walking away with a year’s worth of this website for $71.28.

On to project number two in a few days: detailing how I installed Ubuntu Linux on my Acer Chromebook.