Toolbox and zsh?

I have zsh installed with oh-my-zsh and some more configurations. This works fine on the host.

However, in toolbox I only get the basic terminal with this diamond :diamonds: thing appended that is shown by default there.

Here some observations:

  • The first time I entered a toolbox container after setting up zsh, toolbox or so panicked, and wrote some coredumps somewhere (uhm, I have no idea where??), but surprisingly it continued.

  • If I check $SHELL it says zsh in the container, but AFAIK this does only reflect the login shell, not the runtime shell.

  • When i had issues in my .bashrc file, they were shown when entering the container, so I thought it possibly runs bash, actually.

  • Also, inside of the container I have (obviously, as it seems?) no access to the zsh bin (/bin/zsh is not there.)

  • However, what conquered my theory that bash is running in there is that when I type an unknown command, both my host shell and my toolbox container shell show me:

    zsh: blabla: command not found…

    Whereas, when I am in a (specifically started) bash session (on the host or container), I get:

    bash: blabla: command not found…

So I am confused here.

So:

  • What is running in there and why does this happen?
  • How can I actually get my nice and good zsh experience inside of toolbox containers?

Confused too :smiley:. Have you installed zsh in the toolbox?

1 Like

Ahhhh…
Well… that’s an answer. It seems I need to get used to toolboxes… :stuck_out_tongue_winking_eye:

However, are not these toolbox containers mostly intended for “throwaway” tasks or so? I.e. I would like to avoid installing zsh again and again when I create a new container. (And as it seems, I also need to manually start zsh when I am inside the container then… that’s not nice.)
Can I somehow make a “base container” with zsh or so?

Also, this still does not explain why I then get zsh: blabla: command not found… when actually bash is running inside of it.

You can create as many toolboxes as you need/want depending on your workflow. Some can be throwaway some not, it is up to you.
Re base toolbox: I have not done it myself but being containers, I guess it should be possible.

1 Like
  • If zsh wasn’t present inside the container but $SHELL still said zsh, there’s definitely some bug in toolbox, as it should automatically fall back to bash but $SHELL and co should be set correctly. Most likely this is where the weird errors are coming from.
  • If your host shell is zsh then the toolbox should automatically enter into it. If not, there’s a bug somewhere.
  • Indeed the containers are isolated from the host, this is intentional because you can wreck the container as much as you want without trouble.
  • To figure out what crashed, do coredumpctl list -r. When you find an application, use coredumpctl dump to grab the core dump.
2 Likes

Oh nice, thanks.
So, bug reported:

Note that everything before I was writing this, I had not actually switched to zsh on the host properly, but just used usermod to change the shell. Now that I’ve used the proper command I will have a look on how it works.

If zsh wasn’t present inside the container but $SHELL still said zsh, there’s definitely some bug in toolbox, as it should automatically fall back to bash but $SHELL and co should be set correctly.

If you say so, bug reported:
https://github.com/debarshiray/toolbox/issues/219