I work a lot in terminal on os x. I usually have two tabs opened - bash and svn on a remote server. Since files on my remote server are the same as on my disk it sometime get me confused.

Is there a chance of changing bash terminal color to ie. blue and leaving all ssh connection in another tab in black color? I mean permanently, not just via inspector for one session.

Thanks.

link|improve this question
1  
Belongs on superuser.com – Paul R Jan 27 '11 at 9:49
1  
or apple.stackexchange.com – WraithNath Jan 27 '11 at 10:07
feedback

migrated from stackoverflow.com Jan 28 '11 at 1:45

This question came from our site for professional and enthusiast programmers.

2 Answers

I´d suggest using different coloured Prompts for that, this site from IBM is a good starting point for info on that topic: http://www.ibm.com/developerworks/linux/library/l-tip-prompt/

I personally have the following line in my ~/.bash_profile:

export PS1='\[\e[44m\] \u @ \H | \[\e[7m\] $PWD \[\e[0m\] \n > \[\e[0m\] '

which not only colours my prompt blue, but also shows my current Hostname and which directory I´m currently in. If you have sufficient access to the other servers you use, you could give the prompt a different colour there.

link|improve this answer
feedback

Well, it is not what you are looking for, but just in case... I have two custom settings in the Terminal, one named "LOCAL" and another "SSH mymachinename", with completely different color settings (back/green, white/black) to help me know where I am.

I also changed the default Title of the tab/window for each setting, and on the SSH setting, in the "Shell" tab I put "ssh root@..." as a command to run on startup (I work almost exclusively on one remote machine, but you could duplicate this for more machines of course).

If you right-click the Terminal icon on the Dock you can directly open a Terminal with the appropriate settings for the session.

Also, I use Spaces (Desktops) and open the terminal for the SSH session on, say, Space 4, and the Local terminal on Space 3.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.