Repository navigation
Replies: 2 comments
|
You don't need a new option: fzf already honours The catch is that mkdir -m 700 -p "$XDG_RUNTIME_DIR/fzf" # e.g. /run/user/1000/fzf
bwrap ... \
--bind "$XDG_RUNTIME_DIR/fzf" "$XDG_RUNTIME_DIR/fzf" \
--setenv TMPDIR "$XDG_RUNTIME_DIR/fzf" \
...You can also set Two side effects. The script runs fzf as you invoked it ( https://github.com/junegunn/fzf/blob/master/src/proxy.go Does your sandbox bind the same fzf binary and working dir at host paths, or are those different too? |
|
You can point it to a dedicated folder and bind-mount just that into the sandbox: export TMPDIR="/run/user/$UID/fzf-tmp"
mkdir -p "$TMPDIR"
# Add to your bwrap args:
--bind "$TMPDIR" "$TMPDIR" --setenv TMPDIR "$TMPDIR" |
Uh oh!
There was an error while loading. Please reload this page.
I'm running tmux on a host Linux OS. Many of my scripts use the fzf
--tmuxflag to utilize tmux native pop-up function.I also run many workloads in a
bubblewrapsandboxes. This means in a given tmux session, e.g. one pane might be running a sandboxed shell.Problem:
When I run a script in said sandboxed shell that uses
fzf --tmux, it fails, as it cannot access the shielded temporary file from host, e.g./tmp/fzf-temp-3028728627.code.Possible solution:
Provide an optional environment variable to fzf that dictates which directory to use for these temporary files (would still default to
/tmp), so this directory could be shared with the sandbox. We could share the entire /tmp, but that's generally not wanted.Or are there other solutions how to solve this conflict?
All reactions