Set Gnome Terminal Title In Gnome 3.14+

Posted by Weston Ganger

It really rattled my cage when Gnome terminal was changed in 3.14 where you couldn’t set titles on your tabs. I had a hard time finding a good way so I found a method that worked and made a bash function. Add this to your .bashrc


set-title(){
  ORIG=$PS1
  TITLE="\e]2;$@\a"
  PS1=${ORIG}${TITLE}
}

This method allows you to have spaces in your title too!


set-title my-title

set-title my really long title with spaces

I hope I made someones day with this one.


Related External Links:

Article Topic:Software Development - Linux

Date:March 22, 2015

Recommended Posts