If you every used Linux for an extended period of time, you no doubt have been inundated with the varieties of packages and vast number of distributions. Despite this, if a program is worth its salt, it’s available as Flatpak, but what happens when you encounter something that isn’t a Flatpak? There’s hundreds of ways outside of Flatpak and many of them like Debian .debs and Red Hat’s .rpms are restricted to specific Linux distributions. This is where an important, but a relatively new skill in Linux comes in: making Distroboxes.

A Distrobox is running another specific flavor of Linux with near native performance on your main machine. Distrobox functions as a compatibility layer. Unlike a virtual machine, applications installed in a Distrobox have standard access to your system and to run virtually any Linux application you want anywhere. This means any configuration files are stored in the same locations they would as if you had installed them normally. Whether it’s a graphical application, a web browser, or build tools for a development project, Distrobox is the most flexible way to run almost any application from any Linux distribution.

Getting Started With Distrobox

First, I’m going to present a use cases. If you are installing programs the you intend to use on a regular basis, I recommend consolidating them to a single Distrobox. When it comes to more specialized programs or development workflows, create a new Distrobox. While you can make the majority of applications work, often times, this requires getting in the weeds and learning more about that specific environment before you take a deep dive.

One common usecase for Distrobox are applications that are restricted to a specific distribution. One example is Signal, which is unofficially supported as a Flatpak, but also only endorses a Debian or Ubuntu installation. Furthermore, this locks out all non-Ubuntu distributions from using Signal.

The first thing you’ll need to download Distrobox from your Linux distribution’s repositories, which shouldn’t be a problem for the vast majority of Linux users. If you prefer a more forward-facing way to play with Distrobox, you can use BoxBuddy, which adds some of the more day to day operations visible in an interface. I’m going to focus more on the main application, which requires using a terminal. Whether you want to use an interface like BoxBuddy or not, you will need to use a terminal to do something at some point, so I would recommend learning it.

To start with building a Distrobox, you need to evaluate which Linux system you need. There a list on Distrobox’s GitHub documentation or the “Image” dropdown menu in BoxBuddy. The list might be daunting, but you don’t know, start with fedora:latest or ubuntu:latest, which means running Fedora or Ubuntu respectively. Since Signal asks for a Debian/Ubuntu-based distribution, we’re going to use ubuntu-latest.

To create your first Distrobox, use `distrobox create -n yourdistrobox -i fedora:latest

If you are doing this for the first time, it will prompt you to pick the image from one of the latest Ubuntu mirrors. After, Podman will pull the latest Ubuntu image down so you can run it. Afterwards, you will be prompted to “enter” your Distrobox with distrobox enter yourdistrobox. This command can also be appended with commands your want to run in your Distrobox like distrobox enter yourdistrobox -- sudo dnf upgrade -y.

In terms of maintenance, you need to manually upgrade each of your containers as each system is independent of each other, even if they share the same image. Distrobox provides a basic command to run on every Distrobox you control in distrobox upgrade --all.

Exclusive Applications

The first thing to do is create a new Ubuntu Distrobox and run the commands from Signal’s website to install Signal as normal. Here’s where a bit of Linux know-how and trial and error comes in. Because Distroboxes are stripped down, some quality of life is missing and basic features aren’t installed out of the box. While Signal functions when you launch it, a few things are missing like the file picker for uploading images, localization of non-Latinized languages, and sound for audio/video calls. If you have issues, examine these issues.

  • If you need a file picker, you will need the xdg-utils.
  • Corresponding language fonts are needed, such as google-noto-sans-cjk-fonts for Chinese, Japanese, and Korean support on Fedora. On Ubuntu, this package is calledfonts-noto-cjk
  • If you require sound, you will need the package for Pipewire. In the case of Ubuntu and Fedora, this is simply pipewire.

Here’s a sample Ubuntu one-liner:

sudo apt install xdg-utils fonts-noto-cjk pipewire

Afterwards, we need to integrate Signal through your GNOME or KDE menu, so we don’t have to open the terminal each time to run your Distrobox applications. Depending on the kind of application you use, you need to use a different distrobox-export command. Typically, this is named after the desktop file (e.g. Signal) from Signal’s website.

distrobox-export --app "Signal"

For command line programs, use the -b flag and the path of the binary.

distrobox-export -b /usr/bin/signal-desktop

Lastly, to stop or remove a Distrobox it’s a quick distrobox stop <yourdistrobox> and distrobox rm <yourdistrobox>.

So that’s our first application! Signal is a more simple example, but it’s not far off from what most applications are like. Most programs will automatically install these things for you, but the first time you install something, you should be prepared to take action.

The Workflow Distrobox

Moving away from special applications, let’s make what I call a workflow Distrobox. This is where you use one Distrobox to house various utilities that you intend to use on a regular basis. One example is a home for a particular development workflow. For me, one example is compiling whisper.cpp, which I use to make subtitles for my videos. I use a Fedora container with cmake and gcc-c++ to do C++ compilation.

Like with Signal, you can take this to the next level by using a Distrobox to version software or clump all of your daily applications together. I typically have “personal” containers appended by the corresponding container distributions, such as “fedora-personal” or “ubuntu-personal.” In these containers, this is where you would install things like web browsers. Some of the most popular web browsers like Brave and Vivaldi are not available officially Linux distributions outside of Ubuntu, Debian, or Debian. While you can run Brave or Vivaldi in their equivalent Flatpaks, the official install methods still stand by their Debian .debs and Red Hat .RPMs.

Like Vivaldi, Proton Authenticator only provides a raw Debian or Red Hat package. This is also a great way to show Distrobox has full access to your home folder and stores your configuration data identically as if the application was installed natively.

To install a .deb or .rpm package, run distrobox enter yourdistrobox, then download the corresponding package and install it as if you were on that distribution. If you are using BoxBuddy, you get the option to upload distribution packages to install. Next, you run the corresponding package commands to install the packages you downloaded.

cd ~/Downloads
sudo apt install ./vivaldi-stable.deb ./proton-pass.deb

Another common task for me as a video editor is to use NVIDIA’s CUDA container toolkit to make rendering videos easier. With NVIDIA’s CUDA binaries, they often require specific versions of Ubuntu, Fedora, or openSUSE and are slow to support new versions.

Instead of installing CUDA as a distribution package and creating a potential conflict with what’s already installed or compiling ffmpeg from source to get CUDA support, I can use a Distrobox based on LinuxServer.io’s full featured image of ffmpeg. Distrobox lets you create new Distroboxes using existing container images.

distrobox create -i docker.io/linuxserver/ffmpeg:latest -n ffmpeg

This creates a new Distrobox with ffmpeg, compiled with CUDA thanks to LinuxServer.io, and in a new container for us to use.

Complex Usecases

One of the newest uses for this is Davincibox, which allows anybody to run the video editor DaVinci Resolve on any Linux distribution. Currently on NVIDIA cards specifically, you need to change some specific rendering options in the settings.

  • In DaVinci Resolve’s top menu, navigate to DaVinci Resolve → User → UI Settings → Uncheck “Stop playback when a frame or clip cannot be processed.” Despite this option’s wording, I have not experienced any issues in rendering videos.

In addition to these problems, DaVinci Resolve attempts to claim permissions of specific CUDA libraries, which breaks their functionality when you stop the container or reboot your system. As a workaround, you need to remove these libraries, then “rebuild” these libraries when davincibox repulls the main image with pristine libraries.

#!/bin/sh
# davincibox-fix
distrobox stop -Y davincibox
distrobox enter davincibox -- sudo rm -vf /lib/libcuda.so /lib/libnvcuvid.so /lib64/libcuda.so /lib64/libnvcuvid.so
distrobox stop -Y davincibox

Building Assemble Files

But more simple than something like Davincibox, you can take every step I used to create my Signal container and repeat that process in an .ini file that works on every Linux distribution. Distrobox has the ability to “assemble” applications using a custom .ini file. This means you can theoretically make any Distrobox container of most desktop Linux applications and replicate it in a file. The concept of Distrobox’s assembly files comes from the cloud computing world and it’s also a new way to share applications with other people. Instead of sharing a shell script that only works on a specific distribution or accounting for changes in one’s setup, you can distribute Distrobox .ini files to quickly install new applications through the magic of containers.

Let me break down some of the commands and what they look like when you make your own .ini file.

  • Image: Location of the source container. This can be generic like quay.io or docker.io image of Ubuntu or something specialized like LinuxServer.io’s ffmpeg.
  • Additional packages: Any package you want installed. This is run after the initial hooks from below.
  • Init: Integration with systemd or openrc. I have never had to touch this.
  • NVIDIA: Whether you need NVIDIA support or not.
  • Pull: Whether you want to pull the image again when running distrobox assemble
  • Root: Whether you want to enter the container as a root account
  • Replace: Whether you want to replace your existing container of the same name after the distrobox assemble signal.ini command runs.
[signal]
image=docker.io/library/ubuntu:latest
additional_packages="xdg-utils pipewire fonts-noto-cjk" 
init=false
nvidia=false
pull=true
root=false
replace=true
# Instructions from https://signal.org/download/
init_hooks=wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg;cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null && rm signal-desktop-keyring.gpg
init_hooks=echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | sudo tee /etc/apt/sources.list.d/signal-xenial.list
init_hooks=sudo apt update && sudo apt install signal-desktop -y

Distrobox Limitations

That said, Distrobox has its limitations. While the vast majority of programs you might use work, there’s a few catches. Here’s some of the things you can’t use with Distrobox or issues you might run into.

  • Distroboxes will take some time when they are launched for the first time. This can be alleviated by adding them to your ~/.config/autostart folder to start them when you boot up, but you might not need every container to start when you log in. Afterwards, they will launch with near native performance.
  • Programs like VeraCrypt or GNOME Disks, which require direct access to your filesystem or disks.
  • VPN provider specific software, where VPNs and containers are a massive rabbit hole. Alternatively, you can use Wireguard or OpenVPN configuration files from your provider, especially since Wireguard is part of the Linux kernel.
  • Using Distrobox isn’t a widespread practice yet, so certain programs may have unintended issues or need additional packages. Brave fails to show the icon in GNOME’s task switcher and DaVinci Resolve has unusual rendering problems unless certain options in the menu are checked.
  • This might be an edge case, but using Fedora Distroboxes require internet connectivity. I’m not sure why this is, but I have not experienced this with Ubuntu, Debian, or openSUSE.

Despite these issues, Distrobox is an improvement to desktop Linux in a major way—you don’t have to install programs that mess around with your system. When you install system packages, it increases the chance that something will go wrong. This is why verified Flatpaks are important, because they won’t cause update problems or block your system for turning on. Where you need to run these kinds of programs, this is where Distrobox serves an important purpose and can run them without breaking your system. You’re not getting an opinionated view on that software, but using it as it was intended.

Ragebait Compilation

Track Listing