The title says it all. No idea how, since I use 2FA on Dreamhost, but here we are. Time now to rebuild.
Uncategorized
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.org, but 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:
- Raspberry Pi 4,
- running Kodi,
- without OSMC or LibreElec,
- and Chromium via Advanced Launcher
Here’s how to do it.
Step 1: Download and Install Raspbian
- 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.
- 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.)
- 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 chooseNetworking Options
. Enter the SSID and password. - 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
, chooseInterface Options | SSH
and enable. - 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.
- Open a terminal window by clicking
Applications | System | XTerm
. Typepasswd
and follow the instructions to change the default password fromraspberry
to something else. - Run
sudo raspi-config
to configure auto-login: SelectBoot Options
|Desktop / CLI
|Desktop Autologin
and thenFinish
. - Exit the terminal. Open Seahorse password manager by clicking
Applications | Accessories | Passwords and Keys
- Right-click on
Login
and chooseChange 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.
- Open
Applications | Settings | Appearance
and underFonts
change the DPI to120
– or whatever works for you. - Open
Applications | Settings | Window Manager
and underStyle
selectDefault-hdpi
- 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
- SSH into your pi
- Download Advanced Launcher by typing
wget https://github.com/SpiralCut/plugin.program.advanced.launcher/archive/master.zip
- 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 - Return to the pi and open Kodi. Install Advanced Launcher.
- Navigate to
Add-ons | Add-On Browser
(the open box at the top next to the Settings gear) - Choose
Install from Zip file
and navigate toHome Folder
and selectmaster.zip
. You’ll likely have to answer a prompt to enable unknown sources. - Advanced Launcher should now be under
Program Addons
in yourAddons
folder. Open it and navigate toDefault
. A dialog to create a new launcher should appear.- Choose
Standalone Launcher
. Navigate toHome Folder
and choosechromium.sh
- Leave arguments blank
- Keep the title as Chromium – or change it. Free country.
- Select
Linux
as the platform - Skip Thumbnails and Fanart
- Choose
- 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.
Ubuntu Cosmic on Pixelbook – Possible!
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
- If you haven’t already, download crouton from https://goo.gl/fd3zc
- Press
ctrl-alt-t
to open a crosh shell - Make the installer by typing
sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
- Install by typing
sudo crouton -t xfce -r xenial -n cosmic
- 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.
- Enter your choot by typing
sudo startxfce4 -n cosmic
- Enter a terminal by typing
ctrl-alt-t
- Install Release Upgrader by typing
sudo apt install ubuntu-release-upgrader-core
- Initiate the upgrade with the following commands:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade - Follow the various prompts
- 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.
- 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
- 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
- Type
sudo nano /etc/update-manager/release-upgrades
and changeprompt=lts
toprompt=normal
- Execute the upgrade with
sudo apt update
sudo apt autoremove
sudo apt dist-upgrade
sudo do-release-upgrade - Do not reboot after the upgrade! You will lose your video.
- 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 - 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.
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:
- The kids who are doing poorly assume that they’re doing no worse than anybody else (the system must be biased!)
- 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
- Open the template GSheet. Make it your own by clicking File | Make a Copy.
- 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.
- Go to the Data sheet and change the titles, making sure to retain the format of
Course A-B
with section numbers. - Update the titles of each chart sheet appropriately (alas, there’s no easy way to make them auto-update).
Regular Use
- Open Aspen and navigate to the Gradebook for a particular section.
- Load the Scores page.
- Run the Assignment History report.
- Set the format to CSV and accept the warning.
- Open the report file in Excel.
- Click the top-left chiclet (the gray square between the headings for
Column A
andRow 1
) - Copy to the clipboard.
- In the GSheet, open the appropriate Raw tab.
- Click the same top-left chiclet to select everything.
- Hit Delete to clear out the old data.
- Click Edit | Paste Special | Paste Values Only to paste the data.
- Repeat for the remaining sections.
- To Print, open the appropriate Chart tab.
- Hit Ctrl-P to get to the Print Preview dialog. The charts are formatted in Landscape for improved visibility.
- Click Next to get to the Print screen.
- Print per usual.
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.
#PublicSchoolGrad / #PublicSchoolSuccess Image Generator
It returns!
A couple weeks ago, Diane Ravitch sent out this tweet:
Are you a proud #PublicSchoolGrad? Tweet or post to Facebook a selfie with the name of your high school and #PublicSchoolGrad to tell the world that public education is the lifeblood of your community, and is worth standing up for!
I graduated from San Jacinto HS in Houston!
— Diane Ravitch (@DianeRavitch) June 17, 2019
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.
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.
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.
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.
#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.
Recent Comments