Hi there - I’m trying to make use of flatpaks, but keeping them isolated from my host (as I need to experiment with a bunch of settings and I don’t want to bork my host environment. Again.)

Has anyone had actual success making this work? I’ve only been able to get anything to install by sudo-ing, but even then, I cannot get things to run. It’ll fail with file not found (but which file? verbose mode doesn’t help) or fail to connect to the system bus.

I’ve seen some posts about unmounting /var/lib/flatpak on initialization but I’ve had no luck there. (I’m on Fedora 39, which, to be honest, I’m rather enjoying.)

Is this a technique that anyone has had luck with? Worth pursuing?

FWIW, my big goal is to run bottles and I’ve had far more luck with bottles (which strongly recommends flatpak) than with winehq.

13 points
*

Distrobox, by default, doesn’t provide much isolation/sandboxing - it’s main aim is desktop integration and filesystem transparency. So if you’re trying to use it for isolation, it’s a bad idea.

However, you can create a new container which will isolate your filesystem and prevent such conflicts, using the --unshare-devsys flag. (if you want FULL isolation though, use the --unshare-all flag).

Then enter the container and install the flatpak app as usual.

I just tested this on Fedora uBlue and an Arch container and it works fine, didn’t have to unmount anything.

permalink
report
reply
3 points

Thanks - this gives me a few leads.

I know that I’m not getting a full sandbox - that’s ok. Ultimately I’m trying to get bottles running in the hopes of getting a semi-contained environment for me to test out yabridge and getting reaper to load the vsts without crashing. (Reaper is the easy part, the plugins not so much…)

A modicum of isolation here (even if not complete) will help me figure things out. Obviously, if I need different kernel/flags the host will get it too.

If I unshare-devsys, will that disable audio? (I’m still trying to get a clear picture of what’s shared and what isn’t with distrobox/podman (with docker, it feels a bit more straightforward, but I’m not sure docker would be the right choice here…)

permalink
report
parent
reply
3 points
*

Audio works. Not sure how though, --unshare-devsys is supposed to not share the hosts devices, but I guess audio devices are an exception.

The full isolation flags are:

--unshare-devsys:          do not share host devices and sysfs dirs from host
--unshare-ipc:          do not share ipc namespace with host
--unshare-netns:        do not share the net namespace with host
--unshare-process:          do not share process namespace with host
--unshare-all:          activate all the unshare flags below
permalink
report
parent
reply
2 points

Thank you! I just read that and assumed audio wouldn’t. I don’t have warm fuzzies about this.

That said, I’ll give it a go.

permalink
report
parent
reply
1 point

Unfortunately no luck here. Same issue even when setting --unshare-all flag. I suspect I need to try a different approach.

permalink
report
parent
reply
10 points

That makes no sense. Flatpaks are isolated and wont bork your host.

Distrobox and Flatpak are similar technologies.

permalink
report
reply
3 points

It’s not the flatpak that’s the issue, it’s all the other stuff surrounding it that I need to contain. Much easy, potentially, if they are all in the same environment.

permalink
report
parent
reply
3 points

But flatpaks when done right have all their settings in their container.

If you want a totally vanilla experience, maybe run it from a systemd-enabled rootful distrobox? Flatpak needs systemd and that is not supported in rootless distroboxes

permalink
report
parent
reply
2 points

Many Flatpaks aren’t done right (though this is easy to fix after installing them, no need for Distrobox in this case), and Flatpaks don’t require systemd.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments