Sample Header Ad - 728x90

Starting tmux from outside home directory does not source .bash_improvements

0 votes
2 answers
34 views
I'm running Ubuntu server (version 24.04.2 LTS). I'm quite happy with it. Sometimes I need longrunning processes, therefore I start them in a tmux session. But I have a small issue when I run tmux. In the .bashrc file, the .bash_improvements file is sources when $color_prompt is yes. This works, but ONLY if I run tmux from within my home folder. if [ "$color_prompt" = yes ]; then source .bash_improvements else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt When I start tmux from a different directory, then I receive the following error: -bash: .bash_improvements: No such file or directory. I understand the error, because the .bash_improvements file is indeed not available in that directory. I also can fix it by changing the default .bashrc file, but that doesn't feel right. How do I fix this in a structured way?
Asked by Rogier Lommers (195 rep)
Jun 18, 2025, 06:04 AM
Last activity: Jun 18, 2025, 08:53 AM