Bug 485189 - Provide GUI method to define a custom installation following flatpak-installation
Summary: Provide GUI method to define a custom installation following flatpak-installa...
Status: RESOLVED INTENTIONAL
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-07 16:20 UTC by Thiago Sueto
Modified: 2024-04-11 10:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Sueto 2024-04-07 16:20:56 UTC
I am on a Steam Deck with 64 GB of storage running default Plasma 5 and I have an external SD card with 512 GB. My flatpaks take a substantial amount of space and I'd like to move the place where they're stored to the SD card (/dev/mmcblk0p1).

But according to https://docs.flatpak.org/en/latest/tips-and-tricks.html#adding-a-custom-installation and https://man7.org/linux/man-pages/man5/flatpak-installation.5.html this needs root, which is discouraged to do manually.

I'd like Discover to have a setting option for this as suggested here by a flatpak contributor: https://github.com/flatpak/flatpak/issues/1224#issuecomment-1310764573
Comment 1 Harald Sitter 2024-04-08 04:33:07 UTC
I am confused. 

>  this needs root, which is discouraged to do manually.

Where do the manpages say that? And how would it be any different to what discover would do under the hood?
Comment 2 Thiago Sueto 2024-04-08 11:55:18 UTC
> Where do the manpages say that?

"more system-wide installations can be defined via configuration files /etc/flatpak/installations.d/"

A user path like ~/.local/share/flatpak/installations.d doesn't seem to work. See: https://github.com/flatpak/flatpak/issues/4403

> And how would it be any different to what discover would do under the hood?

I don't know. I'm not familiar with how root files persist in immutable distros yet.
Comment 3 Harald Sitter 2024-04-09 05:17:26 UTC
(In reply to Thiago Sueto from comment #2)
> > Where do the manpages say that?
> 
> "more system-wide installations can be defined via configuration files
> /etc/flatpak/installations.d/"
> 
> A user path like ~/.local/share/flatpak/installations.d doesn't seem to
> work. See: https://github.com/flatpak/flatpak/issues/4403

But where is it discouraged?
Comment 4 Thiago Sueto 2024-04-09 22:33:05 UTC
> But where is it discouraged?

Sorry, I meant to say it's generally discouraged to do root operations *in immutable distributions*.

SteamOS is one, and they caution the user (twice) that they should know what they're doing and that their changes might be reset, and they don't have a sudo password by default, as mentioned in https://help.steampowered.com/en/faqs/view/671A-4453-E8D2-323C.
Comment 5 Harald Sitter 2024-04-11 10:41:45 UTC
All these caveats apply to us as well though. Fundamentally we'd not do anything different from https://docs.flatpak.org/en/latest/tips-and-tricks.html#adding-a-custom-installation just expressed as code.

I've talked to some people and we've concluded that this feature isn't a good fit for discover at this time.