Berkeley CSUA MOTD:Entry 36644
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2005/3/11-14 [Computer/SW/Security] UID:36644 Activity:nil
3/11    I'd like a way to have Terminal.app change the window's background
        color when I ssh to another machine-- really cool would be to have
        some sort of mapping of hostname to RGB value so that the window
        for machine1 looks different than machine2.  Is there a way to do
        this?  TIA.
        \_ If I wanted to do this for one machine only, I would replace ssh
           with a wrapper that outputs some ANSI sequences before calling
           the real ssh. (You might want to put in some logic to only do this
           for interactive sessions.) To set it up on a number of systems, I
           would put the ANSI sequences in my .profile. That way, if you ssh
           from A to B, then from B to C, your colors will match machine C
           instead of machine B. -gm
        \_ You might be able to do this w/ saved .term files. Just set
           the background to the color you want and then do File->Save
           and specify the cmd to execute as /usr/bin/ssh user@host.
           Then when you click on a particular term file, it will have
           the color set and will ssh into that host.