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

Linux

48008 readers
1194 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?

you are viewing a single comment's thread
view the rest of the comments
[–] atzanteol@sh.itjust.works 10 points 9 months ago (1 children)

That's a pain in the ass. Why not automate it with the install? They already create .desktop files FFS.

[–] AProfessional@lemmy.world 19 points 9 months ago (2 children)

It is actually. Add /var/lib/flatpak/exports/bin to PATH.

[–] martinb@lemmy.sdf.org 4 points 9 months ago (2 children)

This is the answer! Next question is why doesn't the flatpack install do this for you?

[–] skullgiver@popplesburger.hilciferous.nl 4 points 9 months ago (1 children)

It did for me, but I broke it somehow (I really need to reinstall my desktop). According to the Arch docs, the exports directory is added to /etc/profile

As for why it's not done upstream, this seems to be the thread where Flatpak's considerations were mentioned: https://github.com/flatpak/flatpak/issues/3573

I don't want to auto-add the wrapper dirs to the real PATH, because such a modification is bound to break a lot of users setups.

I don't necessarily agree with them, but it should answer the "why" question.

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

They are only aliases too. People will be disappointed if they expect it to behave like the unsandboxed command.

[–] Virulent@reddthat.com 2 points 9 months ago

Flatpak should not be adding directories to $PATH. That is for the distribution or user to do

[–] atzanteol@sh.itjust.works 2 points 9 months ago* (last edited 9 months ago)

Really? That's a thing? I don't mind a one-time PATH modification and was excited to see this but... I don't see that path on my system. Maybe it's optional and none of my applications are using it?

I also don't see any mention of that in the flatpak.org setup steps. And almost nobody replying here even knows about it. And all of the examples of running a flatpak from the CLI on flatpak.org and flathub.org use the flatpak run org.gimp.Gimp version.

So it seems like it's a feature, but it's poorly documented, poorly advertised, and not used... :-(

Edit: So I did find that directory on another system of mine. No idea why it's there on one and not the other. Maybe a version thing. And gimp is symlinked as "org.gimp.Gimp". What a failure... 🤦