Uncategorized

I got hacked

The title says it all.  No idea how, since I use 2FA on Dreamhost, but here we are.  Time now to rebuild.

Posted by Adam Labay, 0 comments

Raspberry Pi 4, Kodi, and Chrome – An Uncomfortable Alliance

For years, I have needed two devices in order to watch quality drinking-time programming in my bedroom:

  • A Chromebit, which runs Chromium, for those late-night binges of TVTropes.orgbut doesn’t run Kodi
  • A Nexus Player, which runs Kodi, among other things but doesn’t run Chromium
  • Two remotes and an HDMI switcher to make it work

Each component is fantastic at what it does – the Nexus Player, despite being largely mothballed, has a great interface, and the Chromebit is the easiest way to get Chrome on HDMI – but it sucks for the need to use two devices.

This summer, I decided to fix that mess.

What follows is a short list of things I tried, none of which could pull it off:

  • Raspberry Pi 3 running Kodi (too underpowered)
  • Raspberry Pi 3 running Emteria OS (see above)
  • Essential Phone running Android TV Launcher (mobile browser on a big screen is a wreck)
  • Raspberry Pi 4 running Emteria OS (not until Emteria releases a build for the Pi 4; I couldn’t properly hijack the Pi 3 build

Here’s what worked:

Here’s how to do it.

Step 1: Download and Install Raspbian

  1. Download Raspbian Buster. I wanted to customize my GUI, so I went with the Lite ISO, but ain’t nothing wrong with the Desktop version.
  2. Flash the image to your MicroSD card using your favorite flashing software. (I’m on Manjaro, so this meant BalenaEtcher, but Rufus is great for Windows.)
  3. If you’re on WiFi, you’ll need to connect. This is trivial if you downloaded Raspbian Desktop, since it happens on boot. If you’re using Raspbian lite, enter sudo raspi-config and choose Networking Options. Enter the SSID and password.
  4. Enable SSH. If you’re using Raspbian Desktop, then open a terminal window (if you’re using Lite, you’re already at one). Enter sudo raspi-config, choose Interface Options | SSH and enable.
  5. Reboot to make sure the change stuck. You can tell if the WiFi setup worked by typing ip address to confirm that you have a proper IP, and you can confirm that SSH is installed by ssh’ing into said IP.

Step 1b: Install a Desktop Environment

If you used Raspbian Lite, you’ll need to install a desktop environment. Everybody has their favorite and I’m not going to take that away from you. I went with XFCE because it has rather beefy window icons and ready support for changes to DPI. Both will be important since I’m watching this on a projector and navigating from my bed, so usability is paramount.

To install, just type sudo apt install xfce4 and let the magic – and about a million dependencies – happen.

I would also recommend sudo apt install network-manager-gnome. This could be unnecessary, but I found it stopped having the WiFi stop working after the first or second reboot. Admonish in the comments if this is unnecessary.

Step 2: Install Kodi and Chromium

Straightforward enough:
sudo apt install kodi chromium-browser seahorse

Kodi has the ability of starting as its own desktop environment. We will eschew this option, since the only advantage of doing so is that you don’t see the Applications bar when you hover over it. Meanwhile, the disadvantage is that you can’t run any other Gnome apps, which is irritating.

Step 3: Log into XFCE, make it the default, and suppress them password dialogs

Reboot (sudo reboot), and when logging in, make sure that XFCE4 is selected as your desktop environment (top-right corner). Logging in is annoying, so we will invoke auto-login.

Similarly, when opening Chromium, entering a password for the default keyring is a pain, so we will suppress it.

Both of these moves are strongly advised against by StackExchange pedants, and that’s fair enough. But this is a media center, not the NSA, and convenience is paramount. Further, we’re going to change the pi’s password so there’s at least one layer of security still present.

  1. Open a terminal window by clicking Applications | System | XTerm. Type passwd and follow the instructions to change the default password from raspberry to something else.
  2. Run sudo raspi-config to configure auto-login: Select Boot Options | Desktop / CLI | Desktop Autologin and then Finish.
  3. Exit the terminal. Open Seahorse password manager by clicking Applications | Accessories | Passwords and Keys
  4. Right-click on Login and choose Change Password. Change the password to <blank>. This will disable prompts to unlock the default keyring.

Step 3b: Optionally, Configure HiDPI Mode

Tiny buttons are hard to hit with a remote control, and tiny text is hard to read when projected across the room. The easiest way to uniformly scale everything on screen is to adjust the DPI settings. This is optional and depends on your use case.

  1. Open Applications | Settings | Appearance and under Fonts change the DPI to 120 – or whatever works for you.
  2. Open Applications | Settings | Window Manager and under Style select Default-hdpi
  3. Reboot to see the full effects.

Step 4: Configure Advanced Launcher

Advanced Launcher is a Kodi addon that creates icons for ordinary apps. We’ll use this, plus a shell script, to launch Chromium from within Kodi

  1. SSH into your pi
  2. Download Advanced Launcher by typing
    wget https://github.com/SpiralCut/plugin.program.advanced.launcher/archive/master.zip
  3. Type nano chromium.sh and enter the following file contents:
    #! /bin/bash
    chromium-browser --user-agent="Mozilla/5.0 (X11; CrOS armv7l 10895.56.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.102 Safari/537.36" --window-size=1920,1080 $1
  4. Return to the pi and open Kodi. Install Advanced Launcher.
  5. Navigate to Add-ons | Add-On Browser (the open box at the top next to the Settings gear)
  6. Choose Install from Zip file and navigate to Home Folder and select master.zip. You’ll likely have to answer a prompt to enable unknown sources.
  7. Advanced Launcher should now be under Program Addons in your Addons folder. Open it and navigate to Default. A dialog to create a new launcher should appear.
    1. Choose Standalone Launcher. Navigate to Home Folder and choose chromium.sh
    2. Leave arguments blank
    3. Keep the title as Chromium – or change it. Free country.
    4. Select Linux as the platform
    5. Skip Thumbnails and Fanart
  8. You now have a launcher that invokes Chromium from within Kodi. To make it more accessible, right-click on the launcher and choose Add to Favourites.

Step 5: Have a lovely beverage

There are additional steps if you want to use Netflix, Amazon Prime, or (heaven help you) Xfinity. But, at this point, you have a nice core setup, so lean back with a lovely beverage and celebrate your accomplishments. The rest can wait for later posts.

Posted by Adam Labay, 0 comments

Ubuntu Cosmic on Pixelbook – Possible!

The folks who use Crouton to run Linux on their Chromebooks tend to be an impatient bunch. Every time a new Ubuntu release comes out, they start peppering @dnscheid with questions about whether it’ll run.
 
As of this writing, Bionic is the most recent supported release.  But Cosmic and Disco both exist as well, and people want to install them. I haven’t made it as far as Disco, but I can answer these two questions:
 
Can Ubuntu 18.10 (Cosmic Cuttlefish) be installed on a Chromebook?
 
Yes.
 
Should you install Ubuntu 18.10 on a Chromebook?
 
So very much no.
 
Can I do it anyway?
 
Hold my beer. 

Step 1: Create a chroot with Xenial

Ubuntu 16.04 Xenial, despite being obsolesced years ago, is the most recent version of Ubuntu that can be installed directly with crouton.  To get to Cosmic, we’ll have to upgrade a few times. This first section is basically an excerpt from the official instructions at https://github.com/dnschneid/crouton

  1. If you haven’t already, download crouton from https://goo.gl/fd3zc
  2. Press ctrl-alt-t to open a crosh shell
  3. Make the installer by typing sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
  4. Install by typing sudo crouton -t xfce -r xenial -n cosmic
  5. Follow the prompts

Congratulations! You now have Xenial installed. Enter by typing sudo startxfce4 -n cosmic

Step 2: Upgrade to Bionic

Now that you have a functioning chroot, it’s time to upgrade to Bionic – the most recent version of Ubuntu which is still fully functional on a Chromebook.

  1. Enter your choot by typing sudo startxfce4 -n cosmic
  2. Enter a terminal by typing ctrl-alt-t
  3. Install Release Upgrader by typing sudo apt install ubuntu-release-upgrader-core
  4. Initiate the upgrade with the following commands:
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade
    sudo do-release-upgrade
  5. Follow the various prompts
  6. Log out, restart your Chromebook, and enter your chroot to make sure everything worked.

If all went well, you have yourself a fancy new Bionic installation.

Step 3: Replace a bunch of drivers

If you try to reproduce the above steps to install Cosmic, you will discover that you can never get a clean apt upgrade. Instead, there’s a set of 5 packages that keep being held back:

The following packages have been kept back:
xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

If you try to get rid of them, you’ll end up cutting off your display, which is sadness. Instead, we need to replace them with different versions, and then revert to these versions post-upgrade.

  1. Remove the troublesome drivers with
    sudo apt remove xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel
  2. Install the friendly drivers with
    sudo apt install xserver-xorg-core-hwe-18.04 xserver-xorg-input-evdev-hwe-18.04 xserver-xorg-input-wacom-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
  3. Type sudo nano /etc/update-manager/release-upgrades and change prompt=lts to prompt=normal
  4. Execute the upgrade with
    sudo apt update
    sudo apt autoremove
    sudo apt dist-upgrade
    sudo do-release-upgrade
  5. Do not reboot after the upgrade! You will lose your video.
  6. Reverse steps 1-2:
    sudo apt remove xserver-xorg-core-hwe-18.04 xserver-xorg-input-evdev-hwe-18.04 xserver-xorg-input-wacom-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
    sudo apt install xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel
  7. Put back the packages that were autoremove’d earlier:
    sudo apt install libcurl3 libegl1-mesa libglu1-mesa libgtop2-common libnih-dbus1 x11-apps x11-session-utils xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xinput xserver-common

Now you can exit, reboot, and log back in.

Congratulations! Also, your system is now unusably slow.

Good news: you upgraded to Cosmic. Good job, give yourself a hug.

Bad news: It’s gonna be slow. Mad slow. Unusably slow.

But it was a fun academic exercise, wasn’t it? Remember, we don’t upgrade software to use it, we upgrade because it’s there.

Posted by Adam Labay, 0 comments

An Exceptionally Simple Class Grade Distribution Chart for DCPS Teachers

This is the latest in lame GSheets hacks I put together for Kelly.

Every Monday, she hands out progress reports. And every Monday, two manners of delusion ensue:

  1. The kids who are doing poorly assume that they’re doing no worse than anybody else (the system must be biased!)
  2. The kids who were doing well but have been slipping assume that they must still be at the top of the heap, because they’re the smart kids so of course they are.

Wouldn’t it be nice if you could point to a classwide grade distribution to show where each student fits in the grand scheme of things?

Indeed it would.

Enter, the grade distribution chart.

It’s driven by this GSheet, which simply takes grade reports from Aspen and turns them into stacked dot charts that can be printed and stapled to your data wall (remember data walls?). You can’t see it in the sample, but there is also a dot at the class average.

It’s anonymous, but as long as the students have their progress reports (which shouldn’t be a problem given that this is generated from them), the kids can see exactly where their grade stacks up against their peers.

The biggest utility, though, is for classes who remain convinced that they’re “the smart ones” and thus must always be at the top of the heap. When they inevitably try to rest on their laurels, it’s always satisfying to show them getting blown away by the “earnest plodders” in the remedial group. 🙂

So, how do you use this beauty?

Two sections follow: initial setup and regular use.

Initial Setup

  1. Open the template GSheet. Make it your own by clicking File | Make a Copy.
  2. Rename the tabs to match your section numbers. Stick with the existing syntax since the other sheets are designed to expect an A-B section number syntax.
    • If you need more than 5 sections, just click on one of the tabs and choose Duplicate. Remember, though, that you need to do this 2 times: once for the Raw sheet and once for the Chart sheet.
    • Further, you’ll have to direct the Chart sheet to the appropriate columns in the Data sheet. In short, you may need to get in touch.
  3. Go to the Data sheet and change the titles, making sure to retain the format of Course A-B with section numbers.
  4. Update the titles of each chart sheet appropriately (alas, there’s no easy way to make them auto-update).

Regular Use

  1. Open Aspen and navigate to the Gradebook for a particular section.
  2. Load the Scores page.
  3. Run the Assignment History report.
  4. Set the format to CSV and accept the warning.
  5. Open the report file in Excel.
  6. Click the top-left chiclet (the gray square between the headings for Column A and Row 1)
  7. Copy to the clipboard.
  8. In the GSheet, open the appropriate Raw tab.
  9. Click the same top-left chiclet to select everything.
  10. Hit Delete to clear out the old data.
  11. Click Edit | Paste Special | Paste Values Only to paste the data.
  12. Repeat for the remaining sections.
  13. To Print, open the appropriate Chart tab.
  14. Hit Ctrl-P to get to the Print Preview dialog. The charts are formatted in Landscape for improved visibility.
  15. Click Next to get to the Print screen.
  16. Print per usual.

Posted by Adam Labay, 0 comments

One Billion URLs

Last night I archived my billionth shortened URL for ArchiveTeam’s URLTeam project.

The rig that runs these is pretty fun, and I may post about it. But for now, I just find 1 billion URLs to be cool.

Posted by Adam Labay, 0 comments

#PublicSchoolGrad / #PublicSchoolSuccess Image Generator

It returns!

A couple weeks ago, Diane Ravitch sent out this tweet:

So of course it was time to dust off the #PublicSchoolSuccess image generator.  I made a few updates, including a new color scheme.  Also, since my coding abilities remain complete shite, I threw the code to GitLab so others may modify it.

Credit remains with Shane Chism for the original code.

Posted by Adam Labay, 0 comments

New Site

New theme, and purged some old posts that weren’t working. May make some updates going forward. Let’s see how this works.

Posted by Adam Labay, 0 comments

Fuze Card Saga Pt. 2: Wake Up, Please

Today’s episode: in which our hero attempts to turn the card off, and then back on. Hilarity ensues.

After about an hour with the Fuze card, I had managed to pair it with my phone and add a collection of credit and debit cards.  Before heading into the wild, though, I want to see how long it will take to pull up a card under normal use.

So, we power off the card and power it back on.

Great.

Issues Powering on the Fuze Card

I have no idea what causes this or how it’s remedied.  What follows are my observations, which somebody smarter than I can hopefully decode:

Guaranteed way to replicate

Continue holding the Power button for a few seconds after the card has powered off.  This will stall the card for about a minute.  I want to say that there’s a buffer getting filled up, and in sleep mode the clock is slowed down to the point that the buffer takes eons to clear.  But I have zero proof for this.

Duration of issue

I’ve had times when it fixed itself after 2 minutes; others when it took days.

Fuze Card’s Response

Provided I could show video proof of the card sucking, they were happy to send a replacement.  Fortunately, it took 2 weeks for my lazy self to get around to mailing in the card, and when I took it out to confirm the problem, it booted with no issues.

The charger may have an effect

A few times, topping the card off in the charger fixed it right up.  This is probably a coincidence, though.

At least it works now

Since it magically awoke after that 2-week slumber, the Fuze card has worked just fine.  I can get it to freeze up by mashing buttons after power-down, but unless I’m trying to make it freeze, no further issues.

More Surprises in Store

Once the Fuze card awakens and powers up properly, there’s still fun to be had.  Stay tuned.

Posted by Adam Labay, 0 comments

Fuze Card Saga Pt. 1: Unboxing & Trying to Add Cards

November 8, 2017: The Fuze Card finally arrives.

First impressions

It’s thin. Like, credit-card thin.  No idea what wizardry was used to fit a battery inside the thing, but they pulled it off.

It’s soft(?).  The matte plastic feels soft – at least softer than a rigid credit card.  It doesn’t seem bendier or in any other way more deformable than a regular card, but it somehow feels like it should be.  Go figure.

The buttons are raised, which does create worries about wallet misfires.  I keep my wallet in my back pocket, where it’s often sat upon by a profoundly bony backside. The buttons do require a decent amount of pressure to push, though, so this may not prove to be a problem.

Getting it Connected

Cards are added via the companion app, which loaded up with no issue.  The card connects automatically via Bluetooth Low Energy, though you can also force it into pairing mode by holding the Power and Multi buttons simultaneously.

Once connected, the app instructs you to set up a passcode, which is just a 6-button sequence created by the three hardware buttons.  At \(3^6=729\) possible combinations, the passcode isn’t exactly guess-proof, but then again neither is a stolen credit card.  And the Fuze card has other security measures as well.

Adding Cards

This was a pain in the ass.

Cards have to be added using an off-brand Square reader which connects via the headphone jack.  First problem: I bought an Essential phone yesterday, and it doesn’t have a headphone jack.

The card reader (right)
and the Fuze charger.

The Essential does, though, have a USB-C to 3.5mm adapter, which is nice.  Problem is, I can’t get it to scan for anything.  Worse, I don’t actually own any wired headphones, so I can’t diagnose whether the culprit is the app, the reader, the adapter, or the phone.

Fortunately, I still have my old Nexus 5X, which does have a headphone jack.  This would be an opportune time to troubleshoot the USB-C adapter, but no. I just want to load my blasted credit cards.

Edit: The USB-C adapter also failed on the Nexus, so either it's defective or I'm doing it wrong.

Speaking of loading those cards:

Why can’t I just photograph the card, or manually enter the information into the app, a’la Android Pay?  Maybe requiring the reader is a form of fraud prevention, forcing you to have the actual card?  But even then, I could just use a card writer to make a physical copy of a stolen card – and I’m sure emulators exist as well.

Mercifully, the Nexus can read the cards and add them to the app, which syncs them to the Fuze card.  At least that’s out of the way.

With the cards added, the next step is to test basic usability.  Hilarity ensues.

Posted by Adam Labay, 0 comments

#DumpDeVos Caller Guide

Step 1: Call Your Senators

Use Call My Congress (opens in a new window) to look up your senators.  Use the links to call them.  (Note: confirmation of presidential appointees is a Senate process, so there’s little your other representatives can do here.)

Script #1:

My name is _____ and I am calling to let the Senator know that I would like him/her to oppose the appointment of Betsy DeVos for Secretary of Education.

I believe in my community’s public schools. Betsy DeVos believes in school privatization and vouchers. She has worked to undermine efforts to regulate Michigan charters, even when they clearly fail. The “marketplace” solution of DeVos will destroy our democratically governed community schools. Her hostility towards public schools disqualifies her. I am asking the Senator to vote against the confirmation of Betsy DeVos.

Script #2:

My name is _____ and I am calling to let the Senator know that I would like him/her to oppose the appointment of Betsy DeVos for Secretary of Education.

DeVos and her family heavily lobbied the Michigan legislature to shield the charter industry from greater oversight. She pushes for-profit charter schools and online schools, which consistently fail the students that they are supposed to serve.

I want my tax dollars to stay in my community to support my public schools. I don’t want my money going to private schools and profit making scams. Betsy DeVos is bad for American education. I am asking that the Senator oppose DeVos.


Step 1b: Send a Video to Your Senators

Use Countable (embedded at right) to send a video message to your Senators as well. Personal story > telephone script.


Step 2: Help #DumpDeVos Gather Steam

Step 2a: Retweet a Badass Teachers Meme


Cruise through the Twitter history of #NotMySOE, pick a meme, and retweet it with the hashtags #DumpDeVos and #NotMySOE as well as #TBATs.  Consider tagging the aforementioned Senators as well.

Step 2b: Remind People that Public Schools are a Success Story


If you haven’t already, create a #PublicSchoolSuccess picture and tweet it out using said hashtag.  (Soon to be added) are lists of people who have either a) allied with Betsy DeVos, or b) have claimed public schools to be a failed experiment.  Tag as many as you reasonably can.


Step 3: Acknowledge That She’ll Probably Still Get Confirmed.

Stick with me, here.

Let’s just face the facts.  There is basically 100% likelihood that Betsy DeVos will become our new Secretary of Education.  Reasons:

  • In the history of the United States, just 9 nominees were rejected by the Senate, and only 13 withdrawn before confirmation.
  • The major way to knock someone out of contention is with flagrant conflicts of interest, and that’s far more likely to be a Rex Tillerson fight.
  • Jeff Sessions and Michael Flynn represent far greater threats to the rights of the oppressed, so resources will go to those fights.
  • School-choice ideology aside, this is a partisan nomination and a partisan confirmation.  And have you seen the Senate make-up?  Related:
  • Harry Reid basically made it impossible for the minority party to stop cabinet appointments.  Whoops.
  • Whatever GOP senators might be persuaded by reasoned arguments against DeVos have probably been bought.
But that doesn’t mean it’s over.

In 2018, all of the House is up for re-election.
As are 36 states’ Governors.
As are hundreds of state legislators.
And thousands of school board members.

The privatizers aren’t stopping after the DeVos hearing, and neither should we.


Step 4: Gear Up for the Long Haul

Step 4a: Join the Badass Teachers Association

Both the national organization and the one for your state.  This is where grassroots activism starts.  Read their blogs. Link up on Twitter.

Step 4b: Look Up When Your Senator is in Town

Go back to Call My Congress and go to your Senator’s page.  Find his/her Town Hall schedule (they all go by ridiculous cutesy names so you’ll have to search a bit).  Go there and hold them accountable, not just for the DeVos hearings, but for their commitment to public education.

Step 4c: Read the Diane Ravitch Canon

Or at the very least, The Death and Life of the Great American School System.  And once you’ve read that, memorize every data point from Reign of Error.

Use these talking points often.


Step 6: Have a Lovely Beverage

You’ve earned it.

Posted by Adam Labay, 0 comments