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.
Recent Comments