> alias aws="boxxy aws" (repeat for other tools) If you could find a way to somehow intercept without requiring aliasing, this would be amazing. Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing). A neat semi-solution (still worse than transparent interception if somehow possible) would be to have a boxxy-run script sym-linkable from ~/whatever/bin/aws (say) that basically just executes `boxxy "$(basename "$0")"`. So you could just symlink the same script with the name of whatever command you wanted to 'boxx'.
Perhaps a better solution would have been not using the Linux namespaces but using LD_PRELOAD to preload a shared library to intercept all the FS-related API and normalize the path. Of course more complex and would only function for dynamically linked executables, but would have not required to launch the executable with a proxy and would also be more stable, not relying on not so stable features such as Linux namespaces.
> If you could find a way to somehow intercept without requiring aliasing, this would be amazing.
I figured out while testing that `boxxy sh` works as expected, so I would imagine you can wrap any shell in it since it’s just a mount namespace. > Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing). Nope! Any spawned processes live inside the same mount namespace and see the same pretend view of the world.
Update: the tool didn't help. It complains about being unable to run some SUID executable that Chromium calls. I'll have to keep removing the Downloads by hand then after each use of Chromium.
Comments (239) 44 threads
Earlier comments> alias aws="boxxy aws" (repeat for other tools)
If you could find a way to somehow intercept without requiring aliasing, this would be amazing.
Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing).
A neat semi-solution (still worse than transparent interception if somehow possible) would be to have a boxxy-run script sym-linkable from ~/whatever/bin/aws (say) that basically just executes `boxxy "$(basename "$0")"`. So you could just symlink the same script with the name of whatever command you wanted to 'boxx'.
As the program intercepts file APIs for all processes launched under it, it should handle subprocesses just fine.
Now I need both boxxy foobar and boxxy aws configured for the same ~/.aws redirection.
I figured out while testing that `boxxy sh` works as expected, so I would imagine you can wrap any shell in it since it’s just a mount namespace.
> Also, as it is, isn't it problematic that programs might call others (outside of your shell, not respecting its aliasing).
Nope! Any spawned processes live inside the same mount namespace and see the same pretend view of the world.
All comments shown.
Couldn't load more comments. Check your connection and try again.