SUMMARY It is just qdbus in Gentoo, while KDevelop attempts to call qdbus-qt5 STEPS TO REPRODUCE 1. Open the terminal tab OBSERVED RESULT getSessionDir:1: command not found: qdbus-qt5 executeInAppSync:6: command not found: qdbus-qt5 getSessionDir:1: command not found: qdbus-qt5 getSessionDir:1: command not found: qdbus-qt5 executeInAppSync:6: command not found: qdbus-qt5 getSessionName:1: command not found: qdbus-qt5 You are controlling the KDevelop session ''. Type help! for more information.
https://invent.kde.org/kdevelop/kdevelop/-/blob/master/kdevplatform/util/kdevplatform_shell_environment.sh falls back to qdbus when qdbus-qt5 is not present in PATH. Just tried to reproduce this issue in Manjaro where /usr/bin/qdbus-qt5 is a symlink to /usr/bin/qdbus: renamed qdbus-qt5 to qdbus-qt5-, started KDevelop, and the embedded Terminal tool view works normally. So there must be another reason why the script doesn't work on your system. You could debug it outside of KDevelop to figure out what's wrong.
Thank you for looking into this! So, I've got Gentoo and zsh here. The kdevplatform_shell_environment.sh absolutely does not work in this environment. 1. My $ZDOTDIR is empty: it fails to detect zsh. Why not simply check $SHELL? E.g. _shell=$(basename "$SHELL"). I guess those who rename their shell executables know that they are doing. 2. This "$(which $_qdbus 2> /dev/null)" executes result of "which $_qdbus", so when it is negated, $_qdbus value is not changed when there is no qdbus-qt5 executable. A proper test is: if ! command -v $_qdbus &> /dev/null; then _qdbus=qdbus if ! command -v $_qdbus &> /dev/null; then echo "The utility qdbus (or qdbus-qt5) is not in your path, the shell integration will not work properly." fi fi
https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/260