I wanted to change color when I login to remote server by ssh.
The problem solved by this question.
How do I make the apple terminal window auto change colour scheme when I ssh to a specific server
But the solution above have a little problem.
So I want to "reset" background color when I open new Terminal Tab. How can I do it?
By default, Terminal creates new tabs with the same settings as the current tab. You can change it to always use your default profile for new tabs in Preferences > Startup by changing New tabs open with: to Default Settings.
Note that there’s a built-in way to automatically set the background color for specific commands instead of using the script from that other answer:
You can set the name of a settings profile to a command name and Terminal will select that profile when you create a new terminal via either Shell > New Command… or Shell > New Remote Connection….
For example, duplicate your default profile, name it “ssh” and set its background color to red. Then use New Command… to run ssh host.example.com
.
It also matches on arguments, so you can have it choose different settings for different remote hosts, for example. You could have one named “ssh host.example.com” with a blue background and another named “ssh” with a red background to handle any ssh commands that don’t match other profiles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With