<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Coloring an OSX Terminal window based on an ssh connection?</title>
      <link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection/</link>
      <description>Comments on Ask MetaFilter post Coloring an OSX Terminal window based on an ssh connection?</description>
	  	  <pubDate>Thu, 15 May 2008 12:58:32 -0800</pubDate>
      <lastBuildDate>Thu, 15 May 2008 12:58:32 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Coloring an OSX Terminal window based on an ssh connection?</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection</link>	
  	<description>My career involves me using OSX Terminal ssh&apos;d into other servers.  Often, I have multiple ssh connections open, sometimes two or three to the same server.  I can&apos;t bring myself to use tabs.  Is there anything that can automatically be done to automatically color/title my terminal windows once I ssh into them? Even nicer would be a spotlight command to launch terminal and connect to a terminal.  Then, the color/background image (and window title) would change based on my ssh connection, depending on server name/address, production vs qa vs dev, etc.  We&apos;re talking about 10 diff. servers overall and often I have two or three terminals open to the same server.&lt;br&gt;
&lt;br&gt;
Is this the reason I&apos;ve been needing to finally delve into Applescript, or does a solution already exist?&lt;br&gt;
&lt;br&gt;
I would consider installing QS if a solution exists.  If it helps, I dont do a whole lot locally from the OSX terminal, its always ssh.</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.91501</guid>
  	<pubDate>Thu, 15 May 2008 12:45:17 -0800</pubDate>
  	<dc:creator>neilkod</dc:creator>
	
	<category>osx</category>
	
	<category>terminal</category>
	
	<category>ssh</category>
	
	<category>applescript</category>
	
</item>
<item>
  	<title>By: kbanas</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341488</link>	
  	<description>You might want to check out iTerm (http://iterm.sourceforge.net/).  I&apos;ve heard good things about it, and the page seems to indicate that the tabs can change color depending on activity.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341488</guid>
  	<pubDate>Thu, 15 May 2008 12:58:32 -0800</pubDate>
  	<dc:creator>kbanas</dc:creator>
</item>
<item>
  	<title>By: zap rowsdower</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341494</link>	
  	<description>You can do this using some BASH scripting, assuming that&apos;s the shell you&apos;re using. Send me a mefi mail and I can provide some sample code to get you started in the right direction.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341494</guid>
  	<pubDate>Thu, 15 May 2008 13:01:34 -0800</pubDate>
  	<dc:creator>zap rowsdower</dc:creator>
</item>
<item>
  	<title>By: mkb</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341497</link>	
  	<description>If you go the settings section of Terminal&apos;s Preferences, you can create a setting for each server that has your preferred colors. Under the shell tab, you can have it run a command right away instead of just launching a local shell. Then, you can create new windows with each setting.&lt;br&gt;
&lt;br&gt;
You could then use AppleScript to create little apps to run these from the Finder or wherever. I&apos;m not AppleScripter though, and Terminal isn&apos;t recordable, so I can&apos;t help you there.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341497</guid>
  	<pubDate>Thu, 15 May 2008 13:03:41 -0800</pubDate>
  	<dc:creator>mkb</dc:creator>
</item>
<item>
  	<title>By: nicwolff</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341535</link>	
  	<description>Yes, just click the &amp;quot;+&amp;quot; under the list in the &amp;quot;Setting&amp;quot; pane of the preferences window, click the &amp;quot;Window&amp;quot; tab to fill in the window title and select the color and transparency, and the &amp;quot;Shell&amp;quot; tab to set the command &amp;quot;ssh hostname&amp;quot;. Then I set keyboard macros for each of the items in Terminal&apos;s &amp;quot;Shell&amp;quot; menu.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341535</guid>
  	<pubDate>Thu, 15 May 2008 13:43:50 -0800</pubDate>
  	<dc:creator>nicwolff</dc:creator>
</item>
<item>
  	<title>By: ranglin</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341575</link>	
  	<description>I would have written a bash script to do it as well (which, assuming you log into the machines as the same user, has the added advantage of working on ANY machine, as it sets the colour on the server), but to be honest, nicwolff and mkb&apos;s solution sounds easier... :)&lt;br&gt;
&lt;br&gt;
Nonetheless, if you need the bash details, let me know!</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341575</guid>
  	<pubDate>Thu, 15 May 2008 14:22:47 -0800</pubDate>
  	<dc:creator>ranglin</dc:creator>
</item>
<item>
  	<title>By: eafarris</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1341865</link>	
  	<description>mkb has it, above. I have different settings for the dozen or so servers that I ssh into on a regular basis. Each of these have a different background color, some have different fonts or sizes, and all of them have &amp;quot;ssh &amp;lt;user@server&amp;gt;&amp;quot; as the shell command. Under 10.4, these preferences were stored as files that could be indexed through Quicksilver, but I haven&apos;t been able to do this under 10.5. Instead, the different preferences show up in the right-click menu for Terminal&apos;s Dock icon, under &amp;quot;New Window&&amp;quot;. That&apos;s how I do it, anyway.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1341865</guid>
  	<pubDate>Thu, 15 May 2008 17:52:13 -0800</pubDate>
  	<dc:creator>eafarris</dc:creator>
</item>
<item>
  	<title>By: gentle</title>
  	<link>http://ask.metafilter.com/91501/Coloring-an-OSX-Terminal-window-based-on-an-ssh-connection#1344054</link>	
  	<description>Leopard&apos;s Terminal has &amp;quot;window groups&amp;quot;, which are named collections of tabs. You can set up a window group with one tab for each SSH connection.&lt;br&gt;
&lt;br&gt;
As for the colorization part, Terminal can&apos;t colorize tabs, and the old trick to set the terminal title using ANSI escape codes doesn&apos;t affect the tabs. &lt;a href=&quot;http://www.allthepages.org/archives/2007/10/specify_tab_names_in_terminal.html&quot;&gt;This trick&lt;/a&gt; is the only way I know to customize the tab name -- basically, you create a link (hard, not symbolic) to a script named whatever you want in the tab. Not pretty, but works.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.91501-1344054</guid>
  	<pubDate>Sat, 17 May 2008 19:08:52 -0800</pubDate>
  	<dc:creator>gentle</dc:creator>
</item>

    </channel>
</rss>
