this post was submitted on 19 Jan 2024
184 points (88.3% liked)

Linux

47308 readers
556 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

TL;DR: It's basically a WSL for Linux. Linux subsystem for Linux if you will.
It let's you install and use pretty much any software ever written for Linux, including AUR packages and graphical apps, on any distro you want. You should all give it a try!


Distrobox is probably the best thing ever.
If bread existed in the Linux world, Distrobox would be the equivalent, or better than sliced bread.
It just solves many of the problems that plagued us in the past!


I'm just sick of answering so many comments or posts where people either

  • almost dislocate their joints in trying to get some software working on their distro, where it isn't officially supported;
  • or choose/ leave a particular distro based on the amount of available packages, e.g. Arch.

**The answer is simple: use fucking containers. **

Before I turned into a weird "immutable distro"-user, I slapped every random install onto my host OS.
After all this shit building up over years, and cluttering my system, it turned against me. Repos not being available, packages conflicting, weird icons popping up, and more. It was a mess!

If one did that on a server, he would probably get slapped by the Selfhosted-community.
If there's Docker, Podman and more, especially for servers, why don't we use it for desktop too?

Some guy probably thought the same and made Distrobox.
You can just download BoxBuddy as Flatpak and/ or install it via package manager.
BoxBuddy is a graphical frontend, that helps you manage and use your containers. It's pretty new tho and is still in heavy development.
Traditionally, Distrobox is CLI-only, but I can see that changing in the near future.


"Why not just use a VM?"

Those containers aren't isolated and barely draw additional resources. Actually, they're somewhat comparable to Flatpaks.
They provide themselves with their stuff they need, but aren't virtualized. The main difference between Flatpaks and DB-containers for myself is that Flatpaks have permissions.

They can and will interact with your host. For example, if I plug in my phone, I can access it via ADB in my Arch container. Or my Nextcloud-client can open my browser and auto start on boot.


Who needs that?

Everyone. Well, maybe. Depends.

Image distros

Certainly users of image based ("immutable") distros like Fedora Silverblue and other variants of this family, like uBlue (Bazzite, etc.).
While we actually could install every package from the Fedora repo traditionally on our host, this should be avoided.
Steam Deck users would benefit strongly too, since they can only use Flatpaks atm.

People who can't get some packages with their distro

One of the main arguments, why so many users go or stay on Arch, is the AUR.

Often, they have a love-hate-relationship with it. It might break easily if you do something wrong, which is easily done for many users. At the same time, it gives them their niche software they need.

What if I told you, that you can enjoy this huge plus point for Arch on every other distro too, while benefiting from the comfort of your favourite distro?

You can even install an Ubuntu container and use Snaps there if you enjoy using them.

Developers

On the stock Fedora Silverblue, there's Toolbx pre-installed, which does something very similar, but not as good. It's a RedHead product.
On uBlue on the other hand, Distrobox is the default, which is better.

Toolbx' main use case is programming. For devs working with different Python-versions for example and don't wanna risk breaking their OS.

DB does the same, but more.


But why is it so powerful?

You can also export your software to your host.
E.g., the Flatpak version of Nextcloud didn't work well for me. The Arch package on the other hand is less buggy and looks properly. It's perfectly integrated in my system and I don't notice it at all that it hasn't been installed natively.

This even extends to DEs and TWMs! You could, for example, create an Arch container only for Hyprland, which you basically can't install on other distros.
And then, you can use said example, or the beta-version of the new Plasma, on OpenSuse Leap.

On uBlue at least, all my containers update themselves too.

Another great thing is the modularity.
You can, for example, just delete the Arch container if it breaks randomly or due to user error, without worrying about losing access to your PC or having to troubleshoot for hours.


All in all, just try it. Trust me.

(page 2) 42 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 8 months ago (1 children)

You can even install an Ubuntu container and use Snaps there if you enjoy using them.

The point of Snaps is that they work on any distro

load more comments (1 replies)
[–] possiblylinux127 1 points 8 months ago

I install basically all my software in distrobox.

[–] [email protected] 1 points 8 months ago (4 children)

distrobox = WSL in Linux world

[–] [email protected] -2 points 8 months ago (1 children)

Flatpak = things properly done.

[–] possiblylinux127 1 points 8 months ago (1 children)

You can't install multiple command line tools in flatpak. I use if for my web browser, Thunderbird and several other apps but its not a replacement for the command line.

[–] [email protected] 1 points 8 months ago (1 children)

Yes, if you want command line tools maybe you should be using LXC, docker, systemd-nspawn etc.

[–] possiblylinux127 1 points 8 months ago* (last edited 8 months ago) (1 children)

That's literally what distrobox is

[–] [email protected] 1 points 8 months ago (1 children)

Yes, with overhead and bugs.

[–] possiblylinux127 1 points 8 months ago

I've never encountered a bug. However podman doesn't pass though any resources from your system and needs a bunch of of custom scripts to be useful.

load more comments (3 replies)
[–] [email protected] 1 points 8 months ago (1 children)

So a question re distrobox. Can it be used to run additional isolated sessions, say via Xephyr or something, that share host resources without abstraction?

Basically, I want to host two additional KDE sessions in Zephyr (or something) and then run Steam and sunshine in, and point my kids respective clients to them.

Or with PCI pass thru, but I'm trying to avoid that.

Can Distrobox help me accomplish this in any way?

[–] possiblylinux127 1 points 8 months ago (1 children)

No, not really? What do you have against vfio? You could install a fairly minimal system and then pass though the GPU. You can check the Arch wiki for more information.

[–] [email protected] 1 points 8 months ago (1 children)

My issue with vfio is the layers of complexity, and inability to multiseat off the same GPU.

[–] possiblylinux127 1 points 8 months ago

For me it was just a matter of copying the firmware and then passing it though inside Proxmox. I believe Proxmox now even has a GUI to do it.

As for multi seat I have no idea

[–] [email protected] 1 points 7 months ago (1 children)

Just curious. I tried distrobox and it wasn't that easy. Isn't flatpak+appimage+nix better alternative?

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

There is no good and bad. Every format or solution has other pros, cons, and especially use cases.

Flatpak is simple and for GUI only.
Appimage is portable.
Nix is reproducible and developer friendly, but pretty complicated too.

And Distrobox' main advantage is that you can use any container-distro.
If you want some software that only runs on Ubuntu, Nix won't get you far.
It might not be perfect (see other comments for examples), but for some use cases, it's the best solution.

As long as it gets you to your goal, anything is good.
Hell, even Snaps can be a good choice if you need some specific software and this format provides you easy access to that. Personal choice and such...

[–] [email protected] 0 points 8 months ago* (last edited 8 months ago) (1 children)

Meh nah because it uses docker or podman as backend which is like how netplan uses several backends which plug into more backends.

Big and advance programs tend to break or lose performance because of the yet another added layer of config.

Linux comes with LXC which works out of box, yet everyone is always running to make another useless container layer because they all want their own config management standard.

LXD, Docker, Podman, Toolbox, etc. God forbid you try to run more than one of these at the same time.

Moreover, Flatpak solves this issue by acting as a pseudo container which at the very least removes potential performance loss.

spoiler

Immutable machines and containerized software are for losers who don't know how to run git clone && make in a terminal /s

[–] [email protected] 2 points 8 months ago

Distrobox is no more layers than Flatpak. Do you know how containers work? You are basically running processes directly on the host kernel ( so no performance loss except you lie to them about being in a sandbox. Distrobox has even less in the middle as you can see your other processss, host file system, networking, etc.

load more comments
view more: ‹ prev next ›