this post was submitted on 23 Jan 2024
108 points (95.8% liked)

Linux

48003 readers
937 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
 

I love Flatpaks, the programs are nicely separated so they don't interfere with each other. They also don't have flaws like Snap's low performance or Nix's complexity.

But being limited to only graphical apps seems like a real drawback. If one wants to use Flatpaks as their primary package manager there have to be some awkward workarounds for cli programs.

E.g., the prime Flatpak experiene is supposed to be on immutable distros like Silverblue. But to install regular cli programs you are expected to spin up a distrobox (or toolbox) and install those programs there.

Having one arch distrobox where I get my cli programs from will not work, as the package entropy over time will get me the very dependency issues that Flatpak wants to solve.

So what is the solution here? Have multiple distroboxes and install packages in those in alternation and hope the boxes don't break? Use Nix alongside Flatpak? Use Snaps?

all 49 comments
sorted by: hot top controversial new old
[–] Max_P@lemmy.max-p.me 44 points 9 months ago (1 children)

Flatpak can do CLI apps it's just mildly unwieldy because of the whole flatpak run ....

If you want reproducible dev environments, yeah you're pushed to container solutions be it distrobox, Podman or Docker. Or something like nix as a user.

If you install a Debian distrobox it'll be as reliable as Debian itself is. It's only an issue when you're after 100% reproducible systems, which Docker can help somewhat with, or again, nix. Or NixOS if you really want it all system-wide.

[–] atzanteol@sh.itjust.works 13 points 9 months ago (4 children)

flatpak run org.gimp.Gimp image.png vs. gimp image.png or even xdg-open image.png. "Mildly unwieldy" I suppose but a massive pain in the ass in practice. I can't believe they thought that it was a good idea to require all that and provide no way to create a script in /usr/local/bin or even .local/bin.

[–] davel@lemmy.ml 20 points 9 months ago* (last edited 9 months ago) (2 children)

echo 'alias gimp="flatpak run org.gimp.Gimp"' >> ~/.bash_profile

[–] atzanteol@sh.itjust.works 32 points 9 months ago

Oh my God I never thought of that! /s

What a pain in the ass to require me to maintain a set of aliases for everything I install. Great user experience.

[–] optissima@lemmy.world 7 points 9 months ago

And the other 125 flatpaks I have?

[–] beta_tester@lemmy.ml 4 points 9 months ago* (last edited 9 months ago)

https://github.com/DLopezJr/fp may help until flatpak solves the usability issue

[–] Thann@lemmy.ml 3 points 9 months ago (1 children)

Flatpak should export mimetypes so xdg-open should work if there isn't another handler registered

[–] AProfessional@lemmy.world 4 points 9 months ago (1 children)

You mean it already does. (“should” can be vague)

[–] Thann@lemmy.ml 1 points 9 months ago

I believe so. (Depending on how your OS packages flatpak)

[–] j0rge@lemmy.ml 19 points 9 months ago* (last edited 9 months ago)

the package entropy over time will get me the very dependency issues that Flatpak wants to solve.

You can declare your distroboxes so that they get created regularly from scratch instead of upgrading in place: https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-assemble.md

That way the entropy never hits you. Then use the Prompt terminal https://gitlab.gnome.org/chergert/prompt to make it just part of your terminal ootb.

[–] sweet@lemmy.ml 18 points 9 months ago (3 children)

I wrote a nice little CLI tool that lets you browse the flatpak store in the terminal and has an option to link all your flatpaks to their short names. Its really just a wrapper bash script that runs flatpak, but I like it because it goes from com.Blender.Blender to just "blender" and it works on the command line.

[–] yetAnotherUser@lemmy.ca 3 points 9 months ago

Cool, where can we find it?

[–] YIj54yALOJxEsY20eU@lemm.ee 2 points 9 months ago

You mean I can stop filling up my .local/bin with bash scripts that just run the flatpak?

[–] Dehydrated@lemmy.world 18 points 9 months ago (1 children)

I think Nix is great for installing CLI apps, it's not that complicated, in fact, it can make many things in your life easier.

[–] d3Xt3r@lemmy.nz 8 points 9 months ago (1 children)

This.

Also, @Libretto@iusearchlinux.fyi - you not be aware but you can use Nix in an imperative way (as opposed to declarative), which doesn't require learning the Nix language or editing config files etc.

Eg: say you wanted to install tealdeer, all you need to do is run: nix profile install nixpkgs#tealdeer

There are similar one-liners to search, upgrade, rollback etc.

I use Fedora uBlue (Bazzite), and use Nix to install all my CLI apps, and Flatpak for all my GUI apps. Been running this setup for a few months on and it's been great experience (bit of a learning curve doing this way of course, but I'm pretty happy with my setup now).

[–] Libretto@iusearchlinux.fyi 3 points 9 months ago* (last edited 9 months ago) (2 children)

Thanks, I will try that out. I want to use uBlue as well, but cli program installation has been holding me back.

uBlue also makes nix available via fleek, but the way you describe it it seems easier to just use nix directly

[–] d3Xt3r@lemmy.nz 3 points 9 months ago* (last edited 9 months ago)

Yep exactly. I tried Fleek first, but it just added a whole bunch of layers of complexity which I wasn't prepared to get into. In fact, the first time I tried setting it up, I couldn't even get it to work with a basic preset ("bling" level), because some dependency in the chain somewhere was broken and it thru a bunch of errors.. and that to me wasn't a good sign of things to come, so I abandoned the idea.

Nix however has been super easy to use, literally just install/uninstall stuff just like how you'd use a regular package manager, except it installs to your user profile/path, doesn't need sudo, no container/sandbox slowing things down, no Distrobox limitations and bugs, and most impressively it's fast. Like so fast that stuff installs instantly, and you'd think that the command didn't work!

[–] j0rge@lemmy.ml 3 points 9 months ago (1 children)

ublue contributor here. We're set up so you can install any cli program from any distro transparently. Should we outline that more in our docs?

[–] Libretto@iusearchlinux.fyi 1 points 9 months ago* (last edited 9 months ago) (1 children)

hey, I'm a bit overwhelmed by all the options you provide to install cli programs. There's nix, fleek, devbox, devcontainers, distrobox, incus, brew and probably even more options.

I just want one preferred way to install my cli programs globally, like on normal distributions, but it is not clear which option is the default one. After digging through posts on the forum I found out that the ubuntu distrobox with apt is supposed to be this default installation environment. Maybe make that clear when someone opens the host terminal on bluefin, or let the bluefin installer give this info to the user.

Even then, projectbluefin.io in the FAQ section suggests that homebrew is the creator's preferred installation method, not ubuntu. So which one should I use now? On one hand, bluefin's default DE is GNOME which is very simplified and has one correct workflow, on the other hand bluefin provides a multitude of choices all seeming equally viable, which is more in line with KDE's philosophy.

Also, why prefer homebrew over something like nix? AFAIK, homebrew leads to the same dependency issues that the traditional package managers have.

Additionally, what is making ublue hard for me is that all the important info seems to be scattered on the ublue website, blog posts and forum posts. I'd really like it if there would be one website which gives clear guidance for people who are new to bluefin (or bazzite etc.). Not explaining all of the possibilites, but just the most important stuff to get started. Just a really dumbed down, compressed version of the existing ublue guides. The users can figure out more themselves afterwards.

Something like:

  • install bluefin-dx (not the regular bluefin)
  • only install graphical stuff via flatpak
  • only use the ubuntu terminal for any terminal stuff, including cli program installation
  • do not use the host terminal unless you are doing host administration with ujust or rpm-ostree
  • etc.

These starter instructions may not be perfect, but at least then the users have a daily driver they can learn more about over time instead of having to learn everything before daily-driving ublue.

Thank you for all the hard work you guys are putting into this, I'm excited to see the project mature

[–] j0rge@lemmy.ml 1 points 9 months ago (1 children)

Maybe make that clear when someone opens the host terminal on bluefin, or let the bluefin installer give this info to the user.

We're working on a dynamic motd system that will give you some guidance when you first run the terminal. Here's the issue if you have some feedback! https://github.com/ublue-os/bluefin/issues/609

So which one should I use now?

Yeah the reason it's ubuntu by default is that's what the target audience uses, but we've been working on a wolfi/brew distrobox that ends up being a better experience, so we're mulling shipping that by default.

Also, why prefer homebrew over something like nix? AFAIK, homebrew leads to the same dependency issues that the traditional package managers have.

We picked homebrew because it's overwhelmingly the most popular package manager for cloud people and has everything people need. nix doesn't really fit in a container world, but we don't stop people from using it, and with devbox there's at least a common devcontainer pattern people can use. I haven't really run into dependency issues with homebrew but the new bluefin-cli container maintains state and is destroyed/rebuilt regularly so that hopefully won't be a problem.

scattered on the ublue website, blog posts and forum posts.

Yeah this is annoying and we're in the middle of consolidating docs, I'm hoping to streamline it by Fedora 40. I'm also working on a 10m "how to use this thing" video, it's just been hard to spend time on it when we're still making it. We're almost feature complete at this point so I'll start on this soon.

Your starter steps are exactly what we want the default to be, do you think we should say that more strongly? Thanks for your feedback! I think we can clean up a bunch of this stuff to make it easier.

[–] Libretto@iusearchlinux.fyi 1 points 9 months ago

Thank you for the answers and listening to the feedback.

Your starter steps are exactly what we want the default to be, do you think we should say that more strongly?

Yes, I'd definitely try to make it more clear to the user that the ubuntu/wolfi distrobox is the way to go and that all the other installation methods are just bonus for those who need it.

Also, I think it's a bit confusing for newcomers whether to choose bluefin or -dx. It seems like dx is always the better option, even if you end up not using all of the extra features

[–] EddyBot@feddit.de 4 points 9 months ago* (last edited 9 months ago) (1 children)

If we are talking Silverblue then podman is your pick for everything Flatpack "can't"
there is no big push for cli flatpack since this already a solved cause with containers for podman/docker/kubernetes

however no matter how you approach this you will always have dependency security issues
unless you built every flatpack/container yourself you are at the whim of the creator of it to keep every dependecy updated
this is already a known vulnerability factor in the container sphere on topbl of the threat of 0-day exploits

[–] ElderWendigo@sh.itjust.works 3 points 9 months ago

I'm sure you know what you're talking about. But your comment becomes a techno babble word salad when you throw in a typo or two, skip essential words and forego practically all correct use of punctuation and capitalization. I know this makes me sound old, dumb, and maybe a little mean. I know I'm old and dumb, but I'm really trying to not be mean.

[–] Quazatron@lemmy.world 2 points 9 months ago

Can one tool be used for multiple use cases? Sure. Should it? Maybe not.

[–] technojamin@lemmy.world 1 points 9 months ago

Would Homebrew work for this? I use it in WSL for all my CLI programs.

[–] ViciousTurducken@lemmy.one 1 points 9 months ago

VPN apps don't seem to work with it and Proton said their Drive app won't either. So for whatever reasons those might be.

[–] voodooattack@lemmy.world 1 points 9 months ago

Try fleek. I use it on my fedora system and it integrates really well.