Gnome terminal / launch command 'toolbox enter' on launch

Hello!
Since few weeks, I’ve configured Gnome Terminal with 2 profils, the default renamed “Host”, and another profil named “Toolbox” with a custom command to launch on startup “toolbox enter”.
So, when I open le Terminal, I could easily switch profil to go on Toolbox or Host.

But, since 2 ~ 4 days, I couldn’t use it anymore. If I try to switch to profil “Host”, this open a new terminal in toolbox. So I need to manually remove the command “toolbox enter”, to close every opened terminal and to re-open a new terminal to be on the Host terminal.

Currently, I’ve disabled it, and I need to type “toolbox enter” manually, but even with an alias (eg: « te »), 95% of my time I need to go in Toolbox terminal.

There is a command inside the toolbox shell to go back to the Host terminal please? When I use exit, this close the Gnome Terminal window.

If I understand you correctly then I have the same setup as you. My primary tab custom-command opens zsh, my secondary uses: /usr/bin/toolbox enter -c clitools

Under Preferences > General, I have: Open new terminal in: Tab

This works, uses an up-to-date Silverblue as of 27-06-19. If your setup does not work, then it should be a local problem.

You can use: **dconf dump /org/gnome/terminal/ ** to see the current gnome-terminal settings.

1 Like

Thanks, I’ve found the problem, I need to put the /bin/zsh for the Host, without this precision, this make some strange behaviours!

I know you said you solved this, but I still wanted to clarify some things. Gnome Terminal sort of muddies the term “Profile” by storing both appearance and configuration settings in profiles — the appearance settings can be activated in existing terminals at any time, using “Terminal > Change Profile > [selection]” in the menu. The configuration settings, things like “Run a custom command instead of my login shell”, are only applicable when creating a new terminal.

In other words, if you have a “Run a custom command…” profile that you want to use, you can’t create a default-profile tab/window and then Change Profile to the one you want. You can activate it with “File > New Tab (or Window) > [selection]”. But if you “Change Settings” to the new profile, it’ll just ignore the different configuration, and only apply any differences in appearance.

I keep Profile definitions around for logins to each of the other hosts on my local net, with “ssh hostname.local” set for the “Run a custom command…” preference on each. When I want to open a session on one of those hosts, I use “File > New Tab > [host profile]” to open one. (Then, #PROTIP, I can use Ctrl+Shift+T in one of those tabs, to create an additional session using the remote profile. Ctrl+Shift+T will create a new tab using the same profile as whatever tab you’re currently in.)

But “Change Profile”, if that’s what you were using, isn’t really meant for switching between profiles that use custom commands. (In fact, my personal opinion is that “Change Profile” is utterly worthless.)

This is a bad solution, however, because then you cannot use the Nautilus -> “Open Terminal here” option anymore, because zsh then ignores your current working dir and it ends up always opening at ~.

BTW I’ve asked a very similar question here:

1 Like