<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Mac OS X change the terminal window title</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/mac_os_x_change_the_terminal_window_title_apple_mac_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 09 Feb 2011 14:31:52 -0000</lastBuildDate><item><title>Re: Mac OS X change the terminal window title</title><link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/#comment-143561549</link><description>&lt;p&gt;This works in an interesting way -&lt;/p&gt;&lt;p&gt;export PS1="\$(echo -n -e \"\033]0;\w\007\")\w $"&lt;/p&gt;&lt;p&gt;executes the echo command to set the tab title to \w and then shows a regular \w $ prompt.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ivan Tumanov</dc:creator><pubDate>Wed, 09 Feb 2011 14:31:52 -0000</pubDate></item><item><title>Re: Mac OS X change the terminal window title</title><link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/#comment-23625520</link><description>&lt;p&gt;I put this in my .bashrc&lt;br&gt;echo -n -e "\033]0;`hostname`\007&lt;br&gt;Then on each tab as I log into a different machine (It has to have that line in the .bashrc of the user/machine I'm logging into) it sets the title as I log in to the machine, so all the tabs are correct.&lt;br&gt;And to recover on logout, I put this in the .bash_logout:&lt;/p&gt;&lt;p&gt;prev=`who am i | sed -e "s/.*(\(.*\))/\1/"`&lt;br&gt;if test ! x$prev = x &lt;br&gt;then&lt;br&gt;    echo -n -e "\033]0;$prev\007"&lt;br&gt;fi&lt;/p&gt;&lt;p&gt;alias sett="echo -n -e "\033]0;`hostname`\007"&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CeriDavies</dc:creator><pubDate>Fri, 20 Nov 2009 11:48:56 -0000</pubDate></item><item><title>Re: Mac OS X change the terminal window title</title><link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/#comment-23624618</link><description>&lt;p&gt;Perfect, I put this in my .bashrc and the title changes on each tab as I login&lt;/p&gt;&lt;p&gt;echo -n -e "\033]0;`hostname`\007"&lt;/p&gt;&lt;p&gt;The only problem I have is that it doesn't change back, when I get logged out, so I have an alias to reset it...&lt;/p&gt;&lt;p&gt;alias sett="echo -n -e "\033]0;`hostname`\007"&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CeriDavies</dc:creator><pubDate>Fri, 20 Nov 2009 11:33:59 -0000</pubDate></item><item><title>Re: Mac OS X change the terminal window title</title><link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/#comment-8721646</link><description>&lt;p&gt;Thanks, works like a charm. However, it doesn't change the title of a tab, just that of the main windows in which many tabs are contained - so it's useless to be able to see at a glance which terminal is the one you're looking for. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">luca</dc:creator><pubDate>Mon, 27 Apr 2009 03:48:47 -0000</pubDate></item><item><title>Re: Mac OS X change the terminal window title</title><link>http://www.tech-recipes.com/rx/705/mac-os-x-change-the-terminal-window-title/#comment-3627224</link><description>&lt;p&gt;How would you set the tab title when running multiple tabs?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">des09</dc:creator><pubDate>Sat, 08 Nov 2008 15:46:04 -0000</pubDate></item></channel></rss>