SUMMARY Terminal panel doesn't source ~/.bashrc when dolphin is reopened. Returns normal with CTRL+D / exit and opening again (f4). STEPS TO REPRODUCE 1. Open dolphin with terminal panel (f4). 2. Close dolphin. 3. Open dolphin. Terminal panel is restored. OBSERVED RESULT When dolphin is reopened the terminal panel is missing aliases and settings from the ~/.bashrc. EXPECTED RESULT Terminal panel has same properties as if opened manually. SOFTWARE/OS VERSIONS Qt Version: 5.15.2 ADDITIONAL INFORMATION Sourcing is interrupted at line #221 in terminalpanel.cpp. Restoring panel at dolphin start calls function twice with second call sending SIGINT to konsole instance. https://invent.kde.org/system/dolphin/-/blob/master/src/panels/terminal/terminalpanel.cpp#L221 $BASH_ARGV has value "/home/user/.bashrc" instead of empty like when panel is working normally.
*** This bug has been marked as a duplicate of bug 279614 ***
(In reply to Nate Graham from comment #1) > > *** This bug has been marked as a duplicate of bug 279614 *** Bug 279614 is specifically mentioned to occur during session restore which includes step to log out of the current session. This bug occurs even when not logged out of session but is probably caused by same code.
You can fix this without making changes to souce code by simply making your .bashrc file as follows: trap : SIGINT ## YOUR BASHRC CONTENT ## trap - SIGINT This redirects any interrup signals to null- command during the sourcing phase and clears after sourcing has been done. Why: - Dolphin opens with the tabs opened in the last session. - Dolphin parses all the paths of the tabs and starts calling directory changes to the terminal. - Dolphin has a failsafe feature when calling directory changes*[1]. It sends SIGINT to terminal process before changing directory. - This results in terminal (bash) interrupting .bashrc / .bash_profile parsing. [1] panels/terminal/terminalpanel.cpp: TerminalPanel::sendCdToTerminal // The TerminalV2 interface does not provide a way to delete the // current line before sending a new input. This is mandatory, // otherwise sending a 'cd x' to a existing 'rm -rf *' might // result in data loss. As workaround SIGINT is sent. const int processId = m_terminal->terminalProcessId(); if (processId > 0) { kill(processId, SIGINT); }