0

So, basically, when tmux launches, what all does it run through to start up?

I recently changed the location of my home directory on a few servers, CentOS and Ubuntu. I also use tmux and bash.

I noticed when I launch tmux, it loads a bare bash shell, not running my bashrc, but it does load my tmux.conf. echo $HOME shows my old home directory.

When I'm logged in through SSH, not in tmux, it loads bashrc just fine, and my $HOME is my new home directory.

What does tmux run through when loading, and what would be reading my old home directory for $HOME?

The home directory is changed in the /etc/passwd, I've tried using usermod to write the change that way, it responds with 'no changes'.

Would like to get this worked out. Have already searched around, can't find much. Thanks.

  • 1
    $HOME is typically set by the login program and left unchanged by shells. This seems to be correct for you if you login via ssh. Tmux reads it's config file, and that can specify environment variables and the program(s) to run. So the next step would be to try renaming /etc/tmux.conf and ~/.tmux.conf and see if the problem goes away. – icarus Oct 5 '17 at 5:26
  • Moved ~/.tmux.conf elsewhere, still same result. /etc/tmux.conf does not exist. All that tmux installed was the binary in /usr/bin and examples in the /usr/share/doc and documentation in /usr/share/man – Jared Sheila Kat Oct 5 '17 at 5:38
0

Add the line:

 set-option update-environment $HOME

to the ~/.tmux.conf file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.