Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way
Authored by: pbx on Feb 13, '03 03:44:13PM

Varying the appearance of terminal windows is a great trick. Here's a totally different, not to say better, way of doing it:

1) In Terminal, create a new window. Tweak its size, font settings, colors, etc.

2) Save these settings as a .term file

3) In a text editor, open the .term file (it's XML) and look for the "Shell" key. Edit that setting to look like this:

<key>Shell</key>
<string>/usr/bin/ssh ACCOUNT@HOST</string>

filling in the appropriate account and host values of course.

4) Save changes

5) That's it. Open the .term file to create a new connection. If you've got ssh set up right (I'm sure there's a hint on that somewhere here), you won't even have to type your password.

This works great in conjunction with something like Launchbar to make quick work of opening the various .term files.

In my web development work, I actually tweak the terminal window colors to match the color scheme of the client site. This makes it obvious at a glance which shell sessions are associated with which jobs.



[ Reply to This | # ]
Another way
Authored by: readparse on Feb 14, '03 12:50:31AM

Yeah, this is what I do in Terminal, and the same kind of thing that I've done for years with other terminal programs (xterm and SecureCRT). It's a very good practice, but there's also something to be said for a program that will change the color of the text when certain programs (or strings, as they case may be) are run. I, for one, have been in one Terminal session that was set up for a remote ssh connection, then been disconnected from that session, to find myself in a local shell that appears at first glance to be a remote shell. Things like that. If the colorization is done at the command level, it can become a whole lot less confusing.

Oh, and the idea of having strongly-highlighted text for the "su" command is ingenious. Love it

John



[ Reply to This | # ]
Another way
Authored by: the_shrubber on Feb 14, '03 07:12:29AM

That's very kind, thanks.

two notes: If you switch windows before the applescript has a chance to run, it'll end up colouring the wrong terminal (doh)..

Also, if you ctrl-C your app, the script won't have a chance to run it's set-the-colour-back stuff, so you'll have to manually perform 'decolorterm" (the decolorterm alias is set with the assumption that your terminal is dark-backgrounded; you should change it to taste)



[ Reply to This | # ]