Add config to bind folder to diferent location in sandbox #56
Replies: 3 comments 3 replies
-
Hello. I am not sure if this would be a useful feature.
Most likely the installer is using |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply.
Context as to why I thought I might need this feature in the future: I'm hoping to use bubblejail to sandbox apps that don't have a flatpak. The first one I'm trying to do this with is MATLAB, which is proprietary and has an install script you download after getting a licence. This script does prompt me to change the default installation directories of This did make me wonder what I'd do if I encounter a proprietary application that only installs to a system wide directory like /opt or /usr/local (although I haven't spent enough time using bubblejail to find an example).
I didn't consider that. I wonder if overlayfs would help with that (although it looks like bwrap doesn't support that currently containers/bubblewrap#412). In my case, I'm expecting the applications that don't let me change their installation directory will have all their dependencies included and wouldn't rely on any manually installed libraries (otherwise I'd have to install the libraries in the sandbox's usr/local, which wouldn't be ideal). |
Beta Was this translation helpful? Give feedback.
-
Maybe some system like docker/podman volumes could be implemented. It will enable sharing certain data between sandboxes.
If the kernel allow it to be mounted unprivileged then a sandbox post processing could be used like what slirp4netns and namespace limits services do. Anyway I think this such feature needs some more discussion before being implemented. I will move this to a discussions. |
Beta Was this translation helpful? Give feedback.
-
Description
Could we share a directory on the host to a different path in the sandbox? e.g.
/home/$USER/.local/share/bubblejail/instances/application_name/local
could be binded to/usr/local
in the sandbox, so if the application's installer wants to install to /usr/local, it would end up installing inside the sandboxIf I bound
/usr/local
to/usr/local
, then I might end up with several applications putting files there, which wouldn't keep them isolated and would make it harder to uninstall one application as I wouldn't know for sure which files were put there by which applications.In the code it looks like we'd need to add some way of specifying a second argument to Bind() and ReadOnlyBind() in the section below.
bubblejail/src/bubblejail/services.py
Lines 630 to 643 in 150c1e8
I'm not sure what the best way to add something to the toml config the specifies the source and dest dirs separately instead of assuming they are the same.
Maybe something like the toml snippet below would work? If an item in the home_paths list is a string, it's interpreted the same way as the code does it at the moment, but if it's a list, then the first item is the source folder, and the second item is the destination folder. This way I don't think it'd break old config files.
Beta Was this translation helpful? Give feedback.
All reactions