It seems, at least in recent versions of Konsole, the title cannot be changed. You can change the tab, though, for example by the following ANSI sequence:
echo $'\033]30;NewName\007'
Update:
For inspiration, I tried another approach. I created a file ~/konsole-name.sh
:
function kname { name=$(grep $WINDOWID .knamerc) name=$ if [[ $name ]] ; then qdbus org.kde.konsole $KONSOLE_DBUS_SESSION \ org.kde.konsole.Session.setTitle 1 $name > /dev/null fi } function kname-set { sed -i "/^$WINDOWID\t/d" .knamerc echo $WINDOWID$'\t'"$1" >> .knamerc kname }
And I added the following to my .bashrc:
. ~/konsole-name.sh && kname
Then, when a new konsole is started, I can just type kname-set THE-ONE-TRUE-KONSOLE
in the first window. All newly created tabs will be named the same. You can give any konsole its "name" by calling the function in its first tab.
You might need to clobber the file .knamerc
on logout.
The rest is left as an exercise to the reader :-)