Hacker News new | ask | show | jobs
by dannymi 4 days ago
> I need something that actually layers on top of it, not something entirely separate with its own rules and packages that may or may not fit nicely into what I already have.

flatpak is developed, among others, by GNOME, KDE and XDG (freedesktop) contributors, with standards for all the (dbus socket file, desktop regular file, wayland socket file) interfaces. flatseal has about 50 permissions for each flatpak (most, but not all, are switches), all those are integrated.

That includes launcher entries, mime type (file type) associations etc. It's not like you have to manually write "flatpak run" as a user.

As for a common shared library ABI, it doesn't exist and so these usually aren't shared with the host while in memory.

The only workable solution this decade is just to have a shared SDK package. I'm not just saying this, I also use nix-based (Guix) distros to fix this the right way too, but seriously, there's a reason SDKs exist--otherwise you just spend all your time boiling the ocean. It never ends.

> (I don't have any need as a user for separate fake home directories per app, an alternate kill command, or an SDK for GUIs, installing from the browser, or non-root installation, and packages for my distro don't seem to have trouble with portals).

I don't understand why not. I mean of course users are different and you have your own requirements, but this is absolutely what I want as a user.

In fact, I used flatpak as a user for years (after cobbling together a crappy variant of it using podman before that) before doing any development with it, specifically because of a lot of those.

Primary of those is a "fake home directory" which I absolutely 100% want. I don't know the app developers from adam, I really don't want to overshare with their programs, often there's really no upside either. A video player gets one video file, it plays it. That's all. Why should it be able to rummage in ~/.ssh or do rm -rf / (even accidentially) or record audio ?

>non-root installation

This is something I want on shared (cluster frontend etc) computers for the weird one-off GUI thing I need once in a blue moon. I don't have root there. Don't want to have root there either.

>packages for my distro don't seem to have trouble with portals

shrugs I am sure there are distros that basically do what flatpak does on their own. I just want to be clear that if you use portals but no containerization, a lot of them are useless (you can do the actions without the portals to begin with, then). Why have them in the first place in that case? Only for (dummy) interface compatibility--which is important.

Which distro are you referring to?

>I also can't figure out how the second sentence here is supposed to follow from the first. Syscalls and ABI seem orthogonal to filesystem permissions.

It doesnt follow. They are two properties. I am only describing flatpak there.

Right now I have GUI system packages (not flatpak) for: niri, dux shell, emacs, opensnitch (personal firewall), Terminal. That's it.

I have about 70 flatpak programs, like Fractal (absolutely do not want to run that without a container--Matrix is too complicated), Blender, Android Studio (0% chance I run that without a container...shudder), Rhythmbox, Celluloid, ...

Note: I am trying to add the wayland-permission-dropping to the guix distribution's guix shell -C (container) command--and the PR is stuck in review for half a year now because I suspect that they just don't understand what it is for. And this is the bare minimum security (at least the containerized programs wouldn't be able to take screenshots etc), like 1% of what flatpak does. This is again boiling the ocean and just not practical.