As usual, there are several methods to do something like this.
Unfortunately, the requested method seems not to be one. I have not been able to find a script that changes the profile (or any of the components thereof) in a running gnome-terminal. What you
can do is set up so that you open a new gnome-terminal with your preferred color-scheme when you ssh.
Personally, I have created several shortcuts on my desktop that I use to ssh to a number of the boxes that I normally have to use/administer. Each of those shortcuts is associated with a profile where, on the "Title and command" tab, I "run a custom command instead of my shell" and the custom command is along the lines of "ssh -X host.domain.tld". Then each profile has a different color scheme also.
An alternative way to to handle something equivalent is to create a script named ssh (e.g., in your bin directory, making sure that your PATH has your bin directory first) and having a form like:
- #! /bin/bash
-
gnome-terminal --window-with-profile=$1 -e "ssh $1.domain.tld" &
With the custom command set, this will open a new terminal window and automatically ssh to the host specified in the profile
If you want a single color scheme, e.g., black on white, for all of your ssh windows (personally, I'd much rather have different schemes), you can just create a single profile with that color scheme and no "custom command":
- #! /bin/bash
-
gnome-terminal --window-with-profile=ssh -e "ssh $1.domain.tld" &
This should do that job.
As I mentioned, I have not found a script that allows you to change the profile of a running gnome-terminal. You can, of course, change the profile manually using the "Terminal" menu from the gnome-terminal menubar, but I find this less reliable. In looking around, I found a mention or two that sort of implied that gconftool-2 could change characteristics of a running gnome-terminal, but nobody included an actual script and I have not tested this myself.
Best Regards,
Paul