How to get "flatpak enter" to work?
The problem is you need to be root to use flatpak enter
because it requires entering various container namespaces. What makes that more complex is that sudo
changes environment variables making flatpak unaware of your application instances.
That results in this rather non-obvious usage:
sudo -E flatpak enter instance-id /bin/bash
I don't want to do it the jQuery way™, but as this, currently (at the beginning of the 2020s), still seems to be an unresolved problem, this should solve most use cases:
$ flatpak run --command=/bin/bash fake.application.Identity
It does not need root, it does not need workarounds.
I don't really know what the difference to . Okay, the difference is, it spawns a new "instance", so you cannot directly interact with the other processes in the running flatpak.
But as you likely just want to try out the sandbox or investigate some files or so inside of the sandbox, that should be fine™.flatpak enter
is