You can use bubblewrap (its CLI name is bwrap) to make an arbitrary directory as $HOME for a specific program session. Basically, you can bind or set any environment variable you need for that particular program. I recommend checking out the arch wiki on this topic.
For example: bwrap --dev-bind / / --bind$HOME/your/dir/path $HOME <your_program>. This will let <your_program> have access to / and device permissions, with $HOME/your/dir/path serving as its $HOME.
You can use bubblewrap (its CLI name is
bwrap
) to make an arbitrary directory as$HOME
for a specific program session. Basically, you can bind or set any environment variable you need for that particular program. I recommend checking out the arch wiki on this topic.For example:
bwrap --dev-bind / / --bind $HOME/your/dir/path $HOME <your_program>
. This will let<your_program>
have access to/
and device permissions, with$HOME/your/dir/path
serving as its$HOME
.