linux-packaging-rs / flatpak-ext

Run flatpaks without installing them, and more!
https://linux-packaging-rs.github.io/flatpak-ext/
MIT License
22 stars 1 forks source link

Remove the need for sudo #11

Closed probonopd closed 2 months ago

probonopd commented 2 months ago

Remove the need for sudo, so that we can run unpacked Flatpaks without the need for a root user.

ryanabx commented 2 months ago

I think sudo was required because we're using the system installation for runtimes, (see: #6 )

PS: Open to any way we can find out how to work around this

probonopd commented 2 months ago

Ah, I see. I found out a crude but seemingly working way to run an application without the need for root:

bwrap --bind / /  --bind /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/21.08/active/files/ /usr --bind /home/user/.local/share/flatpak/app/com.example.HelloWorld/current/active/files/ /app --unshare-user /app/bin/hello

However, flatpak is invoking bwrap in a much more elaborated way, as can be seen by using flatpak run -v -v com.example.HelloWorld.