9
4
How can I put the current running process name into a GNOME Terminal tab title (or title bar when there's only one tab)?
-- UPDATE --
To clarify, I want the tab title to update when I run a process, for example:
# title is currently "bash"
$ find / -name foo # while searching for foo, title is "find"
$ # title is once again "bash"
$ less /proc/cpuinfo # title changes to "less"
$ man ls # title changes to man
$ # title returns to "bash"
why the
PS1
-assignment? it results in glibberish for me, and it doesnt really seem necessary here...? – phil294 – 2017-05-05T02:41:40.8402Thank you for asking a good question. This looked like a simple question at first...
After the first 10 minutes, it was starting to drive me nuts!
That's why I thought it was a good question - sounds simple, but forced me to learn something deeper about the interaction between the shell, the terminal and signals. – DaveParillo – 2009-09-21T17:10:19.443