I'm running Ubuntu 19.10. I have a few terminal profiles that have different colors (e.g. login, cluster, and admin). I would like it to automatically change the terminal profile to "login" when I start an SSH session to our login host, "cluster" when I ssh to our cluster, and "admin" when I go to our admin host.
Is it possible for the default Terminal to detect that I'm running something and change based on context?
If not, is is possible to change the profile by creating aliases like: loginssh='$CHANGE_TERMINAL_COMMAND --profile=login && ssh login
clusterssh='$CHANGE_TERMINAL_COMMAND --profile=cluster && ssh cluster
I see that it's possible to do this via the PS1 in my .bashrc from here: Change terminal colour based on SSH session, but I'd rather switch the profile than muck about with that.
gnome-terminal --profile admin -- ssh admin
or the like, but I want to change the CURRENT window/tab, not open a new one.