toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

`toolbox enter`: run shell in container via `/usr/bin/env <shell-name>` instead of using `$SHELL` directly

Open ghost opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

When using the toolbox enter command to launch the shell in a container, it currently directly uses the $SHELL variable. This can lead to a problem when it can't find shell in container in certain environments, particularly in NixOS host where $SHELL is usually formatted as /run/current-system/sw/bin/<shell-name>. (or something like /usr/local/bin/<shell-name>, ~/.local/bin/<shell-name>)

Describe the solution you'd like

Get shell name from $SHELL and run shell via /usr/bin/env <shell-name>.

Describe alternatives you've considered

Running toolbox enter with SHELL=/usr/bin/fish.

ghost avatar Dec 23 '23 19:12 ghost

PR: #1432

ghost avatar Dec 23 '23 19:12 ghost

Interesting. Is this enough to get Toolbx working on NixOS hosts?

I remember that in the past there were problems getting Toolbx to work on NixOS, but I lost track of those.

debarshiray avatar Jan 29 '24 14:01 debarshiray

Is this enough to get Toolbx working on NixOS hosts?

Looks like? Currently, Toolbox just works (ignoring this issue) on my NixOS 23.11 (but AFAIK you need to enable podman support in NixOS)

ghost avatar Feb 01 '24 11:02 ghost