When using exec in current shell, the last process name is still reflected in the tabbar. For example, I use a `~/.bashrc` with `exec fish` so that launching Bash in interactive mode is replaced with fish (because fish as a default shell breaks e.g. Plasma). In this case, Konsole reports `bash` as the current process. Note that when launching e.g. htop, it reports correctly the current process name, but when returning to the shell it still displays the wrong name (bash in my case).
Following your steps, it works here on master and the 17.12 branch. You are using the default format %d : %n ?
OK if you bash as the profile's command, it doesn't work. It does work if you start from a zsh shell.
Here is a demonstration: > bash # Command [bash] # Process reported by Konsole (%n) >exec zsh [bash] > htop [htop] # I quit htop [bash] # Konsole seems to keep process name in memory > zsh [zsh] > exec fish [zsh] > fish [fish]
Sorry for the formatting (I should have used preview!), here is a more readable version: $ bash [bash] # Process reported by Konsole (%n) $ exec zsh [bash] $ htop [htop] // I quit htop [bash] (Konsole seems to keep process name in memory) $ zsh [zsh] $ exec fish [zsh] $ fish [fish]
I still have this problem in Konsole 18.08.0, KDE Frameworks 5.49.0.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/864
Git commit 25f8ebf9b67be936a60e2d45f69391378ce56788 by Kurt Hindenburg, on behalf of Theodore Wang. Committed on 10/09/2023 at 15:14. Pushed by hindenburg into branch 'master'. Periodically check and update ProcessInfo::_name Currently, there is an issue where 'exec [program]' results in tab titles not being updated and not showing the process name as [program]. This is probably due to how 'exec' does not result in any change in pid and simply replaces the current process image with a different one. Due to a lack of pid changes, Session::updateSessionProcessInfo will not call ProcessInfo::newInstance, thus not updating the ProcessInfo::_name. This new change periodically checks and updates the _name of ProcessInfo through ProcessInfo::readProcessName, which is called by ProcessInfo::update. M +5 -0 src/NullProcessInfo.cpp M +1 -0 src/NullProcessInfo.h M +149 -67 src/ProcessInfo.cpp M +7 -0 src/ProcessInfo.h M +27 -0 src/UnixProcessInfo.cpp M +17 -0 src/UnixProcessInfo.h https://invent.kde.org/utilities/konsole/-/commit/25f8ebf9b67be936a60e2d45f69391378ce56788