Hacker News new | ask | show | jobs
by bepvte 2198 days ago
Flatpaks use a git-like tree of hashes, which cant just be shoved into random places on your filesystem. It has an exports directory you can symlink or add to your path.
2 comments

In that case it should be in /opt, where application bundles not managed by the system's primary packaging system belong.
This isn’t technically correct when Flatpak is installed via your distribution. Then it is managed by your packaging system and it’s data should live in a /var/lib.

/opt is for software that doesn’t adhere to the FHS and can’t/shouldn’t be installed in a prefix. Red Hat and Arch install software to /opt via their official package managers. /opt isn’t safe to stick arbitrary software even though it’s commonly used for that — /opt/local is the non-FHS equivalent of /usr/local.

> This isn’t technically correct when Flatpak is installed via your distribution. Then it is managed by your packaging system and it’s data should live in a /var/lib.

Besides, this is silly: they go in /var/lib/flatpak, which is for flatpak's program state information. (Exported desktop files and whatnot go to /var/lib/flatpak/exports/, which is pointed to by `$XDG_DATA_DIRS`).

I mean, if you want to go all Militant Unix Admin on it and install apps to /opt, you can `man flatpak` and set `FLATPAK_SYSTEM_DIR=/opt/flatpak`, but unless your system spans a dozen hard drives I'm not sure what that's going to achieve.

I guess this is sort of an ownership conundrum: a flatpak app is run _via_ flatpak. On its own, it's just a heap of files.

Agreed, that's what /opt is for.
or you can install in your user directory, current cli of flatpak ask you for this and you can set the default install option for the user directory also