The Ultimate Linux Media Center
Now that my home office is no longer in the living room, I'm looking for a new way to consume media from the couch. So I've been exploring various options such as a Raspberry Pi, Amazon Fire TV Stick, or a second hand thin client. In this table I have rated the capabilities of each approach.
Media from the Couch: Exploring Alternatives to Smart TVs
Now that my home office is no longer in the living room, I'm looking for a new way to consume media from the couch. So I've been exploring various options such as a Raspberry Pi, Amazon Fire TV Stick, or a second hand thin client.
In this table I have rated the capabilities of each approach.
Let me be the first to say that if all you do is watch Netflix, just get the Fire TV, since their DRM makes it hard to use on more DIY platforms. If you'd like to do other things as well, it is technically possible to sideload APKs on Fire TV, so you can install Android versions of Kodi, Retroarch, and Steam Link, but keep in mind the storage and CPU on the Fire TV Stick are weak and tiny, so don't expect to store movies or emulate fifth generation consoles. And of course Steam Link can only stream games from your gaming PC.
On the Raspberry Pi there are several popular "living room" distributions, such as Retropie and LibreELEC. Retropie is great if you just want to play retro games and not much else. LibreELEC does what it says on the tin: Just enough OS for KODI.
Kodi is great for playing cable TV and local media. It also comes with its own Retroarch frontend which works great for older consoles but doesn't support any of the fifth generation consoles like PlayStation or Nintendo 64. However, "just enough OS" is not enough OS for Steam or Firefox or pretty much anything else. But an even bigger disappointment is the add-ons for the major streaming platforms. Most of therm are written by third parties and offer a terrible user experience.
Building a Full-Featured Living Room OS
So what I want to do is take a thin client and put enough OS on it to run Steam, Retroarch, Kodi, Firefox, and try my best to make the streaming platforms work. To do this I will be running Plasma Bigscreen on Kubuntu. Plasma Bigscreen is a "ten feet" interface for KDE that is optimized for use on a TV, which we will use to launch the other applications.
Outline
First I want to talk about choosing the right hardware, then we'll install the operating system, switch the interface to Plasma Bigscreen, and install the other components, Steam, Kodi, Retroarch, and Waydroid. Then we'll make sure they all work with a gamepad, and demonstrate the final result.
Choosing the Hardware
For myself I settled on a Lenove ThinkCentre M720q that I bought for another project, but I highly recommend checking out Project TinyMiniMicro by ServeTheHome who reviewed a ton of thin clients. Alternatively you can just type thin client into ebay and pick up something that matches your budget. Older thin clients go for less than the price of a Raspberry Pi, but might not be powerful enough to game on or watch 4K video.
Installing Kubuntu
Next we're going to install Kubuntu on the device. First download the latest ISO from their website and write it to an USB drive. The official instructions recommend balenaEtcher which is a simple drag and drop interface. But if you regularly boot from USB drives I highly recommend looking into Ventoy which is a bootloader that you install to a USB drive once, and can boot any ISO you put on the drive.
To boot from your USB drive you might need to press some key during startup to bring up the boot menu, or enter setup and make sure the USB drive is listed before the internal drive. Usually delete or one of the function keys, but it depends on the device.
From there just follow the installation instructions. The only thing you might want to pay attention to is to select "log in automatically without asking for the password" because typing with a controller isn't easy.
Getting Steam to Work
I actually installed Steam first for no particular reason. There is some conflicting info out there, but the best way to install Steam on Ubuntu is to just download the official Debian package from their website. You can just open it with Discover and press install, and everything will be taken care of.
On first launch you will get a prompt to install extra dependencies. Steam depends on some 32-bit libraries that aren't enabled by default, so just press enter a few times and it will set up the correct libraries for you.
Afterwards Steam will finally start. The main thing we will want to do for now is go to settings, interface, and enable "Start Steam in Big Picture Mode" to launch the TV interface by default.
Installing Plasma Bigscreen
To install Plasma Bigscreen, open Konsole and run sudo apt install plasma-bigscreen, enter your password, and confirm the installation prompt by pressing enter.
Next log out and in the session type select the X11 version of Plasma Bigscreen. More on Wayland later.
To make Bigscreen the default session, open System Settings, and go to the "Login Screen" settings, and click on "Behavior". From there you can select the default session and also select automatic login if you didn't do this during setup. Once done, apply the changes and reboot the system to make sure you're automatically logged into the correct session.
Adding Kodi via Flatpak
Before we install Kodi we need to make a little detour to set up Flatpak. The Ubuntu package for Kodi is a bit outdated and broken, so we can avoid a lot of trouble by installing the official package from Flathub.
So we open Konsole again and run sudo apt install flatpak, enter our password, and confirm the prompt. Then we need to do the same for plasma-discover-backend-flatpack to allow us to easily install Flatpak packages from Discover.
Then we actually need to add the flathub repository using flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo.
After a reboot, we can start to install Flathub packages from Discover. If you search for Kodi you'll see there are several versions listed. Scroll down to find the Flatpak one and press install.
Now we can start Kodi and install some add-ons by going to settings, add-ons, search, and for example search for "youtube". Press install an OK, and you're done.
For third party add-ons like Netflix or Elementum you need to download their repository from the internet, and select "install from zip file". The first time you do this you'll be prompted to enable unknown sources in settings, and again warned about the security risks. But if you accept the risk, you can now browse for the zip file of your extension and install the custom repository. After installing the repository go back to "install from repository", select the repository you just added, browse the add-on, and press install.
Setting Up Retroarch
Installing Retroarch is much the same as installing Kodi. Open Discover, search for Retroarch, and make sure to select the Flatpak version because again the Debian package is outdated and broken.
Now we can launch Retroarch and configure everything.
First we'll want to go to Settings, Video, Fullscreen Mode, and enable "Start in Fullscreen Mode".
Then we need to go back to the main menu and open the Online Updater. First run "Update Controller Profiles" so that you'll be able to control Retroarch with your gamepad. Then open Core Downloader and simply select any emulator core you'd like to use.
In my case there was one additional setting I needed to change. Under Settings, Input, RetroPad Binds, Port 1 Controls, the Device Index was set incorrectly. So make sure that is set to the controller you want to control the interface with.
Exploring Waydroid (Optional)
As I mentioned, the Kodi streaming add-ons for platforms like Youtube or Netflix don't always offer a great experience, so there might be cases where you'd rather use the Android app. However, most streaming platforms use extensive DRM schemes that don't seem to work on Waydroid and setting it up as a TV isn't trivial either, so I'm still exploring the options here.
So for now I'll just point out that if you go this route, you need to install plasma-workspace-wayland and select the Wayland Bigscreen session on startup because - as the name implies - Waydroid only works on Wayland.
Subscribe to my channel for a future video about Waydroid and let me know in the comments which apps I should cover.
Making It Gamepad Friendly
Now that we have all our apps set up, we actually need to make sure they work with a controller.
To do this we need to once more open Konsole and run sudo apt install plasma-remotecontrollers, this will install a service that translates inputs from TV remotes or gamepads to keypresses.
The upside to this approach is that it provides rudimentary control over any app with keyboard support. The downside is that for apps like Steam, Kodi, and Retroarch which have native gamepad support, we will now register double inputs.
The solution to this is rather clumsy. We need to log out and log in with a regular desktop Plasma sessions. From there we can launch all our apps with native controller support, press the start/command/meta key to bring up the start menu, and then right click the Remote Centrollers tray icon. This tray icon doesn't appear to be accessible from a Bigscreen session but allows us to inhibit Remote Controllers for certain apps. Note that this seems to include individual games launched through Steam, but not individual games or cores launched through Retroarch.
Final Demo and Wrap-Up
So to sum it up, we installed Kubuntu with Plasma Bigscreen, installed Steam, Kodi, and Retroarch, and made everything gamepad compatible. Enjoy the demo, and see you in the next video.
More articles


