Toolbox: How to disable automatic toolbox entering in new terminal?

Created on 7 Jul 2019  ·  12Comments  ·  Source: containers/toolbox

I basically want to _not_ do https://github.com/debarshiray/toolbox/issues/135 /https://github.com/debarshiray/toolbox/pull/199.

When I Ctrl+Shift+T (open a new tab) when I am in a toolbox in Fedora Silverblue, the new terminal also is in that toolbox?

So:

  1. Can I disable this "feature"? How?
  2. (If not) Can I at least somehow exit the toolbox in a new tab then without closing that tab?
    I.e. if I am in that toollbox in a new tab and enter exit, it actually closes this tab. Can I somehow get out of this without closing this tab?

original question from here: https://ask.fedoraproject.org/t/can-i-disable-automatic-toolbox-entering-when-new-terminal-tab-is-opened-in-gnome-terminal/2412?u=rugk
Also basically requested here and @basvdlei also seems to ask for a way to disable that behaviour in https://github.com/debarshiray/toolbox/issues/135#issuecomment-508447430 if I understand correctly.

1. Bug 5. Help Wanted

Most helpful comment

When toolbox is starting, it's pushing a value to this "stack", which is available to the Terminal when opening a new window.

It think it would be nicer though to be able to disable this feature entirely in toolbox.

All 12 comments

+1, very annoying by default.

I also think this is trying to solve an important problem in the wrong way. Personally I use custom gnome-terminal profiles, including one for my toolbox that gives me the tab behavior, without affecting the main Terminal app.

I quite like opening the toolbox automatically on a new tab, especially when not running the default toolbox. There is one thing though, when all tabs in a terminal are running a toolbox, we can only open a new window on the host.

You can probably disable the feature yourself in your dotfiles if you run inside the toolbox :

printf "\033]777;container;pop;;\033\\"

from https://github.com/debarshiray/toolbox/pull/199/files

Did not test that though

:+1:, but to the second question of how to exit a toolbox. When you want to run system-level commands (e.g. rpm-ostree), there's no clear way to get out of toolbox.

@TheFrozenFire Ctrl+D?

@shaman007 That's too obvious and simple for me. Are you sure you don't have a dbus command for that? (/s)

Thanks. :)

I quite like opening the toolbox automatically on a new tab, especially when not running the default toolbox. There is one thing though, when all tabs in a terminal are running a toolbox, we can only open a new window on the host.

You can probably disable the feature yourself in your dotfiles if you run inside the toolbox :

printf "\033]777;container;pop;;\033\\"

from https://github.com/debarshiray/toolbox/pull/199/files

Did not test that though

I tested this and can confirm it works. In your container, you can put that command in a shell startup file, something like this:

bkhl@toolbox:~$ cat /etc/profile.d/~99start.sh 
printf "\033]777;container;pop;;\033\\"

@bkhl This is working for me as well, but can someone explain exactly why?

When toolbox is starting, it's pushing a value to this "stack", which is available to the Terminal when opening a new window.

It think it would be nicer though to be able to disable this feature entirely in toolbox.

I ended up installing tmux just to avoid this.

Maybe it could be a new command toolbox exit ?
It would kinda fit, as we have already a toolbox enter

EDIT: Just noticed #578 suggested the same command, sorry for the spam

Oh yeah, maybe this should be closed as a dupe of https://github.com/containers/toolbox/issues/578?

Oh yeah, maybe this should be closed as a dupe of https://github.com/containers/toolbox/issues/578?

Or the other way around, as this issue is older and more discussed.

Was this page helpful?
0 / 5 - 0 ratings