this post was submitted on 19 Jan 2024
173 points (87.8% liked)

Linux

48652 readers
2205 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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 11 months ago* (last edited 11 months ago) (2 children)

Any recommendations for a rolling-release immutable distro? Or does that not matter?

I haven't distrohopped in a while and I just might after hearing about Fedora Sericea (Immutable Fedora with swaywm). I just need to understand this whole immutable thing more, because I kind of get the idea but I don't understand basic things like how to install packages, for example.

Also, any way to install packages in an environment and not have it create config files in your home directory, but instead in a temporary directory? Like when you wanna test software but have to clean stuff up later, it's annoying

[–] [email protected] 5 points 11 months ago* (last edited 11 months ago) (1 children)

I can make a post similar to this one here about image based distros if you want.


I think Fedora Atomic (Silverblue, Kinoite, Sericea, etc.) are the best choice atm.
It's the oldest and most sophisticated one and gives you the most choice.
Take a look into universal-blue.org if you like ease of use, want more DEs/ WMs than the few official ones, or have special hardware (Nvidia, etc.).

NixOS isn't immutable/ image based per definition, but even if it would, I personally would only recommend it to highly skilled people who have the time to work themselves into it. It has its benefits, but sounds like a lot of work and is very complicated due to lack of documentation.

OpenSuse Aeon is pretty new and doesn't have a big dev team behind it, and therefore I wouldn't trust it enough yet.

VanillaOS sounds also very promising, but is very immature atm and also has a small dev team.
It will be Debian-based very soon and wants to be a future-oriented Linux Mint alternative. Same philosophy (ease of use, stability, etc.), but different approach.
Sadly you are stuck to Gnome and can't rebase to something else, which is a no-go for a DE-hopper like myself.
But I am very interested in its future and will try it some time.


About installing software:

  • Choice #1 is Flatpak. It's simple, usually just works and is for everything graphical. It covers 99,9% of everything you want and need.
  • Choice #2: Distrobox and Nix, especially for CLI stuff. It's a bit more complicated than just hitting the install-button in the software center, but if you need that stuff, you are already used to work in the console anyway.
  • Choice #3: Direct install. I use Fedora Atomic as example here. You can still use your package manager (similar to dnf) and layer the packages. In practical use, it is the same as installing it traditionally, like with apt or dnf, but under the hood, you can imagine it like Gnome shell extensions. They can add, change or mask features the UI, but it's still Gnome and one toggle away. OSTree-layered packages are still separated from the base, but work exactly as if they would be installed on bare metal.

So you never loose any functionality, only some things are a tiny bit more complicated and different. Once you got it, you don't see it as impractical, but genius.

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

Nice, I use SwayFX so Fedora Sericea is (almost) perfect, I'd just have to rebase* to SwayFX.

*I don't know what exactly "rebase" means, is it like a command that replaces your base system? If that's it, then awesome!

Is it possible to use any DE if I install a base image (one without a DE) then just install the DE via OSTree? I haven't found any SwayFX images.

I'll stick to Void Linux right now, though in the future I'll probably switch to Fedora Sericea or NixOS. Probably Fedora first and in a later future, NixOS, since I like its features but don't understand them yet.

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

I don't know what exactly "rebase" means, is it like a command that replaces your base system? If that's it, then awesome!

Yep, exactly that. Simplified, there's only "your stuff" (mostly /var/ and or /home/), and then there's "the OS", which you never interact anyway and is only there to make everything function. Similar to Android.
And when you rebase, you swap out "the OS"-part, but keep "your" stuff.

It's like a clean reinstall, but you don't have to download your Flatpaks, type in your WIFI-password and copy your photos again. Everything else is fresh.

Is it possible to use any DE if I install a base image (one without a DE) then just install the DE via OSTree? I haven't found any SwayFX images.

Yes and no.

There is a core image (no DE), yes. And you can install the WM with OSTree too, yes.

But, no. You don't do that. OSTree is basically only there for your individual stuff that needs the privilege of the base system. TLP, drivers, such things. For everything else, it's the last resort.

But don't worry. Here comes the best part: you go to universal-blue.org and create your own image.
You basically use the blank template and tell the "build script" which packages to use.
And then, you can use this custom image, which will be automatically updated by automatic Github build actions. It's basically a spin/ distro you don't have to maintain yourself.
You can try it, it is actually pretty easy. I will do the same soon, and I'm a noob in contrast to you! :)

On traditional distros you have a down-to-top approach, and on immutable ones, a top-to-down. If you want to make bigger changes, you change the image, not your install. Both are customisable, but the one takes another approach.

If you decide to make your own DE-spin, please contact the uBlue devs, so they can add your image to the official list.
If you do that, others can use it too and have the exact same install as you :)

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

But don’t worry. Here comes the best part: you go to universal-blue.org and create your own image.

this has blown my mind! it's here i'm supposed to go, right? the only problem i have is with github, since i have moved my stuff to codeberg and this looks way too dependent on github specifically.

i think i might either try Sericea (sadly just default sway, not swayfx) or use NixOS. this is because i don't want to have to learn too much at once, as that tends to be confusing and frustrating.

[–] [email protected] 1 points 11 months ago

Update: I installed NixOS on my laptop (secondary pc) to learn it. Took me all day, but tommorrow I'll maybe make a dotfiles repo using flakes.

Here's a starting point I found for doing exactly that: github:Misterio77/nix-starter-configs.

[–] FooBarrington 2 points 11 months ago (1 children)

My solution is to create the distrobox with its home directory in a temporary subdirectory. Works pretty well!

I'm using Fedora Kinoite.

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

I'll try that out. Didn't know you could do that!

[–] FooBarrington 1 points 11 months ago

Yeah, it's really neat! I can especially recommend using distrobox assemble, which allows you to store all options in an INI file. Way easier for testing.

I wrote a script that calls assemble, and after that does some initial setup (that I couldn't get working with init scripts). If you want to do the same, use the --no-tty flag on distrobox enter :)