Home » Questions » Computers [ Ask a new question ]

Renaming windows of shells in Ubuntu

Renaming windows of shells in Ubuntu

How can you rename windows in Ubuntu?

Asked by: Guest | Views: 203
Total answers/comments: 2
Guest [Entry]

"The process is a little complex to explain here since it is different for every shell you use. Rather I'll give you two links:

How to Change the Title of an
xterm (Comprehensive instructions
for many different shells)
Show the current Command in your
Bash window Title. A nice step by
step procedure on how the author went
on to do this nice effect. Makes for
a good learning practice. (But bash
specific)

There are a few other things to take into consideration. For a one time change common to all terminal sessions, you may want instead to simply alter Bash (if you use bash and under gnome) icon and add --title=title under Gnome."
Guest [Entry]

"You could install and use xttitle (Note the doubled t in the name). I use it like this in a file sourced by my ~/.bashrc:

# from the ""xttitle(1)"" man page - put info in window title
update_title()
{
[ $TERM = xterm -o $TERM = xterm-color ] && xttitle ""[$$] ${USER}@${HOSTNAME}:$PWD""
}

cd()
{
[ -z ""$*"" ] && builtin cd $HOME
[ -n ""$*"" ] && builtin cd ""$*""
update_title
}

I also do this:

xttitle Mutt && mutt"