Through the clever use of some escape characters, I used to put the output of arbitrary commands (e.g. "dirs") into my xterm title bar. Can I do the same thing in konsole? If so, how?
Asked
Active
Viewed 2,744 times
2 Answers
6
It's a little tricky to do what you want, but you can change Konsole's title bar. Go to:
Settings > Edit current profile > Tabs > Tab title format
and change it to %w
which means Window Title Set by Shell. I think you need to close Konsole and reopen it for the changes to take effect.
Anyway, go to the prompt and exec:
OUTPUT=`whoami`; echo -ne "\033]2;$OUTPUT\007"
and behold!
This example sets the title of the window temporarily to whatever is outputted by whoami.

karlphillip
- 92,053
- 36
- 243
- 426
4
You can also do it using dbus:
qdbus $KONSOLE_DBUS_SERVICE $KONSOLE_DBUS_SESSION setTitle 1 $(dirs)
for KDE 3, using dcop:
dcop $KONSOLE_DCOP_SESSION renameSession $(dirs)

ninjalj
- 42,493
- 9
- 106
- 148